diff options
author | Micael Karlberg <bmk@erlang.org> | 2011-03-28 14:10:52 +0200 |
---|---|---|
committer | Micael Karlberg <bmk@erlang.org> | 2011-03-28 14:10:52 +0200 |
commit | 6ebe1ea0e4b9bf58f6a27bac75c7c5e700044682 (patch) | |
tree | 9ece8b65d5dae9f47bd5e5bc510cd746b66f3b83 /lib/inets | |
parent | a0ab2e0fa31a2599d0532ef87c944837e96153c0 (diff) | |
download | otp-6ebe1ea0e4b9bf58f6a27bac75c7c5e700044682.tar.gz otp-6ebe1ea0e4b9bf58f6a27bac75c7c5e700044682.tar.bz2 otp-6ebe1ea0e4b9bf58f6a27bac75c7c5e700044682.zip |
A (hopefully) temporary skip of some of the httpc proxy
test cases.
Diffstat (limited to 'lib/inets')
-rw-r--r-- | lib/inets/test/httpc_SUITE.erl | 21 | ||||
-rw-r--r-- | lib/inets/test/inets_test_lib.erl | 11 | ||||
-rw-r--r-- | lib/inets/test/inets_test_lib.hrl | 2 |
3 files changed, 29 insertions, 5 deletions
diff --git a/lib/inets/test/httpc_SUITE.erl b/lib/inets/test/httpc_SUITE.erl index c1a36d23de..d8848412c5 100644 --- a/lib/inets/test/httpc_SUITE.erl +++ b/lib/inets/test/httpc_SUITE.erl @@ -28,6 +28,7 @@ -include("test_server_line.hrl"). -include_lib("kernel/include/file.hrl"). +-include("inets_test_lib.hrl"). %% Note: This directive should only be used in test suites. -compile(export_all). @@ -228,8 +229,8 @@ init_per_testcase_ssl(Tag, PrivDir, SslConfFile, Config) -> [{local_ssl_server, Server} | Config2]. init_per_testcase(Case, Timeout, Config) -> - io:format(user, "~n~n*** INIT ~w:[~w][~w] ***~n~n", - [?MODULE, Timeout, Case]), + io:format(user, "~n~n*** INIT ~w:~w[~w] ***~n~n", + [?MODULE, Case, Timeout]), PrivDir = ?config(priv_dir, Config), tsp("init_per_testcase -> stop inets"), application:stop(inets), @@ -1348,6 +1349,10 @@ proxy_options(doc) -> proxy_options(suite) -> []; proxy_options(Config) when is_list(Config) -> + %% As of 2011-03-24, erlang.org (which is used as server) + %% does no longer run Apache, but instead runs inets, which + %% do not implement "options". + ?SKIP(server_does_not_implement_options), case ?config(skip, Config) of undefined -> case httpc:request(options, {?PROXY_URL, []}, [], []) of @@ -1372,6 +1377,9 @@ proxy_head(doc) -> proxy_head(suite) -> []; proxy_head(Config) when is_list(Config) -> + %% As of 2011-03-24, erlang.org (which is used as server) + %% does no longer run Apache, but instead runs inets. + ?SKIP(tc_and_server_not_compatible), case ?config(skip, Config) of undefined -> case httpc:request(head, {?PROXY_URL, []}, [], []) of @@ -1467,6 +1475,9 @@ proxy_post(doc) -> proxy_post(suite) -> []; proxy_post(Config) when is_list(Config) -> + %% As of 2011-03-24, erlang.org (which is used as server) + %% does no longer run Apache, but instead runs inets. + ?SKIP(tc_and_server_not_compatible), case ?config(skip, Config) of undefined -> case httpc:request(post, {?PROXY_URL, [], @@ -1489,6 +1500,9 @@ proxy_put(doc) -> proxy_put(suite) -> []; proxy_put(Config) when is_list(Config) -> + %% As of 2011-03-24, erlang.org (which is used as server) + %% does no longer run Apache, but instead runs inets. + ?SKIP(tc_and_server_not_compatible), case ?config(skip, Config) of undefined -> case httpc:request(put, {"http://www.erlang.org/foobar.html", [], @@ -1513,6 +1527,9 @@ proxy_delete(doc) -> proxy_delete(suite) -> []; proxy_delete(Config) when is_list(Config) -> + %% As of 2011-03-24, erlang.org (which is used as server) + %% does no longer run Apache, but instead runs inets. + ?SKIP(tc_and_server_not_compatible), case ?config(skip, Config) of undefined -> URL = ?PROXY_URL ++ "/foobar.html", diff --git a/lib/inets/test/inets_test_lib.erl b/lib/inets/test/inets_test_lib.erl index c56a714f5a..c837326bb5 100644 --- a/lib/inets/test/inets_test_lib.erl +++ b/lib/inets/test/inets_test_lib.erl @@ -32,7 +32,7 @@ -export([check_body/1]). -export([millis/0, millis_diff/2, hours/1, minutes/1, seconds/1, sleep/1]). -export([oscmd/1]). --export([non_pc_tc_maybe_skip/4, os_based_skip/1]). +-export([non_pc_tc_maybe_skip/4, os_based_skip/1, skip/3, fail/3]). -export([flush/0]). -export([start_node/1, stop_node/1]). @@ -395,6 +395,13 @@ sleep(MSecs) -> skip(Reason, File, Line) -> exit({skipped, {Reason, File, Line}}). +fail(Reason, File, Line) -> + String = lists:flatten(io_lib:format("Failure ~p(~p): ~p~n", + [File, Line, Reason])), + tsf(String). + + + flush() -> receive Msg -> @@ -407,7 +414,7 @@ flush() -> tsp(F) -> tsp(F, []). tsp(F, A) -> - test_server:format("~p ~p:" ++ F ++ "~n", [self(), ?MODULE | A]). + test_server:format("~p ~p ~p:" ++ F ++ "~n", [node(), self(), ?MODULE | A]). tsf(Reason) -> test_server:fail(Reason). diff --git a/lib/inets/test/inets_test_lib.hrl b/lib/inets/test/inets_test_lib.hrl index 0cdb04139c..cc83a309b5 100644 --- a/lib/inets/test/inets_test_lib.hrl +++ b/lib/inets/test/inets_test_lib.hrl @@ -72,7 +72,7 @@ %% - Test case macros - --define(SKIP(Reason), inets_test_lib:skip(Reason)). +-define(SKIP(Reason), inets_test_lib:skip(Reason, ?MODULE, ?LINE)). -define(FAIL(Reason), inets_test_lib:fail(Reason, ?MODULE, ?LINE)). |