diff options
author | Siri Hansen <[email protected]> | 2017-01-25 11:24:58 +0100 |
---|---|---|
committer | Siri Hansen <[email protected]> | 2017-02-20 12:40:08 +0100 |
commit | a95a22017523229bb8924afbd928d3e16b564fa5 (patch) | |
tree | da620b3a4b0e58bbabb5881556e4043cafceb1c2 /lib/common_test/test/ct_hooks_SUITE_data/cth/tests/minimal_terminate_cth.erl | |
parent | d64fa0f13cd07b48291d1ab3b843c411aaf8451d (diff) | |
download | otp-a95a22017523229bb8924afbd928d3e16b564fa5.tar.gz otp-a95a22017523229bb8924afbd928d3e16b564fa5.tar.bz2 otp-a95a22017523229bb8924afbd928d3e16b564fa5.zip |
[ct] Add Suite argument to hook callback functions
An extra argument, Suite, is added as the first argument to each of
the following hook callback functions:
- pre_init_per_group
- post_init_per_group
- pre_end_per_group
- post_end_per_group
- pre_init_per_testcase
- post_init_per_testcase
- pre_end_per_testcase
- post_end_per_testcase
- on_tc_fail
- on_tc_skip
For backwards compatibility, if the new function is not exported from
a hook callback module, common_test will fall back to the old
interface and call the function without the Suite argument.
The reason for adding the new argument is that if a test suite is
skipped by a 'skip_suites' statement in the test specification, then
there will be no call to pre/post_init_per_suite, and thus the hook
has no other way of knowing which Suite is skipped when it gets the
on_tc_skip callback. The other callbacks are updated for symmetry.
Diffstat (limited to 'lib/common_test/test/ct_hooks_SUITE_data/cth/tests/minimal_terminate_cth.erl')
-rw-r--r-- | lib/common_test/test/ct_hooks_SUITE_data/cth/tests/minimal_terminate_cth.erl | 6 |
1 files changed, 3 insertions, 3 deletions
diff --git a/lib/common_test/test/ct_hooks_SUITE_data/cth/tests/minimal_terminate_cth.erl b/lib/common_test/test/ct_hooks_SUITE_data/cth/tests/minimal_terminate_cth.erl index b49cbe7fb4..679f076f3a 100644 --- a/lib/common_test/test/ct_hooks_SUITE_data/cth/tests/minimal_terminate_cth.erl +++ b/lib/common_test/test/ct_hooks_SUITE_data/cth/tests/minimal_terminate_cth.erl @@ -29,13 +29,13 @@ %% CT Hooks -export([init/2]). -export([terminate/1]). --export([on_tc_skip/3]). +-export([on_tc_skip/4]). init(Id, Opts) -> empty_cth:init(Id, Opts). -on_tc_skip(TC, Reason, State) -> - empty_cth:on_tc_skip(TC,Reason,State). +on_tc_skip(Suite, TC, Reason, State) -> + empty_cth:on_tc_skip(Suite,TC,Reason,State). terminate(State) -> empty_cth:terminate(State). |