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(update_config_cth). 23 24 25-include_lib("common_test/src/ct_util.hrl"). 26-include_lib("common_test/include/ct_event.hrl"). 27 28-define(now, ct_test_support:unique_timestamp()). 29 30%% CT Hooks 31-compile(export_all). 32 33init(Id, Opts) -> 34 empty_cth:init(Id, Opts). 35 36pre_init_per_suite(Suite, Config, State) -> 37 empty_cth:pre_init_per_suite(Suite,Config,State), 38 {[{pre_init_per_suite,?now}|Config],State}. 39 40post_init_per_suite(Suite,Config,Return,State) -> 41 empty_cth:post_init_per_suite(Suite,Config,Return,State), 42 {[{post_init_per_suite,?now}|Return],State}. 43 44pre_end_per_suite(Suite,Config,State) -> 45 empty_cth:pre_end_per_suite(Suite,Config,State), 46 {[{pre_end_per_suite,?now}|Config],State}. 47 48post_end_per_suite(Suite,Config,Return,State) -> 49 empty_cth:post_end_per_suite(Suite,Config,Return,State), 50 NewConfig = [{post_end_per_suite,?now}|Config], 51 {NewConfig,NewConfig}. 52 53pre_init_per_group(Suite, Group,Config,State) -> 54 empty_cth:pre_init_per_group(Suite,Group,Config,State), 55 {[{pre_init_per_group,?now}|Config],State}. 56 57post_init_per_group(Suite,Group,Config,Return,State) -> 58 empty_cth:post_init_per_group(Suite,Group,Config,Return,State), 59 {[{post_init_per_group,?now}|Return],State}. 60 61pre_end_per_group(Suite,Group,Config,State) -> 62 empty_cth:pre_end_per_group(Suite,Group,Config,State), 63 {[{pre_end_per_group,?now}|Config],State}. 64 65post_end_per_group(Suite,Group,Config,Return,State) -> 66 empty_cth:post_end_per_group(Suite,Group,Config,Return,State), 67 {[{post_end_per_group,?now}|Config],State}. 68 69pre_init_per_testcase(Suite,TC,Config,State) -> 70 empty_cth:pre_init_per_testcase(Suite,TC,Config,State), 71 {[{pre_init_per_testcase,?now}|Config],State}. 72 73post_init_per_testcase(Suite,TC,Config,Return,State) -> 74 empty_cth:post_init_per_testcase(Suite,TC,Config,Return,State), 75 {[{post_init_per_testcase,?now}|Config],State}. 76 77pre_end_per_testcase(Suite,TC,Config,State) -> 78 empty_cth:pre_end_per_testcase(Suite,TC,Config,State), 79 {[{pre_end_per_testcase,?now}|Config],State}. 80 81post_end_per_testcase(Suite,TC,Config,Return,State) -> 82 empty_cth:post_end_per_testcase(Suite,TC,Config,Return,State), 83 {[{post_end_per_testcase,?now}|Config],State}. 84 85on_tc_fail(Suite,TC, Reason, State) -> 86 empty_cth:on_tc_fail(Suite,TC,Reason,State). 87 88on_tc_skip(Suite,TC, Reason, State) -> 89 empty_cth:on_tc_skip(Suite,TC,Reason,State). 90 91terminate(State) -> 92 empty_cth:terminate(State). 93