aboutsummaryrefslogtreecommitdiffstats
path: root/lib
diff options
context:
space:
mode:
authorMicael Karlberg <[email protected]>2011-11-09 18:43:56 +0100
committerMicael Karlberg <[email protected]>2011-11-09 18:43:56 +0100
commit26bc99756aec24a3a3ddbbf214aa14fe4a8e0d4e (patch)
tree9b898e19fdfca6a08a2a10f3b2856ab993dd8d4b /lib
parent1a87cd90774b0b17e6e197a94c20dcbcb1f6a4cb (diff)
downloadotp-26bc99756aec24a3a3ddbbf214aa14fe4a8e0d4e.tar.gz
otp-26bc99756aec24a3a3ddbbf214aa14fe4a8e0d4e.tar.bz2
otp-26bc99756aec24a3a3ddbbf214aa14fe4a8e0d4e.zip
More merge cleanup.
Diffstat (limited to 'lib')
-rw-r--r--lib/inets/test/httpc_SUITE.erl36
-rw-r--r--lib/inets/test/httpd_basic_SUITE.erl25
2 files changed, 13 insertions, 48 deletions
diff --git a/lib/inets/test/httpc_SUITE.erl b/lib/inets/test/httpc_SUITE.erl
index adea1666b4..be5d100ecc 100644
--- a/lib/inets/test/httpc_SUITE.erl
+++ b/lib/inets/test/httpc_SUITE.erl
@@ -376,10 +376,10 @@ init_per_testcase(Case, Timeout, Config) ->
end,
%% This will fail for the ipv6_ - cases (but that is ok)
- httpc:set_options([{proxy, {{?PROXY, ?PROXY_PORT},
- ["localhost", ?IPV6_LOCAL_HOST]}},
- {ipfamily, inet6fb4}]),
-
+ ProxyExceptions = ["localhost", ?IPV6_LOCAL_HOST],
+ http:set_options([{proxy, {{?PROXY, ?PROXY_PORT}, ProxyExceptions}}]),
+ inets:enable_trace(max, io, httpc),
+ %% inets:enable_trace(max, io, all),
%% snmp:set_trace([gen_tcp]),
NewConfig.
@@ -396,13 +396,6 @@ init_per_testcase_ssl(Tag, PrivDir, SslConfFile, Config) ->
tsp("init_per_testcase(~w) -> Server: ~p", [Tag, Server]),
[{local_ssl_server, Server} | Config2].
- ProxyExceptions = ["localhost", ?IPV6_LOCAL_HOST],
- http:set_options([{proxy, {{?PROXY, ?PROXY_PORT}, ProxyExceptions}}]),
- inets:enable_trace(max, io, httpc),
- %% inets:enable_trace(max, io, all),
- %% snmp:set_trace([gen_tcp, inet_tcp, prim_inet]),
- NewConfig.
-
start_http_server(ConfDir, ConfFile) ->
inets_test_lib:start_http_server( filename:join(ConfDir, ConfFile) ).
@@ -3522,23 +3515,9 @@ p(F, A) ->
io:format("~p ~w:" ++ F ++ "~n", [self(), ?MODULE | A]).
tsp(F) ->
- tsp(F, []).
+ inets_test_lib:tsp(F).
tsp(F, A) ->
- Timestamp = formated_timestamp(),
- test_server:format("** ~s ** ~p ~p:" ++ F ++ "~n",
- [Timestamp, self(), ?MODULE | A]).
-
-formated_timestamp() ->
- format_timestamp( os:timestamp() ).
-
-format_timestamp({_N1, _N2, N3} = Now) ->
- {Date, Time} = calendar:now_to_datetime(Now),
- {YYYY,MM,DD} = Date,
- {Hour,Min,Sec} = Time,
- FormatDate =
- io_lib:format("~.4w:~.2.0w:~.2.0w ~.2.0w:~.2.0w:~.2.0w 4~w",
- [YYYY,MM,DD,Hour,Min,Sec,round(N3/1000)]),
- lists:flatten(FormatDate).
+ inets_test_lib:tsp(F, A).
tsf(Reason) ->
test_server:fail(Reason).
@@ -3593,3 +3572,6 @@ ensure_started(App) when is_atom(App) ->
throw({error, {failed_starting, App, Error}})
end.
+
+skip(Reason) ->
+ {skip, Reason}.
diff --git a/lib/inets/test/httpd_basic_SUITE.erl b/lib/inets/test/httpd_basic_SUITE.erl
index 355f81da17..4cd38f2ec4 100644
--- a/lib/inets/test/httpd_basic_SUITE.erl
+++ b/lib/inets/test/httpd_basic_SUITE.erl
@@ -272,29 +272,12 @@ find_URL_path([_ | Rest]) ->
tsp(F) ->
- tsp(F, []).
+ inets_test_lib:tsp(F).
tsp(F, A) ->
- test_server:format("~p ~p:" ++ F ++ "~n", [self(), ?MODULE | A]).
+ inets_test_lib:tsp(F, A).
-
-tsp(F) ->
- tsp(F, []).
-tsp(F, A) ->
- Timestamp = formated_timestamp(),
- test_server:format("** ~s ** ~p ~p:" ++ F ++ "~n",
- [Timestamp, self(), ?MODULE | A]).
-
-formated_timestamp() ->
- format_timestamp( os:timestamp() ).
-
-format_timestamp({_N1, _N2, N3} = Now) ->
- {Date, Time} = calendar:now_to_datetime(Now),
- {YYYY,MM,DD} = Date,
- {Hour,Min,Sec} = Time,
- FormatDate =
- io_lib:format("~.4w:~.2.0w:~.2.0w ~.2.0w:~.2.0w:~.2.0w 4~w",
- [YYYY,MM,DD,Hour,Min,Sec,round(N3/1000)]),
- lists:flatten(FormatDate).
+tsf(Reason) ->
+ test_server:fail(Reason).
skip(Reason) ->