aboutsummaryrefslogtreecommitdiffstats
path: root/lib/common_test/src/cth_surefire.erl
diff options
context:
space:
mode:
authorPeter Andersson <[email protected]>2014-03-24 16:23:49 +0100
committerPeter Andersson <[email protected]>2014-03-24 16:23:49 +0100
commit48952834e4caf8081e1b88b0de4f272ab6b410c5 (patch)
tree3334cb19ed180f6e01b6065db88b4416e2cdb168 /lib/common_test/src/cth_surefire.erl
parent8ffbf0feccb375afc10ce676070b6b778e9bf260 (diff)
downloadotp-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/common_test/src/cth_surefire.erl')
-rw-r--r--lib/common_test/src/cth_surefire.erl4
1 files changed, 4 insertions, 0 deletions
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),