From 9295544658711636e21fd11e41d3d23169248c7d Mon Sep 17 00:00:00 2001 From: Micael Karlberg Date: Mon, 22 Jul 2019 14:49:00 +0200 Subject: [megaco|test] Failure to start config should result in skip It seems that the megaco_config process did not start (for an unknown reason) and that resulted in a failed test case. But starting the config process was not what the test case was for, so it should have resulted in a skip. Also, since we did not check the result of the config start, we don't know why it failed. So, move the start and stop of the megaco_config process to the [init|end]_per_testcase function(s). If we fail to start, then we skip (with a useful reason). --- lib/megaco/test/megaco_test_lib.hrl | 4 +--- 1 file changed, 1 insertion(+), 3 deletions(-) (limited to 'lib/megaco/test/megaco_test_lib.hrl') diff --git a/lib/megaco/test/megaco_test_lib.hrl b/lib/megaco/test/megaco_test_lib.hrl index b759c9bc75..35dcda42b6 100644 --- a/lib/megaco/test/megaco_test_lib.hrl +++ b/lib/megaco/test/megaco_test_lib.hrl @@ -32,8 +32,6 @@ -define(ERROR(Reason), megaco_test_lib:error(Reason, ?MODULE, ?LINE)). --define(F(FMT, ARGS), lists:flatten(io_lib:format(FMT, ARGS))). - -define(OS_BASED_SKIP(Skippable), megaco_test_lib:os_based_skip(Skippable)). @@ -87,4 +85,4 @@ -define(SECONDS(T), megaco_test_lib:seconds(T)). -define(FTS(), megaco:format_timestamp(erlang:timestamp())). -define(FTS(TS), megaco:format_timestamp(TS)). - +-define(F(F,A), lists:flatten(io_lib:format(F, A))). -- cgit v1.2.3