diff options
-rw-r--r-- | selftest/selftesthelpers.py | 7 |
1 files changed, 4 insertions, 3 deletions
diff --git a/selftest/selftesthelpers.py b/selftest/selftesthelpers.py index f4b032198b..0cfcb69a04 100644 --- a/selftest/selftesthelpers.py +++ b/selftest/selftesthelpers.py @@ -46,9 +46,10 @@ if binary_mapping_string is not None: continue binary_mapping[from_path] = to_path -perl = os.getenv("PERL", "perl") +# Split perl variable to allow $PERL to be set to e.g. "perl -W" +perl = os.getenv("PERL", "perl").split() -if subprocess.call([perl, "-e", "eval require Test::More;"]) == 0: +if subprocess.call(perl + ["-e", "eval require Test::More;"]) == 0: has_perl_test_more = True else: has_perl_test_more = False @@ -159,7 +160,7 @@ def planperltestsuite(name, path): :param path: Path to the test runner """ if has_perl_test_more: - plantestsuite(name, "none", "%s %s | %s" % (perl, path, tap2subunit)) + plantestsuite(name, "none", "%s %s | %s" % (" ".join(perl), path, tap2subunit)) else: skiptestsuite(name, "Test::More not available") |