From e28303402c4ef2fcdc9ee27b3c717af54b3a1330 Mon Sep 17 00:00:00 2001 From: Micael Karlberg Date: Thu, 18 Jul 2019 19:31:50 +0200 Subject: [snmp/agent|test] Fixing test runner exit --- lib/snmp/test/snmp_agent_test_lib.erl | 13 ++++++++++++- 1 file changed, 12 insertions(+), 1 deletion(-) diff --git a/lib/snmp/test/snmp_agent_test_lib.erl b/lib/snmp/test/snmp_agent_test_lib.erl index 615d6774b9..c0da47dc4c 100644 --- a/lib/snmp/test/snmp_agent_test_lib.erl +++ b/lib/snmp/test/snmp_agent_test_lib.erl @@ -423,7 +423,18 @@ tc_wait(From, Env, M, F, A) -> "~n ~p" "~n", [Res]), From ! {tc_runner_done, self(), Res, get(test_server_loc)}, - exit(Res). + %% The point of this is that in some cases we have seen that the + %% exit signal having been "passed on" to the CT, which consider any + %% exit a fail (even if its {'EXIT', ok}). + %% So, just to be on the safe side, convert an 'ok' to a 'normal'. + case Res of + ok -> + exit(normal); + {ok, _} -> + exit(normal); + _ -> + exit(Res) + end. tc_run(Mod, Func, Args, Opts) -> ?PRINT2("tc_run -> entry with" -- cgit v1.2.3