diff options
Diffstat (limited to 'lib/reltool')
-rw-r--r-- | lib/reltool/examples/display_args | 5 | ||||
-rw-r--r-- | lib/reltool/test/reltool_server_SUITE.erl | 13 | ||||
-rw-r--r-- | lib/reltool/test/reltool_server_SUITE_data/escript/someapp-1.0/src/mymod.erl | 1 |
3 files changed, 12 insertions, 7 deletions
diff --git a/lib/reltool/examples/display_args b/lib/reltool/examples/display_args index bf0994ab7c..a8882f7bda 100644 --- a/lib/reltool/examples/display_args +++ b/lib/reltool/examples/display_args @@ -1,8 +1,9 @@ #!/usr/bin/env escript %% -*- erlang -*- -%%! -smp disable +%%! -emuarg emuvalue main(Args) -> + {ok,[Emuvalue]} = init:get_argument(emuarg), io:format("Root dir: ~s\n", [code:root_dir()]), io:format("Script args: ~p\n", [Args]), - io:format("Smp: ~p\n", [erlang:system_info(smp_support)]). + io:format("Emuarg: ~p\n", [Emuvalue]). 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]). |