4
%% Copyright Ericsson AB 2001-2009. All Rights Reserved.
6
%% The contents of this file are subject to the Erlang Public License,
7
%% Version 1.1, (the "License"); you may not use this file except in
8
%% compliance with the License. You should have received a copy of the
9
%% Erlang Public License along with this software. If not, it can be
10
%% retrieved online at http://www.erlang.org/.
12
%% Software distributed under the License is distributed on an "AS IS"
13
%% basis, WITHOUT WARRANTY OF ANY KIND, either express or implied. See
14
%% the License for the specific language governing rights and limitations
20
%%----------------------------------------------------------------------
21
%% Purpose: Define common macros for testing
22
%%----------------------------------------------------------------------
27
-define(DEBUG(F,A), inets_test_lib:debug(F, A, ?MODULE, ?LINE)).
29
-define(DEBUG(F,A),ok).
33
-define(LOG(F,A), inets_test_lib:log(F, A, ?MODULE, ?LINE)).
38
-define(INFO(F,A), inets_test_lib:info(F, A, ?MODULE, ?LINE)).
39
-define(PRINT(F,A), inets_test_lib:print(F, A, ?MODULE, ?LINE)).
42
%% - Macros stolen from the test server -
45
-define(line,put(test_server_loc,{?MODULE,?LINE}),).
49
%% - Test case macros -
51
-define(EXPANDABLE(I, C, F), inets_test_lib:expandable(I, C, F)).
52
-define(OS_BASED_SKIP(Skippable),
53
inets_test_lib:os_based_skip(Skippable)).
55
-define(NON_PC_TC_MAYBE_SKIP(Config, Condition),
56
inets_test_lib:non_pc_tc_maybe_skip(Config, Condition, ?MODULE, ?LINE)).
62
-define(UPDATE(K,V,C), inets_test_lib:update_config(K,V,C)).
63
-define(CONFIG(K,C), inets_test_lib:get_config(K,C)).
64
-define(HOSTNAME(), inets_test_lib:hostname()).
65
-define(SZ(X), inets_test_lib:sz(X)).
68
%% - Test case macros -
70
-define(SKIP(Reason), inets_test_lib:skip(Reason)).
71
-define(FAIL(Reason), inets_test_lib:fail(Reason, ?MODULE, ?LINE)).
76
-define(CONNECT(M,H,P), inets_test_lib:connect(M,H,P)).
77
-define(SEND(M,S,D), inets_test_lib:send(M,S,D)).
78
-define(CSEND(M,S,D,C,T), inets_test_lib:csend(M,S,D,C,T)).
79
-define(CLOSE(M,S), inets_test_lib:close(M,S)).
84
-define(HOURS(N), inets_test_lib:hours(N)).
85
-define(MINS(N), inets_test_lib:minutes(N)).
86
-define(SECS(N), inets_test_lib:seconds(N)).
88
-define(WD_START(T), inets_test_lib:watchdog_start(T)).
89
-define(WD_STOP(P), inets_test_lib:watchdog_stop(P)).
91
-define(SLEEP(MSEC), inets_test_lib:sleep(MSEC)).
92
-define(M(), inets_test_lib:millis()).
93
-define(MDIFF(A,B), inets_test_lib:millis_diff(A,B)).
96
%% - Process utility macros -
98
-define(FLUSH(), inets_test_lib:flush_mqueue()).
99
-define(ETRAP_GET(), inets_test_lib:trap_exit()).
100
-define(ETRAP_SET(O), inets_test_lib:trap_exit(O)).