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(fail_post_suite_cth).
23
24
25-include_lib("common_test/src/ct_util.hrl").
26-include_lib("common_test/include/ct_event.hrl").
27
28
29%% CT Hooks
30-compile(export_all).
31
32init(Id, Opts) ->
33    empty_cth:init(Id, Opts).
34
35pre_init_per_suite(Suite, Config, State) ->
36    empty_cth:pre_init_per_suite(Suite,Config,State).
37
38post_init_per_suite(Suite,Config,Return,State) ->
39    empty_cth:post_init_per_suite(Suite,Config,Return,State),
40    {{fail, "Test failure"}, State}.
41
42pre_end_per_suite(Suite,Config,State) ->
43    empty_cth:pre_end_per_suite(Suite,Config,State).
44
45post_end_per_suite(Suite,Config,Return,State) ->
46    empty_cth:post_end_per_suite(Suite,Config,Return,State).
47
48pre_init_per_group(Suite,Group,Config,State) ->
49    empty_cth:pre_init_per_group(Suite,Group,Config,State).
50
51post_init_per_group(Suite,Group,Config,Return,State) ->
52    empty_cth:post_init_per_group(Suite,Group,Config,Return,State).
53
54pre_end_per_group(Suite,Group,Config,State) ->
55    empty_cth:pre_end_per_group(Suite,Group,Config,State).
56
57post_end_per_group(Suite,Group,Config,Return,State) ->
58    empty_cth:post_end_per_group(Suite,Group,Config,Return,State).
59
60pre_init_per_testcase(Suite,TC,Config,State) ->
61    empty_cth:pre_init_per_testcase(Suite,TC,Config,State).
62
63post_end_per_testcase(Suite,TC,Config,Return,State) ->
64    empty_cth:post_end_per_testcase(Suite,TC,Config,Return,State).
65
66on_tc_fail(Suite,TC, Reason, State) ->
67    empty_cth:on_tc_fail(Suite,TC,Reason,State).
68
69on_tc_skip(Suite,TC, Reason, State) ->
70    empty_cth:on_tc_skip(Suite,TC,Reason,State).
71
72terminate(State) ->
73    empty_cth:terminate(State).
74