aboutsummaryrefslogtreecommitdiffstats
path: root/lib/kernel/test/init_SUITE.erl
diff options
context:
space:
mode:
authorBjörn-Egil Dahlberg <[email protected]>2012-07-25 15:00:32 +0200
committerBjörn-Egil Dahlberg <[email protected]>2012-07-25 15:00:32 +0200
commita7bcc6aa05bc61edd1ac178b6331e780aeab940f (patch)
treeaf6cb90b11c95744135e233478c89b55fede8bf7 /lib/kernel/test/init_SUITE.erl
parent81664b189c21710767b78a9db9d74d55585cfeed (diff)
parent84bc4fb47b58f258a50e23ba96db51608272b859 (diff)
downloadotp-a7bcc6aa05bc61edd1ac178b6331e780aeab940f.tar.gz
otp-a7bcc6aa05bc61edd1ac178b6331e780aeab940f.tar.bz2
otp-a7bcc6aa05bc61edd1ac178b6331e780aeab940f.zip
Merge branch 'egil/r16/remove-vxworks-support/OTP-10146'
* egil/r16/remove-vxworks-support/OTP-10146: (30 commits) erts: Update doc to reflect VxWorks removal erts: Remove VxWorks from documentation Update preloaded erl_prim_loader and prim_file snmp: Remove VxWorks megaco: Remove VxWorks diameter: Remove VxWorks mnesia: Remove VxWorks typer: Remove VxWorks ssh: Remove VxWorks inets: Remove VxWorks hipe: Remove VxWorks cosFileTransfer: Remove VxWorks asn1: Remove VxWorks orber: Remove VxWorks os_mon: Remove VxWorks runtime_tools: Remove VxWorks test_server: Remove VxWorks references in doc test_server: Remove VxWorks stdlib: Remove VxWorks kernel: Remove VxWorks from tests ... Conflicts: erts/emulator/test/Makefile
Diffstat (limited to 'lib/kernel/test/init_SUITE.erl')
-rw-r--r--lib/kernel/test/init_SUITE.erl151
1 files changed, 69 insertions, 82 deletions
diff --git a/lib/kernel/test/init_SUITE.erl b/lib/kernel/test/init_SUITE.erl
index e3fa4642b7..1993cd0b32 100644
--- a/lib/kernel/test/init_SUITE.erl
+++ b/lib/kernel/test/init_SUITE.erl
@@ -256,47 +256,42 @@ get_plain_arguments(Config) when is_list(Config) ->
boot_var(doc) -> [];
boot_var(suite) -> {req, [distribution, {local_slave_nodes, 1}]};
boot_var(Config) when is_list(Config) ->
- case os:type() of
- vxworks ->
- {comment, "Not run on VxWorks"};
+ ?line Dog = ?t:timetrap(?t:seconds(100)),
+
+ {BootScript, TEST_VAR, KernelVsn, StdlibVsn} = create_boot(Config),
+
+ %% Should fail as we have not given -boot_var TEST_VAR
+ ?line {error, timeout} =
+ start_node(init_test, "-boot " ++ BootScript),
+
+ case is_real_system(KernelVsn, StdlibVsn) of
+ true ->
+ %% Now it should work !!
+ ?line {ok, Node} =
+ start_node(init_test,
+ "-boot " ++ BootScript ++
+ " -boot_var TEST_VAR " ++ TEST_VAR),
+ stop_node(Node),
+ Res = ok;
_ ->
- ?line Dog = ?t:timetrap(?t:seconds(100)),
-
- {BootScript, TEST_VAR, KernelVsn, StdlibVsn} = create_boot(Config),
-
- %% Should fail as we have not given -boot_var TEST_VAR
- ?line {error, timeout} =
- start_node(init_test, "-boot " ++ BootScript),
-
- case is_real_system(KernelVsn, StdlibVsn) of
- true ->
- %% Now it should work !!
- ?line {ok, Node} =
- start_node(init_test,
- "-boot " ++ BootScript ++
- " -boot_var TEST_VAR " ++ TEST_VAR),
- stop_node(Node),
- Res = ok;
- _ ->
-%% What we need is not so much version numbers on the directories, but
-%% for the boot var TEST_VAR to appear in the boot script, and it doesn't
-%% if we give the 'local' option to systools:make_script.
- ?t:format(
- "Test case not complete as we are not~n"
- "running in a real system!~n"
- "Probably this test is performed in a "
- "clearcase view or source tree.~n"
- "Need version numbers on the kernel and "
- "stdlib directories!~n",
- []),
- Res = {skip,
- "Test case only partially run since it is run "
- "in a clearcase view or in a source tree. "
- "Need an installed system to complete this test."}
- end,
- ?line ?t:timetrap_cancel(Dog),
- Res
- end.
+ %% What we need is not so much version numbers on the directories, but
+ %% for the boot var TEST_VAR to appear in the boot script, and it doesn't
+ %% if we give the 'local' option to systools:make_script.
+ ?t:format(
+ "Test case not complete as we are not~n"
+ "running in a real system!~n"
+ "Probably this test is performed in a "
+ "clearcase view or source tree.~n"
+ "Need version numbers on the kernel and "
+ "stdlib directories!~n",
+ []),
+ Res = {skip,
+ "Test case only partially run since it is run "
+ "in a clearcase view or in a source tree. "
+ "Need an installed system to complete this test."}
+ end,
+ ?line ?t:timetrap_cancel(Dog),
+ Res.
create_boot(Config) ->
?line {ok, OldDir} = file:get_cwd(),
@@ -579,55 +574,47 @@ script_id(Config) when is_list(Config) ->
boot1(doc) -> [];
boot1(suite) -> {req, [distribution, {local_slave_nodes, 1}, {time, 35}]};
boot1(Config) when is_list(Config) ->
- case os:type() of
- vxworks ->
- {comment, "Not run on VxWorks"};
- _ ->
- ?line Dog = ?t:timetrap(?t:seconds(80)),
- Args = args() ++ " -boot start_sasl",
- ?line {ok, Node} = start_node(init_test, Args),
- ?line stop_node(Node),
-
- %% Try to start with non existing boot file.
- Args1 = args() ++ " -boot dummy_script",
- ?line {error, timeout} = start_node(init_test, Args1),
-
- ?line ?t:timetrap_cancel(Dog),
- ok
- end.
+ ?line Dog = ?t:timetrap(?t:seconds(80)),
+ Args = args() ++ " -boot start_sasl",
+ ?line {ok, Node} = start_node(init_test, Args),
+ ?line stop_node(Node),
+
+ %% Try to start with non existing boot file.
+ Args1 = args() ++ " -boot dummy_script",
+ ?line {error, timeout} = start_node(init_test, Args1),
+
+ ?line ?t:timetrap_cancel(Dog),
+ ok.
boot2(doc) -> [];
boot2(suite) -> {req, [distribution, {local_slave_nodes, 1}, {time, 35}]};
boot2(Config) when is_list(Config) ->
+ Dog = ?t:timetrap(?t:seconds(80)),
+
+ %% Absolute boot file name
+ Boot = filename:join([code:root_dir(), "bin", "start_sasl"]),
+
+ Args = args() ++ " -boot \"" ++ Boot++"\"",
+ {ok, Node} = start_node(init_test, Args),
+ stop_node(Node),
+
case os:type() of
- vxworks ->
- {comment, "Not run on VxWorks"};
+ {win32, _} ->
+ %% Absolute boot file name for Windows -- all slashes are
+ %% converted to backslashes.
+ Win_boot = lists:map(fun
+ ($/) -> $\\;
+ (C) -> C
+ end, Boot),
+ Args2 = args() ++ " -boot \"" ++ Win_boot ++ "\"",
+ {ok, Node2} = start_node(init_test, Args2),
+ stop_node(Node2);
_ ->
- ?line Dog = ?t:timetrap(?t:seconds(80)),
-
- %% Absolute boot file name
- Boot = filename:join([code:root_dir(), "bin", "start_sasl"]),
-
- Args = args() ++ " -boot \"" ++ Boot++"\"",
- ?line {ok, Node} = start_node(init_test, Args),
- ?line stop_node(Node),
-
- case os:type() of
- {win32, _} ->
- %% Absolute boot file name for Windows -- all slashes are
- %% converted to backslashes.
- Win_boot = lists:map(fun($/) -> $\\; (C) -> C end,
- Boot),
- Args2 = args() ++ " -boot \"" ++ Win_boot ++ "\"",
- ?line {ok, Node2} = start_node(init_test, Args2),
- ?line stop_node(Node2);
- _ ->
- ok
- end,
-
- ?line ?t:timetrap_cancel(Dog),
ok
- end.
+ end,
+
+ ?t:timetrap_cancel(Dog),
+ ok.
%% Misc. functions