aboutsummaryrefslogtreecommitdiffstats
path: root/lib
diff options
context:
space:
mode:
Diffstat (limited to 'lib')
-rw-r--r--lib/common_test/src/ct_logs.erl30
-rw-r--r--lib/common_test/src/ct_util.erl15
-rw-r--r--lib/common_test/test/ct_test_support.erl14
-rw-r--r--lib/common_test/test/ct_verbosity_SUITE.erl26
-rw-r--r--lib/erl_interface/test/Makefile2
-rw-r--r--lib/erl_interface/test/erl_interface_smoke.spec1
-rw-r--r--lib/ic/test/Makefile2
-rw-r--r--lib/ic/test/ic_smoke.spec1
-rw-r--r--lib/inets/doc/src/httpd.xml6
-rw-r--r--lib/jinterface/test/Makefile2
-rw-r--r--lib/jinterface/test/jinterface_smoke.spec1
-rw-r--r--lib/kernel/test/Makefile2
-rw-r--r--lib/kernel/test/kernel_smoke.spec9
-rw-r--r--lib/os_mon/test/Makefile3
-rw-r--r--lib/os_mon/test/os_mon_smoke.spec3
-rw-r--r--lib/ssl/src/tls_connection.erl14
-rw-r--r--lib/ssl/test/ssl_packet_SUITE.erl24
-rw-r--r--lib/stdlib/doc/src/filelib.xml6
-rw-r--r--lib/test_server/src/ts.erl26
-rw-r--r--lib/test_server/src/ts_benchmark.erl7
-rw-r--r--lib/test_server/src/ts_lib.erl12
-rw-r--r--lib/xmerl/doc/src/xmerl_ug.xmlsrc4
22 files changed, 161 insertions, 49 deletions
diff --git a/lib/common_test/src/ct_logs.erl b/lib/common_test/src/ct_logs.erl
index f5355bfefe..bd37b690b6 100644
--- a/lib/common_test/src/ct_logs.erl
+++ b/lib/common_test/src/ct_logs.erl
@@ -446,6 +446,8 @@ tc_print(Category,Importance,Format,Args) ->
ct_util:get_verbosity('$unspecified');
{error,bad_invocation} ->
?MAX_VERBOSITY;
+ {error,_Failure} ->
+ ?MAX_VERBOSITY;
Val ->
Val
end,
@@ -690,14 +692,15 @@ logger_loop(State) ->
false ->
%% Group leader is dead, so write to the
%% CtLog or unexpected_io log instead
- unexpected_io(Pid,Category,List,State),
+ unexpected_io(Pid,Category,Importance,
+ List,State),
logger_loop(State)
end;
{ct_log,_Fd,TCGLs} ->
%% If category is ct_internal then write
%% to ct_log, else write to unexpected_io
%% log
- unexpected_io(Pid,Category,List,State),
+ unexpected_io(Pid,Category,Importance,List,State),
logger_loop(State#logger_state{
tc_groupleaders = TCGLs})
end;
@@ -798,7 +801,7 @@ print_to_log(sync, FromPid, Category, TCGL, List, State) ->
IoFun = create_io_fun(FromPid, State),
io:format(TCGL,"~ts", [lists:foldl(IoFun, [], List)]);
true ->
- unexpected_io(FromPid,Category,List,State)
+ unexpected_io(FromPid,Category,?MAX_IMPORTANCE,List,State)
end,
State;
@@ -814,7 +817,8 @@ print_to_log(async, FromPid, Category, TCGL, List, State) ->
end;
true ->
fun() ->
- unexpected_io(FromPid,Category,List,State)
+ unexpected_io(FromPid,Category,?MAX_IMPORTANCE,
+ List,State)
end
end,
case State#logger_state.async_print_jobs of
@@ -3066,10 +3070,20 @@ html_encoding(latin1) ->
html_encoding(utf8) ->
"utf-8".
-unexpected_io(Pid,ct_internal,List,#logger_state{ct_log_fd=Fd}=State) ->
+unexpected_io(Pid,ct_internal,_Importance,List,State) ->
IoFun = create_io_fun(Pid,State),
- io:format(Fd, "~ts", [lists:foldl(IoFun, [], List)]);
-unexpected_io(Pid,_Category,List,State) ->
+ io:format(State#logger_state.ct_log_fd, "~ts",
+ [lists:foldl(IoFun, [], List)]);
+unexpected_io(Pid,Category,Importance,List,State) ->
IoFun = create_io_fun(Pid,State),
Data = io_lib:format("~ts", [lists:foldl(IoFun, [], List)]),
- test_server_io:print_unexpected(Data).
+ %% if unexpected io comes in during startup or shutdown, test_server
+ %% might not be running - if so (noproc exit), simply print to
+ %% stdout instead (will result in double printouts when pal is used)
+ try test_server_io:print_unexpected(Data) of
+ _ ->
+ ok
+ catch
+ _:{noproc,_} -> tc_print(Category,Importance,Data,[]);
+ _:Reason -> exit(Reason)
+ end.
diff --git a/lib/common_test/src/ct_util.erl b/lib/common_test/src/ct_util.erl
index 68e76c2396..abda87c2cd 100644
--- a/lib/common_test/src/ct_util.erl
+++ b/lib/common_test/src/ct_util.erl
@@ -286,14 +286,23 @@ get_start_dir() ->
%% handle verbosity outside ct_util_server (let the client read
%% the verbosity table) to avoid possible deadlock situations
set_verbosity(Elem = {_Category,_Level}) ->
- ets:insert(?verbosity_table, Elem),
- ok.
+ try ets:insert(?verbosity_table, Elem) of
+ _ ->
+ ok
+ catch
+ _:Reason ->
+ {error,Reason}
+ end.
+
get_verbosity(Category) ->
- case ets:lookup(?verbosity_table, Category) of
+ try ets:lookup(?verbosity_table, Category) of
[{Category,Level}] ->
Level;
_ ->
undefined
+ catch
+ _:Reason ->
+ {error,Reason}
end.
loop(Mode,TestData,StartDir) ->
diff --git a/lib/common_test/test/ct_test_support.erl b/lib/common_test/test/ct_test_support.erl
index 6bcac12326..4132995bf6 100644
--- a/lib/common_test/test/ct_test_support.erl
+++ b/lib/common_test/test/ct_test_support.erl
@@ -36,6 +36,8 @@
verify_events/3, verify_events/4, reformat/2, log_events/4,
join_abs_dirs/2]).
+-export([start_slave/3, slave_stop/1]).
+
-export([ct_test_halt/1]).
-include_lib("kernel/include/file.hrl").
@@ -66,10 +68,14 @@ init_per_suite(Config, Level) ->
start_slave(Config, Level).
-start_slave(Config,Level) ->
+start_slave(Config, Level) ->
+ start_slave(ct, Config, Level).
+
+start_slave(NodeName, Config, Level) ->
[_,Host] = string:tokens(atom_to_list(node()), "@"),
- test_server:format(0, "Trying to start ~s~n", ["ct@"++Host]),
- case slave:start(Host, ct, []) of
+ test_server:format(0, "Trying to start ~s~n",
+ [atom_to_list(NodeName)++"@"++Host]),
+ case slave:start(Host, NodeName, []) of
{error,Reason} ->
test_server:fail(Reason);
{ok,CTNode} ->
@@ -77,7 +83,7 @@ start_slave(Config,Level) ->
IsCover = test_server:is_cover(),
if IsCover ->
cover:start(CTNode);
- true->
+ true ->
ok
end,
diff --git a/lib/common_test/test/ct_verbosity_SUITE.erl b/lib/common_test/test/ct_verbosity_SUITE.erl
index 32488b1db9..1aa71953ec 100644
--- a/lib/common_test/test/ct_verbosity_SUITE.erl
+++ b/lib/common_test/test/ct_verbosity_SUITE.erl
@@ -53,9 +53,19 @@ init_per_suite(Config) ->
end_per_suite(Config) ->
ct_test_support:end_per_suite(Config).
+init_per_testcase(no_crashing, Config) ->
+ Opts = ct_test_support:start_slave(ctX, Config, 50),
+ XNode = proplists:get_value(ct_node, Opts),
+ ct:pal("Node ~p started!", [XNode]),
+ [{xnode,XNode} | Config];
init_per_testcase(TestCase, Config) ->
ct_test_support:init_per_testcase(TestCase, Config).
+end_per_testcase(no_crashing, Config) ->
+ XNode = proplists:get_value(xnode, Config),
+ ct_test_support:slave_stop(XNode),
+ ct:pal("Node ~p stopped!", [XNode]),
+ ok;
end_per_testcase(TestCase, Config) ->
ct_test_support:end_per_testcase(TestCase, Config).
@@ -72,7 +82,8 @@ all() ->
combine_categories,
testspec_only,
merge_with_testspec,
- possible_deadlock
+ possible_deadlock,
+ no_crashing
].
%%--------------------------------------------------------------------
@@ -189,6 +200,19 @@ possible_deadlock(Config) ->
%%%-----------------------------------------------------------------
+%%%
+no_crashing(Config) ->
+ XNode = proplists:get_value(xnode, Config),
+ ok = rpc:call(XNode, ct, print, ["hello",[]]),
+ ok = rpc:call(XNode, ct, pal, ["hello",[]]),
+ ok = rpc:call(XNode, ct, log, ["hello",[]]),
+ Data = io_lib:format("hello", []),
+ {badrpc,{'EXIT',{noproc,_}}} =
+ (catch rpc:call(XNode, test_server_io, print_unexpected, [Data])),
+ ok.
+
+
+%%%-----------------------------------------------------------------
%%% HELP FUNCTIONS
%%%-----------------------------------------------------------------
diff --git a/lib/erl_interface/test/Makefile b/lib/erl_interface/test/Makefile
index 2b85dfc571..1ed34c74a0 100644
--- a/lib/erl_interface/test/Makefile
+++ b/lib/erl_interface/test/Makefile
@@ -42,7 +42,7 @@ MODULES= \
runner
SPEC_FILES = \
- erl_interface.spec
+ erl_interface.spec erl_interface_smoke.spec
COVER_FILE = erl_interface.cover
diff --git a/lib/erl_interface/test/erl_interface_smoke.spec b/lib/erl_interface/test/erl_interface_smoke.spec
new file mode 100644
index 0000000000..bfaea2b279
--- /dev/null
+++ b/lib/erl_interface/test/erl_interface_smoke.spec
@@ -0,0 +1 @@
+{suites,"../erl_interface_test",[ei_decode_encode_SUITE]}.
diff --git a/lib/ic/test/Makefile b/lib/ic/test/Makefile
index 54ac186c16..63af6ed9f1 100644
--- a/lib/ic/test/Makefile
+++ b/lib/ic/test/Makefile
@@ -33,7 +33,7 @@ RELSYSDIR = $(RELEASE_PATH)/ic_test
# ----------------------------------------------------
# Target Specs
# ----------------------------------------------------
-TEST_SPEC_FILE = ic.spec
+TEST_SPEC_FILE = ic.spec ic_smoke.spec
IDL_FILES =
diff --git a/lib/ic/test/ic_smoke.spec b/lib/ic/test/ic_smoke.spec
new file mode 100644
index 0000000000..ec3b5758b1
--- /dev/null
+++ b/lib/ic/test/ic_smoke.spec
@@ -0,0 +1 @@
+{suites,"../ic_test",[ic_SUITE]}.
diff --git a/lib/inets/doc/src/httpd.xml b/lib/inets/doc/src/httpd.xml
index 3c132d34fa..4210aea3ec 100644
--- a/lib/inets/doc/src/httpd.xml
+++ b/lib/inets/doc/src/httpd.xml
@@ -251,14 +251,14 @@
</item>
<marker id="prop_max_uri"></marker>
- <tag>{max_uri, integer()}</tag>
+ <tag>{max_uri_size, integer()}</tag>
<item>
<p>Limits the size of the HTTP request URI. By
default there is no limit. </p>
</item>
<marker id="prop_max_keep_alive_req"></marker>
- <tag>{max_keep_alive_requests, integer()}</tag>
+ <tag>{max_keep_alive_request, integer()}</tag>
<item>
<p>The number of request that a client can do on one
connection. When the server has responded to the number of
@@ -632,7 +632,7 @@ bytes
</item>
<marker id="prop_edlog"></marker>
- <tag>{error_disk_log, internal | external}</tag>
+ <tag>{error_disk_log, path()}</tag>
<item>
<p>Defines the filename of the (disk_log(3)) error log file
to be used to log server errors. If the filename does not begin
diff --git a/lib/jinterface/test/Makefile b/lib/jinterface/test/Makefile
index d9ff406994..90d4e01035 100644
--- a/lib/jinterface/test/Makefile
+++ b/lib/jinterface/test/Makefile
@@ -32,7 +32,7 @@ RELSYSDIR = $(RELEASE_PATH)/jinterface_test
# ----------------------------------------------------
# Target Specs
# ----------------------------------------------------
-TEST_SPEC_FILE = jinterface.spec
+TEST_SPEC_FILE = jinterface.spec jinterface_smoke.spec
COVER_FILE = jinterface.cover
MODULES = nc_SUITE \
diff --git a/lib/jinterface/test/jinterface_smoke.spec b/lib/jinterface/test/jinterface_smoke.spec
new file mode 100644
index 0000000000..4a76cce4cd
--- /dev/null
+++ b/lib/jinterface/test/jinterface_smoke.spec
@@ -0,0 +1 @@
+{cases,"../jinterface_test",jinterface_SUITE,[java_erlang_send_receive]}.
diff --git a/lib/kernel/test/Makefile b/lib/kernel/test/Makefile
index cb11d4e899..f1b8a105ed 100644
--- a/lib/kernel/test/Makefile
+++ b/lib/kernel/test/Makefile
@@ -145,7 +145,7 @@ release_tests_spec: make_emakefile
$(INSTALL_DIR) "$(RELSYSDIR)"
$(INSTALL_DATA) $(ERL_FILES) "$(RELSYSDIR)"
$(INSTALL_DATA) $(APP_FILES) "$(RELSYSDIR)"
- $(INSTALL_DATA) kernel.spec $(EMAKEFILE)\
+ $(INSTALL_DATA) kernel.spec kernel_smoke.spec $(EMAKEFILE)\
$(COVERFILE) "$(RELSYSDIR)"
chmod -R u+w "$(RELSYSDIR)"
@tar cf - *_SUITE_data | (cd "$(RELSYSDIR)"; tar xf -)
diff --git a/lib/kernel/test/kernel_smoke.spec b/lib/kernel/test/kernel_smoke.spec
new file mode 100644
index 0000000000..e5d8273c56
--- /dev/null
+++ b/lib/kernel/test/kernel_smoke.spec
@@ -0,0 +1,9 @@
+{config, "../test_server/ts.config"}.
+{config, "../test_server/ts.unix.config"}.
+
+{cases,"../kernel_test", inet_SUITE,[t_gethostbyaddr,t_gethostbyname,
+ t_gethostbyaddr_v6,t_gethostbyname_v6,t_gethostnative,getifaddrs]}.
+{cases,"../kernel_test", inet_res_SUITE,[gethostbyaddr,gethostbyname,
+ gethostbyaddr_v6,gethostbyname_v6,basic]}.
+{cases,"../kernel_test", gen_tcp_echo_SUITE,[active_echo]}.
+{cases,"../kernel_test", heart_SUITE,[reboot]}.
diff --git a/lib/os_mon/test/Makefile b/lib/os_mon/test/Makefile
index 461bebc102..cbb014324d 100644
--- a/lib/os_mon/test/Makefile
+++ b/lib/os_mon/test/Makefile
@@ -85,7 +85,8 @@ release_spec:
release_tests_spec: make_emakefile
$(INSTALL_DIR) "$(RELSYSDIR)"
- $(INSTALL_DATA) os_mon.spec os_mon.cover $(EMAKEFILE) $(SOURCE) "$(RELSYSDIR)"
+ $(INSTALL_DATA) os_mon.spec os_mon.cover os_mon_smoke.spec \
+ $(EMAKEFILE) $(SOURCE) "$(RELSYSDIR)"
$(INSTALL_DATA) os_mon_mib_SUITE.cfg "$(RELSYSDIR)"
## tar chf - *_SUITE_data | (cd "$(RELSYSDIR)"; tar xf -)
diff --git a/lib/os_mon/test/os_mon_smoke.spec b/lib/os_mon/test/os_mon_smoke.spec
new file mode 100644
index 0000000000..6f0d02494b
--- /dev/null
+++ b/lib/os_mon/test/os_mon_smoke.spec
@@ -0,0 +1,3 @@
+{cases,"../os_mon_test",disksup_SUITE,[api]}.
+{cases,"../os_mon_test",cpu_sup_SUITE,[load_api,util_api]}.
+{cases,"../os_mon_test",memsup_SUITE,[api]}. \ No newline at end of file
diff --git a/lib/ssl/src/tls_connection.erl b/lib/ssl/src/tls_connection.erl
index 246fecf34a..51551eab11 100644
--- a/lib/ssl/src/tls_connection.erl
+++ b/lib/ssl/src/tls_connection.erl
@@ -978,7 +978,7 @@ handle_sync_event(negotiated_next_protocol, _From, StateName, #state{next_protoc
handle_sync_event(negotiated_next_protocol, _From, StateName, #state{next_protocol = NextProtocol} = State) ->
{reply, {ok, NextProtocol}, StateName, State, get_timeout(State)};
-handle_sync_event({set_opts, Opts0}, _From, StateName,
+handle_sync_event({set_opts, Opts0}, _From, StateName0,
#state{socket_options = Opts1,
socket = Socket,
transport_cb = Transport,
@@ -987,11 +987,12 @@ handle_sync_event({set_opts, Opts0}, _From, StateName,
State1 = State0#state{socket_options = Opts},
if
Opts#socket_options.active =:= false ->
- {reply, Reply, StateName, State1, get_timeout(State1)};
+ {reply, Reply, StateName0, State1, get_timeout(State1)};
Buffer =:= <<>>, Opts1#socket_options.active =:= false ->
%% Need data, set active once
{Record, State2} = next_record_if_active(State1),
- case next_state(StateName, StateName, Record, State2) of
+ %% Note: Renogotiation may cause StateName0 =/= StateName
+ case next_state(StateName0, StateName0, Record, State2) of
{next_state, StateName, State, Timeout} ->
{reply, Reply, StateName, State, Timeout};
{stop, Reason, State} ->
@@ -999,13 +1000,14 @@ handle_sync_event({set_opts, Opts0}, _From, StateName,
end;
Buffer =:= <<>> ->
%% Active once already set
- {reply, Reply, StateName, State1, get_timeout(State1)};
+ {reply, Reply, StateName0, State1, get_timeout(State1)};
true ->
case read_application_data(<<>>, State1) of
Stop = {stop,_,_} ->
Stop;
{Record, State2} ->
- case next_state(StateName, StateName, Record, State2) of
+ %% Note: Renogotiation may cause StateName0 =/= StateName
+ case next_state(StateName0, StateName0, Record, State2) of
{next_state, StateName, State, Timeout} ->
{reply, Reply, StateName, State, Timeout};
{stop, Reason, State} ->
@@ -2458,7 +2460,7 @@ do_format_reply(list, _,_, Data) ->
binary_to_list(Data).
header(0, <<>>) ->
- [];
+ <<>>;
header(_, <<>>) ->
[];
header(0, Binary) ->
diff --git a/lib/ssl/test/ssl_packet_SUITE.erl b/lib/ssl/test/ssl_packet_SUITE.erl
index 36f7af784d..d50498f547 100644
--- a/lib/ssl/test/ssl_packet_SUITE.erl
+++ b/lib/ssl/test/ssl_packet_SUITE.erl
@@ -1631,8 +1631,8 @@ header_decode_one_byte_active(Config) when is_list(Config) ->
{from, self()},
{mfa, {?MODULE, client_header_decode_active,
[Data, [11 | <<"Hello world">> ]]}},
- {options, [{active, true}, {header, 1},
- binary | ClientOpts]}]),
+ {options, [{active, true}, binary, {header, 1}
+ | ClientOpts]}]),
ssl_test_lib:check_result(Server, ok, Client, ok),
@@ -1688,7 +1688,7 @@ header_decode_two_bytes_two_sent_active(Config) when is_list(Config) ->
Server = ssl_test_lib:start_server([{node, ClientNode}, {port, 0},
{from, self()},
{mfa, {?MODULE, server_header_decode_active,
- [Data, [$H, $e]]}},
+ [Data, [$H, $e | <<>>]]}},
{options, [{active, true}, binary,
{header,2}|ServerOpts]}]),
@@ -1697,7 +1697,7 @@ header_decode_two_bytes_two_sent_active(Config) when is_list(Config) ->
{host, Hostname},
{from, self()},
{mfa, {?MODULE, client_header_decode_active,
- [Data, [$H, $e]]}},
+ [Data, [$H, $e | <<>>]]}},
{options, [{active, true}, {header, 2},
binary | ClientOpts]}]),
@@ -1765,8 +1765,8 @@ header_decode_one_byte_passive(Config) when is_list(Config) ->
{from, self()},
{mfa, {?MODULE, client_header_decode_passive,
[Data, [11 | <<"Hello world">> ]]}},
- {options, [{active, false}, {header, 1},
- binary | ClientOpts]}]),
+ {options, [{active, false}, binary, {header, 1}
+ | ClientOpts]}]),
ssl_test_lib:check_result(Server, ok, Client, ok),
@@ -1822,7 +1822,7 @@ header_decode_two_bytes_two_sent_passive(Config) when is_list(Config) ->
Server = ssl_test_lib:start_server([{node, ClientNode}, {port, 0},
{from, self()},
{mfa, {?MODULE, server_header_decode_passive,
- [Data, [$H, $e]]}},
+ [Data, [$H, $e | <<>>]]}},
{options, [{active, false}, binary,
{header,2}|ServerOpts]}]),
@@ -1831,7 +1831,7 @@ header_decode_two_bytes_two_sent_passive(Config) when is_list(Config) ->
{host, Hostname},
{from, self()},
{mfa, {?MODULE, client_header_decode_passive,
- [Data, [$H, $e]]}},
+ [Data, [$H, $e | <<>>]]}},
{options, [{active, false}, {header, 2},
binary | ClientOpts]}]),
@@ -2124,10 +2124,14 @@ client_header_decode_passive(Socket, Packet, Result) ->
%% option and the bitsynax makes it obsolete!
check_header_result([Byte1 | _], [Byte1]) ->
ok;
+check_header_result([Byte1 | _], [Byte1| <<>>]) ->
+ ok;
check_header_result([Byte1, Byte2 | _], [Byte1, Byte2]) ->
ok;
-check_header_result(_,Got) ->
- exit({?LINE, Got}).
+check_header_result([Byte1, Byte2 | _], [Byte1, Byte2 | <<>>]) ->
+ ok;
+check_header_result(Expected,Got) ->
+ exit({?LINE, {Expected, Got}}).
server_line_packet_decode(Socket, Packet) when is_binary(Packet) ->
[L1, L2] = string:tokens(binary_to_list(Packet), "\n"),
diff --git a/lib/stdlib/doc/src/filelib.xml b/lib/stdlib/doc/src/filelib.xml
index bd780b2b2f..d24d17be80 100644
--- a/lib/stdlib/doc/src/filelib.xml
+++ b/lib/stdlib/doc/src/filelib.xml
@@ -49,6 +49,12 @@
<datatype>
<name name="dirname"/>
</datatype>
+ <datatype>
+ <name name="dirname_all"/>
+ </datatype>
+ <datatype>
+ <name name="filename_all"/>
+ </datatype>
</datatypes>
<funcs>
diff --git a/lib/test_server/src/ts.erl b/lib/test_server/src/ts.erl
index 4e5dc1b759..8e71c69d35 100644
--- a/lib/test_server/src/ts.erl
+++ b/lib/test_server/src/ts.erl
@@ -28,6 +28,7 @@
tests/0, tests/1,
install/0, install/1,
bench/0, bench/1, bench/2, benchmarks/0,
+ smoke_test/0, smoke_test/1,smoke_test/2, smoke_tests/0,
estone/0, estone/1,
cross_cover_analyse/1,
compile_testcases/0, compile_testcases/1,
@@ -174,6 +175,13 @@ help(installed) ->
" ts:bench(Spec) - Runs all benchmarks in the given spec file.\n"
" The spec file is actually ../*_test/Spec_bench.spec\n\n"
" ts:bench can take the same Options argument as ts:run.\n"
+ "Smoke test functions:\n"
+ " ts:smoke_tests() - Get all available families of smoke tests\n"
+ " ts:smoke_test() - Runs all smoke tests\n"
+ " ts:smoke_test(Spec)\n"
+ " - Runs all smoke tests in the given spec file.\n"
+ " The spec file is actually ../*_test/Spec_smoke.spec\n\n"
+ " ts:smoke_test can take the same Options argument as ts:run.\n"
"\n"
"Installation (already done):\n"
],
@@ -258,6 +266,7 @@ run(List, Opts) when is_list(List), is_list(Opts) ->
%% Runs one test spec with Options
run(Testspec, Config) when is_atom(Testspec), is_list(Config) ->
Options=check_test_get_opts(Testspec, Config),
+ IsSmoke=proplists:get_value(smoke,Config),
File=atom_to_list(Testspec),
WhatToDo =
case Testspec of
@@ -293,6 +302,8 @@ run(Testspec, Config) when is_atom(Testspec), is_list(Config) ->
case WhatToDo of
skip ->
create_skip_spec(Testspec, tests(Testspec));
+ test when IsSmoke ->
+ File++"_smoke.spec";
test ->
File++".spec"
end,
@@ -507,7 +518,22 @@ bench(Specs, Opts) ->
benchmarks() ->
ts_benchmark:benchmarks().
+smoke_test() ->
+ smoke_test([]).
+smoke_test(Opts) when is_list(Opts) ->
+ smoke_test(smoke_tests(),Opts);
+smoke_test(Spec) ->
+ smoke_test([Spec],[]).
+
+smoke_test(Spec, Opts) when is_atom(Spec) ->
+ smoke_test([Spec],Opts);
+smoke_test(Specs, Opts) ->
+ run(Specs, [{smoke,true}|Opts]).
+
+smoke_tests() ->
+ {ok, Cwd} = file:get_cwd(),
+ ts_lib:specialized_specs(Cwd,"smoke").
%%
%% estone/0, estone/1
diff --git a/lib/test_server/src/ts_benchmark.erl b/lib/test_server/src/ts_benchmark.erl
index 516d22fd2d..bd6abc3372 100644
--- a/lib/test_server/src/ts_benchmark.erl
+++ b/lib/test_server/src/ts_benchmark.erl
@@ -30,12 +30,7 @@
benchmarks() ->
{ok, Cwd} = file:get_cwd(),
- Benches = filelib:wildcard(
- filename:join([Cwd,"..","*_test","*_bench.spec"])),
- [begin
- Base = filename:basename(N),
- list_to_atom(string:substr(Base,1,string:rstr(Base,"_")-1))
- end || N <- Benches].
+ ts_lib:specialized_specs(Cwd,"bench").
run(Specs, Opts, Vars) ->
{ok, Cwd} = file:get_cwd(),
diff --git a/lib/test_server/src/ts_lib.erl b/lib/test_server/src/ts_lib.erl
index a00f607fc1..52bb346043 100644
--- a/lib/test_server/src/ts_lib.erl
+++ b/lib/test_server/src/ts_lib.erl
@@ -27,6 +27,7 @@
erlang_type/1,
initial_capital/1,
specs/1, suites/2,
+ specialized_specs/2,
subst_file/3, subst/2, print_data/1,
make_non_erlang/2,
maybe_atom_to_list/1, progress/4,
@@ -91,13 +92,22 @@ initial_capital([C|Rest]) when $a =< C, C =< $z ->
initial_capital(String) ->
String.
+specialized_specs(Dir,PostFix) ->
+ Specs = filelib:wildcard(filename:join([filename:dirname(Dir),
+ "*_test", "*_"++PostFix++".spec"])),
+ sort_tests([begin
+ Base = filename:basename(Name),
+ list_to_atom(string:substr(Base,1,string:rstr(Base,"_")-1))
+ end || Name <- Specs]).
+
specs(Dir) ->
Specs = filelib:wildcard(filename:join([filename:dirname(Dir),
"*_test", "*.{dyn,}spec"])),
- % Filter away all spec which end with _bench.spec
+ % Filter away all spec which end with {_bench,_smoke}.spec
NoBench = fun(SpecName) ->
case lists:reverse(SpecName) of
"ceps.hcneb_"++_ -> false;
+ "ceps.ekoms_"++_ -> false;
_ -> true
end
end,
diff --git a/lib/xmerl/doc/src/xmerl_ug.xmlsrc b/lib/xmerl/doc/src/xmerl_ug.xmlsrc
index 8a0805020e..10c770c400 100644
--- a/lib/xmerl/doc/src/xmerl_ug.xmlsrc
+++ b/lib/xmerl/doc/src/xmerl_ug.xmlsrc
@@ -409,9 +409,9 @@ Data =
specification but the basic functionality. For all details see
the <seealso marker="xmerl_xs">reference manual</seealso></p>
<p>First, some words about the xmerl_xs functionality:</p>
- <p>You need to wright template functions to be able to control
+ <p>You need to write template functions to be able to control
what kind of output you want. Thus if you want to encapsulate a
- <c>bike</c> element in &lt;p&gt; tags you simply wright a
+ <c>bike</c> element in &lt;p&gt; tags you simply write a
function:</p>
<pre>
template(E = #xmlElement{name='bike'}) ->