aboutsummaryrefslogtreecommitdiffstats
path: root/lib
diff options
context:
space:
mode:
Diffstat (limited to 'lib')
-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/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/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
13 files changed, 59 insertions, 12 deletions
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/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/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,