summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorJelmer Vernooij <jelmer@samba.org>2011-11-14 13:47:50 +0100
committerJelmer Vernooij <jelmer@samba.org>2011-11-14 15:49:37 +0100
commit042f3fe5f6f1b93d282d421dee08cc4e2e1aaf19 (patch)
tree53f39d70f1555fe5f011936355c7b093b70c5d3e
parent5cf31eb5927f76136182e295f8267c906aac8d78 (diff)
downloadsamba-042f3fe5f6f1b93d282d421dee08cc4e2e1aaf19.tar.gz
samba-042f3fe5f6f1b93d282d421dee08cc4e2e1aaf19.tar.bz2
samba-042f3fe5f6f1b93d282d421dee08cc4e2e1aaf19.zip
selftesthelpers: Revert perl changes, add comment on why the original code was necessary.
-rw-r--r--selftest/selftesthelpers.py7
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")