aboutsummaryrefslogtreecommitdiffstats
path: root/lib/common_test/test_server
diff options
context:
space:
mode:
authorLukas Larsson <[email protected]>2017-09-05 16:54:08 +0200
committerLukas Larsson <[email protected]>2017-09-07 17:35:00 +0200
commit48c2e612e086680efddd48b0f7337345c4b4d1df (patch)
treef06a79bf0be779fd769301f4ed87db305f27ddf9 /lib/common_test/test_server
parent8e3baffd206247d3023c3e00d4d0849c23f3fc58 (diff)
downloadotp-48c2e612e086680efddd48b0f7337345c4b4d1df.tar.gz
otp-48c2e612e086680efddd48b0f7337345c4b4d1df.tar.bz2
otp-48c2e612e086680efddd48b0f7337345c4b4d1df.zip
ct: ts:run now abort the test run on compilation failure
Diffstat (limited to 'lib/common_test/test_server')
-rw-r--r--lib/common_test/test_server/ts_run.erl7
1 files changed, 7 insertions, 0 deletions
diff --git a/lib/common_test/test_server/ts_run.erl b/lib/common_test/test_server/ts_run.erl
index 82ae44ec06..e22fa8d196 100644
--- a/lib/common_test/test_server/ts_run.erl
+++ b/lib/common_test/test_server/ts_run.erl
@@ -96,6 +96,9 @@ ct_run_test(Dir, CommonTestArgs) ->
case ct:run_test(CommonTestArgs) of
{_,_,_} ->
ok;
+ {error,{make_failed, _Modules} = Error} ->
+ io:format("ERROR: ~P\n", [Error,20]),
+ erlang:halt(123, [{flush,false}]);
{error,Error} ->
io:format("ERROR: ~P\n", [Error,20]);
Other ->
@@ -288,6 +291,10 @@ tricky_print_data(Port, Timeout) ->
receive
{Port, {exit_status, 0}} ->
ok;
+ {Port, {exit_status, 123 = N}} ->
+ io:format(user, "Test run exited with status ~p,"
+ "aborting rest of test~n", [N]),
+ erlang:halt(123, [{flush,false}]);
{Port, {exit_status, N}} ->
io:format(user, "Test run exited with status ~p~n", [N])
after 1 ->