From 48c2e612e086680efddd48b0f7337345c4b4d1df Mon Sep 17 00:00:00 2001 From: Lukas Larsson Date: Tue, 5 Sep 2017 16:54:08 +0200 Subject: ct: ts:run now abort the test run on compilation failure --- lib/common_test/test_server/ts_run.erl | 7 +++++++ 1 file changed, 7 insertions(+) (limited to 'lib') 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 -> -- cgit v1.2.3