aboutsummaryrefslogtreecommitdiffstats
path: root/lib/erl_interface/test/runner.erl
diff options
context:
space:
mode:
authorLukas Larsson <[email protected]>2016-06-03 11:26:32 +0200
committerLukas Larsson <[email protected]>2016-06-14 10:08:44 +0200
commitfafacbdb5c3b8852e29da51933b708bbc57e8a0b (patch)
tree266b5f2ca780c885d00efba6617e0145af0ab99e /lib/erl_interface/test/runner.erl
parent4f9c3328330df12955a27b455f3763d51f18f4c2 (diff)
downloadotp-fafacbdb5c3b8852e29da51933b708bbc57e8a0b.tar.gz
otp-fafacbdb5c3b8852e29da51933b708bbc57e8a0b.tar.bz2
otp-fafacbdb5c3b8852e29da51933b708bbc57e8a0b.zip
erl_interface: Fix trace level tracing on windows
Diffstat (limited to 'lib/erl_interface/test/runner.erl')
-rw-r--r--lib/erl_interface/test/runner.erl6
1 files changed, 4 insertions, 2 deletions
diff --git a/lib/erl_interface/test/runner.erl b/lib/erl_interface/test/runner.erl
index 9a27eda038..1084eec2a3 100644
--- a/lib/erl_interface/test/runner.erl
+++ b/lib/erl_interface/test/runner.erl
@@ -55,7 +55,7 @@ test(Tc, Timeout) ->
%% Returns: {ok, Port}
start({Prog, Tc}) when is_list(Prog), is_integer(Tc) ->
- Port = open_port({spawn, Prog}, [{packet, 4}]),
+ Port = open_port({spawn, Prog}, [{packet, 4}, exit_status]),
Command = [Tc div 256, Tc rem 256],
Port ! {self(), {command, Command}},
Port.
@@ -125,7 +125,9 @@ get_term(Port, Timeout) ->
get_reply(Port, Timeout) when is_port(Port) ->
receive
{Port, {data, Reply}} ->
- Reply
+ Reply;
+ Fail when element(1, Fail) == Port ->
+ ct:fail("Got unexpected message from port: ~p",[Fail])
after Timeout ->
ct:fail("No response from C program")
end.