diff options
author | Zandra <[email protected]> | 2016-04-18 16:09:56 +0200 |
---|---|---|
committer | Zandra <[email protected]> | 2016-04-27 13:36:11 +0200 |
commit | 6452c3c2a8ccadd10403df3415015311515e1fa6 (patch) | |
tree | d7fdae8d634275569aec917aeb3d77becc89ebbe /lib/common_test/src/cth_surefire.erl | |
parent | fea24ae8d37b33e97ef1897d0d3b6cdb2338c051 (diff) | |
download | otp-6452c3c2a8ccadd10403df3415015311515e1fa6.tar.gz otp-6452c3c2a8ccadd10403df3415015311515e1fa6.tar.bz2 otp-6452c3c2a8ccadd10403df3415015311515e1fa6.zip |
fix cht_surefire bug when pre_init_per_suite fails
When pre_init_per_suite fails before reaching the cth_surefire
pre_init_per_suite unexpected XML was produced. This commit fixes
that.
Diffstat (limited to 'lib/common_test/src/cth_surefire.erl')
-rw-r--r-- | lib/common_test/src/cth_surefire.erl | 3 |
1 files changed, 2 insertions, 1 deletions
diff --git a/lib/common_test/src/cth_surefire.erl b/lib/common_test/src/cth_surefire.erl index 31a8e1c076..d6e855c02c 100644 --- a/lib/common_test/src/cth_surefire.erl +++ b/lib/common_test/src/cth_surefire.erl @@ -82,7 +82,8 @@ init(Path, Opts) -> url_base = proplists:get_value(url_base,Opts), timer = ?now }. -pre_init_per_suite(Suite,SkipOrFail,State) when is_tuple(SkipOrFail) -> +pre_init_per_suite(Suite,SkipOrFail,#state{ test_cases = [] } = State) + when is_tuple(SkipOrFail) -> {SkipOrFail, init_tc(State#state{curr_suite = Suite, curr_suite_ts = ?now}, SkipOrFail) }; |