~ubuntu-branches/debian/squeeze/erlang/squeeze

« back to all changes in this revision

Viewing changes to lib/inets/test/inets_test_lib.hrl

  • Committer: Bazaar Package Importer
  • Author(s): Sergei Golovan
  • Date: 2010-03-09 17:34:57 UTC
  • mfrom: (10.1.2 sid)
  • Revision ID: james.westby@ubuntu.com-20100309173457-4yd6hlcb2osfhx31
Tags: 1:13.b.4-dfsg-3
Manpages in section 1 are needed even if only arch-dependent packages are
built. So, re-enabled them.

Show diffs side-by-side

added added

removed removed

Lines of Context:
 
1
%%
 
2
%% %CopyrightBegin%
 
3
%% 
 
4
%% Copyright Ericsson AB 2001-2009. All Rights Reserved.
 
5
%% 
 
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/.
 
11
%% 
 
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
 
15
%% under the License.
 
16
%% 
 
17
%% %CopyrightEnd%
 
18
%%
 
19
%%
 
20
%%----------------------------------------------------------------------
 
21
%% Purpose: Define common macros for testing
 
22
%%----------------------------------------------------------------------
 
23
 
 
24
%% - Print macros - 
 
25
 
 
26
-ifdef(inets_debug).
 
27
-define(DEBUG(F,A), inets_test_lib:debug(F, A, ?MODULE, ?LINE)).
 
28
-else.
 
29
-define(DEBUG(F,A),ok).
 
30
-endif.
 
31
 
 
32
-ifdef(inets_log).
 
33
-define(LOG(F,A),   inets_test_lib:log(F, A, ?MODULE, ?LINE)).
 
34
-else.
 
35
-define(LOG(F,A),ok).
 
36
-endif.
 
37
 
 
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)).
 
40
 
 
41
 
 
42
%% - Macros stolen from the test server -
 
43
 
 
44
-ifndef(line).
 
45
-define(line,put(test_server_loc,{?MODULE,?LINE}),).
 
46
-endif.
 
47
 
 
48
 
 
49
%% - Test case macros -
 
50
 
 
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)).
 
54
 
 
55
-define(NON_PC_TC_MAYBE_SKIP(Config, Condition),
 
56
        inets_test_lib:non_pc_tc_maybe_skip(Config, Condition, ?MODULE, ?LINE)).
 
57
 
 
58
 
 
59
 
 
60
%% - Misc macros -
 
61
 
 
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)).
 
66
 
 
67
 
 
68
%% - Test case macros - 
 
69
 
 
70
-define(SKIP(Reason),   inets_test_lib:skip(Reason)).
 
71
-define(FAIL(Reason),   inets_test_lib:fail(Reason, ?MODULE, ?LINE)).
 
72
 
 
73
 
 
74
%% - Socket macros -
 
75
 
 
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)).
 
80
 
 
81
 
 
82
%% - Time macros -
 
83
 
 
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)).
 
87
 
 
88
-define(WD_START(T),    inets_test_lib:watchdog_start(T)).
 
89
-define(WD_STOP(P),     inets_test_lib:watchdog_stop(P)).
 
90
 
 
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)).
 
94
 
 
95
 
 
96
%% - Process utility macros - 
 
97
 
 
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)).
 
101
 
 
102
 
 
103
 
 
104