aboutsummaryrefslogtreecommitdiffstats
path: root/lib/reltool/test
diff options
context:
space:
mode:
authorSiri Hansen <[email protected]>2013-02-14 18:25:49 +0100
committerSiri Hansen <[email protected]>2013-02-21 11:03:36 +0100
commitc98fffd0d490cde6910c64acdba308b4224cc735 (patch)
tree78e511e0f5ab30e6eac13658e12aea6b353387c3 /lib/reltool/test
parent0a572151a47dce3b5ae334c2f5a7eccf0530885e (diff)
downloadotp-c98fffd0d490cde6910c64acdba308b4224cc735.tar.gz
otp-c98fffd0d490cde6910c64acdba308b4224cc735.tar.bz2
otp-c98fffd0d490cde6910c64acdba308b4224cc735.zip
[reltool] Make escript test work with hipe and smp
reltool_server_SUITE:create_standalone and create_multiple_standalone failed on test hosts running hipe and smp. The reason was that the escript used in these tests explicitly disabled smp, which in turn made the emulator spit out warnings like this: "<HiPE (v 3.10)> Warning: not loading native code for module beam_lib: it was compiled for an incompatible runtime system; please regenerate native code for this runtime system" This was returned from the escript and did not match the expected result. To overcome this, the escript (reltool/examples/display_args) is changed and does no longer disable smp.
Diffstat (limited to 'lib/reltool/test')
-rw-r--r--lib/reltool/test/reltool_server_SUITE.erl13
-rw-r--r--lib/reltool/test/reltool_server_SUITE_data/escript/someapp-1.0/src/mymod.erl1
2 files changed, 9 insertions, 5 deletions
diff --git a/lib/reltool/test/reltool_server_SUITE.erl b/lib/reltool/test/reltool_server_SUITE.erl
index c444b75066..09c432f7c1 100644
--- a/lib/reltool/test/reltool_server_SUITE.erl
+++ b/lib/reltool/test/reltool_server_SUITE.erl
@@ -878,7 +878,7 @@ create_standalone(_Config) ->
%% Execute escript
Expected = s2b(["Root dir: ", RootDir, "\n"
"Script args: [\"-arg1\",\"arg2\",\"arg3\"]\n",
- "Smp: false\n",
+ "Emuarg: [\"emuvalue\"]\n",
"ExitCode:0"]),
io:format("Expected: ~ts\n", [Expected]),
?m(Expected, run(BinDir, EscriptName, "-arg1 arg2 arg3")),
@@ -923,7 +923,8 @@ create_standalone_beam(Config) ->
?msym(ok, stop_node(Node)),
%% Execute escript
- Expected = s2b(["Root dir: ", RootDir, "\n"
+ Expected = s2b(["Module: mymod\n"
+ "Root dir: ", RootDir, "\n"
"Script args: [\"-arg1\",\"arg2\",\"arg3\"]\n",
"ExitCode:0"]),
io:format("Expected: ~ts\n", [Expected]),
@@ -975,7 +976,8 @@ create_standalone_app(Config) ->
?msym(ok, stop_node(Node)),
%% Execute escript
- Expected = s2b(["Root dir: ", RootDir, "\n"
+ Expected = s2b(["Module: mymod\n"
+ "Root dir: ", RootDir, "\n"
"Script args: [\"-arg1\",\"arg2\",\"arg3\"]\n",
"ExitCode:0"]),
io:format("Expected: ~ts\n", [Expected]),
@@ -1063,14 +1065,15 @@ create_multiple_standalone(Config) ->
%% Execute escript1
Expected1 = s2b(["Root dir: ", RootDir, "\n"
"Script args: [\"-arg1\",\"arg2\",\"arg3\"]\n",
- "Smp: false\n",
+ "Emuarg: [\"emuvalue\"]\n",
"ExitCode:0"]),
io:format("Expected1: ~ts\n", [Expected1]),
?m(Expected1, run(BinDir, EscriptName1, "-arg1 arg2 arg3")),
%% Execute escript2
- Expected2 = s2b(["Root dir: ", RootDir, "\n"
+ Expected2 = s2b(["Module: mymod\n"
+ "Root dir: ", RootDir, "\n"
"Script args: [\"-arg1\",\"arg2\",\"arg3\"]\n",
"ExitCode:0"]),
io:format("Expected2: ~ts\n", [Expected2]),
diff --git a/lib/reltool/test/reltool_server_SUITE_data/escript/someapp-1.0/src/mymod.erl b/lib/reltool/test/reltool_server_SUITE_data/escript/someapp-1.0/src/mymod.erl
index b6c71c666d..c315f926d3 100644
--- a/lib/reltool/test/reltool_server_SUITE_data/escript/someapp-1.0/src/mymod.erl
+++ b/lib/reltool/test/reltool_server_SUITE_data/escript/someapp-1.0/src/mymod.erl
@@ -22,5 +22,6 @@
%%%-----------------------------------------------------------------
%%% escript main function
main(Args) ->
+ io:format("Module: ~w\n", [?MODULE]),
io:format("Root dir: ~s\n", [code:root_dir()]),
io:format("Script args: ~p\n", [Args]).