1%%
2%% %CopyrightBegin%
3%%
4%% Copyright Ericsson AB 2015-2016. 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-module(dialyzer_SUITE).
21
22-include_lib("common_test/include/ct.hrl").
23
24%% Default timetrap timeout (set in init_per_testcase).
25-define(default_timeout, ?t:minutes(1)).
26-define(application, dialyzer).
27
28%% Test server specific exports
29-export([all/0, suite/0,groups/0,init_per_suite/1, end_per_suite/1,
30	 init_per_group/2,end_per_group/2]).
31-export([init_per_testcase/2, end_per_testcase/2]).
32
33%% Test cases must be exported.
34-export([app_test/1, appup_test/1]).
35
36suite() -> [{ct_hooks,[ts_install_cth]}].
37
38all() ->
39    [app_test, appup_test].
40
41groups() ->
42    [].
43
44init_per_suite(Config) ->
45    Config.
46
47end_per_suite(_Config) ->
48    ok.
49
50init_per_group(_GroupName, Config) ->
51    Config.
52
53end_per_group(_GroupName, Config) ->
54    Config.
55
56
57init_per_testcase(_Case, Config) ->
58    ?line Dog=test_server:timetrap(?default_timeout),
59    [{watchdog, Dog}|Config].
60end_per_testcase(_Case, Config) ->
61    Dog=?config(watchdog, Config),
62    test_server:timetrap_cancel(Dog),
63    ok.
64
65%%%
66%%% Test cases starts here.
67%%%
68
69app_test(doc) ->
70    ["Test that the .app file does not contain any `basic' errors"];
71app_test(suite) ->
72    [];
73app_test(Config) when is_list(Config) ->
74    ?line ?t:app_test(dialyzer).
75
76%% Test that the .appup file does not contain any `basic' errors
77appup_test(Config) when is_list(Config) ->
78    ok = ?t:appup_test(dialyzer).
79