diff options
author | Peter Andersson <[email protected]> | 2014-03-24 16:23:49 +0100 |
---|---|---|
committer | Peter Andersson <[email protected]> | 2014-03-24 16:23:49 +0100 |
commit | 48952834e4caf8081e1b88b0de4f272ab6b410c5 (patch) | |
tree | 3334cb19ed180f6e01b6065db88b4416e2cdb168 /lib | |
parent | 8ffbf0feccb375afc10ce676070b6b778e9bf260 (diff) | |
download | otp-48952834e4caf8081e1b88b0de4f272ab6b410c5.tar.gz otp-48952834e4caf8081e1b88b0de4f272ab6b410c5.tar.bz2 otp-48952834e4caf8081e1b88b0de4f272ab6b410c5.zip |
Prevent cth_surefire hook from crashing if previous hook returns fail or skip.
Diffstat (limited to 'lib')
-rw-r--r-- | lib/common_test/src/cth_conn_log.erl | 1 | ||||
-rw-r--r-- | lib/common_test/src/cth_surefire.erl | 4 |
2 files changed, 4 insertions, 1 deletions
diff --git a/lib/common_test/src/cth_conn_log.erl b/lib/common_test/src/cth_conn_log.erl index a731c8054c..0e6c877c5d 100644 --- a/lib/common_test/src/cth_conn_log.erl +++ b/lib/common_test/src/cth_conn_log.erl @@ -100,7 +100,6 @@ get_log_opts(Opts) -> Hosts = proplists:get_value(hosts,Opts,[]), {LogType,Hosts}. - pre_init_per_testcase(TestCase,Config,CthState) -> Logs = lists:map( diff --git a/lib/common_test/src/cth_surefire.erl b/lib/common_test/src/cth_surefire.erl index 7ed2018bdf..bb12171ea7 100644 --- a/lib/common_test/src/cth_surefire.erl +++ b/lib/common_test/src/cth_surefire.erl @@ -79,6 +79,10 @@ init(Path, Opts) -> url_base = proplists:get_value(url_base,Opts), timer = now() }. +pre_init_per_suite(Suite,SkipOrFail,State) when is_tuple(SkipOrFail) -> + {SkipOrFail, init_tc(State#state{curr_suite = Suite, + curr_suite_ts = now()}, + SkipOrFail) }; pre_init_per_suite(Suite,Config,#state{ test_cases = [] } = State) -> TcLog = proplists:get_value(tc_logfile,Config), CurrLogDir = filename:dirname(TcLog), |