aboutsummaryrefslogtreecommitdiffstats
path: root/lib
diff options
context:
space:
mode:
authorLukas Larsson <lukas@erlang.org>2016-06-03 11:26:32 +0200
committerLukas Larsson <lukas@erlang.org>2016-06-14 10:08:44 +0200
commitfafacbdb5c3b8852e29da51933b708bbc57e8a0b (patch)
tree266b5f2ca780c885d00efba6617e0145af0ab99e /lib
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')
-rw-r--r--lib/erl_interface/src/misc/show_msg.c2
-rw-r--r--lib/erl_interface/test/runner.erl6
2 files changed, 6 insertions, 2 deletions
diff --git a/lib/erl_interface/src/misc/show_msg.c b/lib/erl_interface/src/misc/show_msg.c
index 81accab4b6..5868cccba6 100644
--- a/lib/erl_interface/src/misc/show_msg.c
+++ b/lib/erl_interface/src/misc/show_msg.c
@@ -40,6 +40,8 @@
# include <time.h>
# endif
# endif
+#else
+# include <time.h>
#endif
#include "eiext.h"
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.