aboutsummaryrefslogtreecommitdiffstats
path: root/lib/common_test/src
diff options
context:
space:
mode:
authorPeter Andersson <[email protected]>2014-03-25 11:14:36 +0100
committerPeter Andersson <[email protected]>2014-03-25 11:14:42 +0100
commit646ad9bd6679f629d8c5c7bad7adc3fbb4d1a627 (patch)
treec899a000bb75579262fb767cf7230f4ac9d213fb /lib/common_test/src
parentfa2641c8089dc6850b2b176b0f195d9d9fcd7687 (diff)
parent48952834e4caf8081e1b88b0de4f272ab6b410c5 (diff)
downloadotp-646ad9bd6679f629d8c5c7bad7adc3fbb4d1a627.tar.gz
otp-646ad9bd6679f629d8c5c7bad7adc3fbb4d1a627.tar.bz2
otp-646ad9bd6679f629d8c5c7bad7adc3fbb4d1a627.zip
Merge branch 'peppe/common_test/cth_surefire_crash'
* peppe/common_test/cth_surefire_crash: Prevent cth_surefire hook from crashing if previous hook returns fail or skip. OTP-11811
Diffstat (limited to 'lib/common_test/src')
-rw-r--r--lib/common_test/src/cth_conn_log.erl1
-rw-r--r--lib/common_test/src/cth_surefire.erl4
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),