diff options
author | Lukas Larsson <[email protected]> | 2012-06-08 17:33:12 +0200 |
---|---|---|
committer | Lukas Larsson <[email protected]> | 2012-06-08 17:33:12 +0200 |
commit | 3341122a92e71ade3edc7ecaadab9f55da29e20d (patch) | |
tree | 3f8fab1fc3681a0c5b0fda11ed34cf4631f81adf /erts/test | |
parent | b4b4c6299d3926e55b042ea45f55adaeec41cb6f (diff) | |
parent | a977c40ac2c290623e20e9df32315eb6a1bdf55d (diff) | |
download | otp-3341122a92e71ade3edc7ecaadab9f55da29e20d.tar.gz otp-3341122a92e71ade3edc7ecaadab9f55da29e20d.tar.bz2 otp-3341122a92e71ade3edc7ecaadab9f55da29e20d.zip |
Merge branch 'lukas/otp/install_with_whitespace/OTP-10107' into maint
* lukas/otp/install_with_whitespace/OTP-10107:
Update to work with space in include path
Update to work with whitespace in exec path
Diffstat (limited to 'erts/test')
-rw-r--r-- | erts/test/Makefile | 8 | ||||
-rw-r--r-- | erts/test/erlc_SUITE.erl | 2 | ||||
-rw-r--r-- | erts/test/install_SUITE.erl | 4 | ||||
-rw-r--r-- | erts/test/run_erl_SUITE.erl | 2 | ||||
-rw-r--r-- | erts/test/utils/gccifier.c | 10 |
5 files changed, 16 insertions, 10 deletions
diff --git a/erts/test/Makefile b/erts/test/Makefile index 68be3f2178..79be5497b0 100644 --- a/erts/test/Makefile +++ b/erts/test/Makefile @@ -86,10 +86,10 @@ include $(ERL_TOP)/make/otp_release_targets.mk release_spec: release_tests_spec: opt - $(INSTALL_DIR) $(RELSYSDIR) + $(INSTALL_DIR) "$(RELSYSDIR)" $(INSTALL_DATA) system.spec system.dynspec system.spec.vxworks \ - $(ERL_FILES) $(TARGET_FILES) $(RELSYSDIR) - chmod -R u+w $(RELSYSDIR) - tar cf - *_SUITE_data utils | (cd $(RELSYSDIR); tar xf -) + $(ERL_FILES) $(TARGET_FILES) "$(RELSYSDIR)" + chmod -R u+w "$(RELSYSDIR)" + tar cf - *_SUITE_data utils | (cd "$(RELSYSDIR)"; tar xf -) release_docs_spec: diff --git a/erts/test/erlc_SUITE.erl b/erts/test/erlc_SUITE.erl index 6c0d662126..ada09db975 100644 --- a/erts/test/erlc_SUITE.erl +++ b/erts/test/erlc_SUITE.erl @@ -253,7 +253,7 @@ erlc() -> false -> test_server:fail("Can't find erlc"); Erlc -> - Erlc + "\"" ++ Erlc ++ "\"" end. %% Runs a command. diff --git a/erts/test/install_SUITE.erl b/erts/test/install_SUITE.erl index 214031a6fe..559d95007c 100644 --- a/erts/test/install_SUITE.erl +++ b/erts/test/install_SUITE.erl @@ -452,7 +452,7 @@ bin_dirname_fail(Config) when is_list(Config) -> ?line Be = Bs, ?line EBs = "/opt/lib/erlang/otp/bin", ?line EBe = EBs, - ?line CMDPRFX = "PATH="++?config(data_dir,Config)++":"++os:getenv("PATH"), + ?line CMDPRFX = "PATH=\""++?config(data_dir,Config)++":"++os:getenv("PATH")++"\"", ChkRes = fun (Res, #inst{test_prefix = TP, destdir = D, extra_prefix = EP, @@ -485,7 +485,7 @@ bin_no_use_dirname_fail(Config) when is_list(Config) -> ?line EBs = "/opt/lib/erlang/otp/bin", ?line EBe = EBs, ?line RP = "../lib/erlang/otp/bin", - ?line CMDPRFX = "PATH="++?config(data_dir,Config)++":"++os:getenv("PATH"), + ?line CMDPRFX = "PATH=\""++?config(data_dir,Config)++":"++os:getenv("PATH")++"\"", ChkRes = fun (Res, #inst{test_prefix = TP, destdir = D, extra_prefix = EP, diff --git a/erts/test/run_erl_SUITE.erl b/erts/test/run_erl_SUITE.erl index 6350dc47dd..6838c8924d 100644 --- a/erts/test/run_erl_SUITE.erl +++ b/erts/test/run_erl_SUITE.erl @@ -250,7 +250,7 @@ defunct_2(Config, Perl) -> ?line ok = file:make_dir(LogDir), ?line Pipe = LogDir ++ "/", ?line RunErl = os:find_executable(run_erl), - ?line Cmd = Perl ++ " " ++ RunErlTest ++ " " ++ RunErl ++ " " ++ + ?line Cmd = Perl ++ " " ++ RunErlTest ++ " \"" ++ RunErl ++ "\" " ++ Defuncter ++ " " ++ Pipe ++ " " ++ LogDir, ?line io:format("~p", [Cmd]), ?line Res = os:cmd(Cmd), diff --git a/erts/test/utils/gccifier.c b/erts/test/utils/gccifier.c index a6b8a340a1..a1019f9a72 100644 --- a/erts/test/utils/gccifier.c +++ b/erts/test/utils/gccifier.c @@ -73,17 +73,23 @@ save_arg(args_t *args, char *arg1, ...) args->vec = (char **) (args->no ? realloc((void *) args->vec, (sizeof(char *) - *(args->no + ARGS_INCR + 1))) + *(args->no + ARGS_INCR + 2))) : malloc((sizeof(char *) - *(args->no + ARGS_INCR + 1)))); + *(args->no + ARGS_INCR + 2)))); if (!args->vec) enomem(); args->no += ARGS_INCR; } + if (carg == arg1) { + args->vec[args->ix++] = "\""; + args->chars++; + } args->vec[args->ix++] = carg; args->chars += strlen(carg); carg = va_arg(argp, char *); } + args->vec[args->ix++] = "\""; + args->chars++; args->vec[args->ix++] = " "; args->chars++; va_end(argp); |