1%% 2%% %CopyrightBegin% 3%% 4%% Copyright Ericsson AB 2010-2017. All Rights Reserved. 5%% 6%% Licensed under the Apache License, Version 2.0 (the "License"); 7%% you may not use this file except in compliance with the License. 8%% You may obtain a copy of the License at 9%% 10%% http://www.apache.org/licenses/LICENSE-2.0 11%% 12%% Unless required by applicable law or agreed to in writing, software 13%% distributed under the License is distributed on an "AS IS" BASIS, 14%% WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. 15%% See the License for the specific language governing permissions and 16%% limitations under the License. 17%% 18%% %CopyrightEnd% 19%% 20 21 22-module(state_update_cth). 23 24 25-include_lib("common_test/src/ct_util.hrl"). 26-include_lib("common_test/include/ct_event.hrl"). 27 28%% CT Hooks 29-compile(export_all). 30 31init(Id, Opts) -> 32 State = empty_cth:init(Id, Opts), 33 {ok, [init|State]}. 34 35pre_init_per_suite(Suite, Config, State) -> 36 empty_cth:pre_init_per_suite(Suite,Config,State), 37 {Config, [pre_init_per_suite|State]}. 38 39post_init_per_suite(Suite,Config,Return,State) -> 40 empty_cth:post_init_per_suite(Suite,Config,Return,State), 41 {Config, [post_init_per_suite|State]}. 42 43pre_end_per_suite(Suite,Config,State) -> 44 empty_cth:pre_end_per_suite(Suite,Config,State), 45 {Config, [pre_end_per_suite|State]}. 46 47post_end_per_suite(Suite,Config,Return,State) -> 48 empty_cth:post_end_per_suite(Suite,Config,Return,State), 49 {Return, [post_end_per_suite|State]}. 50 51pre_init_per_group(Suite,Group,Config,State) -> 52 empty_cth:pre_init_per_group(Suite,Group,Config,State), 53 {Config, [pre_init_per_group|State]}. 54 55post_init_per_group(Suite,Group,Config,Return,State) -> 56 empty_cth:post_init_per_group(Suite,Group,Config,Return,State), 57 {Return, [post_init_per_group|State]}. 58 59pre_end_per_group(Suite,Group,Config,State) -> 60 empty_cth:pre_end_per_group(Suite,Group,Config,State), 61 {Config, [pre_end_per_group|State]}. 62 63post_end_per_group(Suite,Group,Config,Return,State) -> 64 empty_cth:post_end_per_group(Suite,Group,Config,Return,State), 65 {Return, [post_end_per_group|State]}. 66 67pre_init_per_testcase(Suite,TC,Config,State) -> 68 empty_cth:pre_init_per_testcase(Suite,TC,Config,State), 69 {Config, [pre_init_per_testcase|State]}. 70 71post_init_per_testcase(Suite,TC,Config,Return,State) -> 72 empty_cth:post_init_per_testcase(Suite,TC,Config,Return,State), 73 {Return, [post_init_per_testcase|State]}. 74 75pre_end_per_testcase(Suite,TC,Config,State) -> 76 empty_cth:pre_end_per_testcase(Suite,TC,Config,State), 77 {Config, [pre_end_per_testcase|State]}. 78 79post_end_per_testcase(Suite,TC,Config,Return,State) -> 80 empty_cth:post_end_per_testcase(Suite,TC,Config,Return,State), 81 {Return, [post_end_per_testcase|State]}. 82 83on_tc_fail(Suite,TC, Reason, State) -> 84 empty_cth:on_tc_fail(Suite,TC,Reason,State), 85 [on_tc_fail|State]. 86 87on_tc_skip(Suite,TC, Reason, State) -> 88 empty_cth:on_tc_skip(Suite,TC,Reason,State), 89 [on_tc_skip|State]. 90 91terminate(State) -> 92 empty_cth:terminate(State). 93