diff options
author | Sverker Eriksson <[email protected]> | 2017-08-30 20:55:08 +0200 |
---|---|---|
committer | Sverker Eriksson <[email protected]> | 2017-08-30 20:55:08 +0200 |
commit | 7c67bbddb53c364086f66260701bc54a61c9659c (patch) | |
tree | 92ab0d4b91d5e2f6e7a3f9d61ea25089e8a71fe0 /lib/inets/test/inets_test_lib.hrl | |
parent | 97dc5e7f396129222419811c173edc7fa767b0f8 (diff) | |
parent | 3b7a6ffddc819bf305353a593904cea9e932e7dc (diff) | |
download | otp-7c67bbddb53c364086f66260701bc54a61c9659c.tar.gz otp-7c67bbddb53c364086f66260701bc54a61c9659c.tar.bz2 otp-7c67bbddb53c364086f66260701bc54a61c9659c.zip |
Merge tag 'OTP-19.0' into sverker/19/binary_to_atom-utf8-crash/ERL-474/OTP-14590
Diffstat (limited to 'lib/inets/test/inets_test_lib.hrl')
-rw-r--r-- | lib/inets/test/inets_test_lib.hrl | 109 |
1 files changed, 11 insertions, 98 deletions
diff --git a/lib/inets/test/inets_test_lib.hrl b/lib/inets/test/inets_test_lib.hrl index 6a86b1b764..d436395290 100644 --- a/lib/inets/test/inets_test_lib.hrl +++ b/lib/inets/test/inets_test_lib.hrl @@ -1,18 +1,19 @@ %% %% %CopyrightBegin% %% -%% Copyright Ericsson AB 2001-2011. All Rights Reserved. +%% Copyright Ericsson AB 2001-2016. All Rights Reserved. %% -%% The contents of this file are subject to the Erlang Public License, -%% Version 1.1, (the "License"); you may not use this file except in -%% compliance with the License. You should have received a copy of the -%% Erlang Public License along with this software. If not, it can be -%% retrieved online at http://www.erlang.org/. +%% Licensed under the Apache License, Version 2.0 (the "License"); +%% you may not use this file except in compliance with the License. +%% You may obtain a copy of the License at %% -%% Software distributed under the License is distributed on an "AS IS" -%% basis, WITHOUT WARRANTY OF ANY KIND, either express or implied. See -%% the License for the specific language governing rights and limitations -%% under the License. +%% http://www.apache.org/licenses/LICENSE-2.0 +%% +%% Unless required by applicable law or agreed to in writing, software +%% distributed under the License is distributed on an "AS IS" BASIS, +%% WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. +%% See the License for the specific language governing permissions and +%% limitations under the License. %% %% %CopyrightEnd% %% @@ -20,96 +21,8 @@ %%---------------------------------------------------------------------- %% Purpose: Define common macros for testing %%---------------------------------------------------------------------- - -%% - Print macros - - --ifdef(inets_debug). --define(DEBUG(F,A), inets_test_lib:debug(F, A, ?MODULE, ?LINE)). --else. --define(DEBUG(F,A),ok). --endif. - --ifdef(inets_log). --define(LOG(F,A), inets_test_lib:log(F, A, ?MODULE, ?LINE)). --else. --define(LOG(F,A),ok). --endif. - --define(INFO(F,A), inets_test_lib:info(F, A, ?MODULE, ?LINE)). --define(PRINT(F,A), inets_test_lib:print(F, A, ?MODULE, ?LINE)). - - -%% - Macros stolen from the test server - - --ifndef(line). --define(line,put(test_server_loc,{?MODULE,?LINE}),). --endif. - - -%% - OS Command and stuff - --define(OSCMD(Cmd), inets_test_lib:oscmd(Cmd)). - --define(PRINT_SYSTEM_INFO(P), inets_test_lib:print_system_info(P)). - --define(RUN_ON_OS(OS, FUN), inets_test_lib:run_on_os(OS, FUN)). --define(RUN_ON_WINDOWS(FUN), inets_test_lib:run_on_windows(FUN)). - - -%% - Test case macros - - --define(EXPANDABLE(I, C, F), inets_test_lib:expandable(I, C, F)). --define(OS_BASED_SKIP(Skippable), - inets_test_lib:os_based_skip(Skippable)). - --define(NON_PC_TC_MAYBE_SKIP(Config, Condition), - inets_test_lib:non_pc_tc_maybe_skip(Config, Condition, ?MODULE, ?LINE)). - - - %% - Misc macros - -define(ENSURE_STARTED(A), inets_test_lib:ensure_started(A)). --define(UPDATE(K,V,C), inets_test_lib:update_config(K,V,C)). --define(CONFIG(K,C), inets_test_lib:get_config(K,C)). --define(HOSTNAME(), inets_test_lib:hostname()). --define(SZ(X), inets_test_lib:sz(X)). - - -%% - Test case macros - - --define(SKIP(Reason), inets_test_lib:skip(Reason, ?MODULE, ?LINE)). --define(FAIL(Reason), inets_test_lib:fail(Reason, ?MODULE, ?LINE)). - - -%% - Socket macros - - --define(CONNECT(M,H,P), inets_test_lib:connect(M,H,P)). --define(SEND(M,S,D), inets_test_lib:send(M,S,D)). --define(CSEND(M,S,D,C,T), inets_test_lib:csend(M,S,D,C,T)). --define(CLOSE(M,S), inets_test_lib:close(M,S)). - - -%% - Time macros - - --define(HOURS(N), inets_test_lib:hours(N)). --define(MINS(N), inets_test_lib:minutes(N)). --define(SECS(N), inets_test_lib:seconds(N)). - --define(WD_START(T), inets_test_lib:watchdog_start(T)). --define(WD_STOP(P), inets_test_lib:watchdog_stop(P)). - --define(SLEEP(MSEC), inets_test_lib:sleep(MSEC)). --define(M(), inets_test_lib:millis()). --define(MDIFF(A,B), inets_test_lib:millis_diff(A,B)). - - -%% - Process utility macros - - --define(FLUSH(), inets_test_lib:flush_mqueue()). --define(ETRAP_GET(), inets_test_lib:trap_exit()). --define(ETRAP_SET(O), inets_test_lib:trap_exit(O)). - - |