summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorJelmer Vernooij <jelmer@samba.org>2012-10-26 14:14:42 -0800
committerJelmer Vernooij <jelmer@samba.org>2012-10-27 05:16:19 -0800
commit05dc5a39a6ad4b1ffafc904faea3e8e40f6f5cde (patch)
tree541f0acb7a569f6a58afea599fe88b7b95c18411
parentfd607e0a9eefb79130941e244435980afbbb4bf7 (diff)
downloadsamba-05dc5a39a6ad4b1ffafc904faea3e8e40f6f5cde.tar.gz
selftesthelpers: Simplify detection of tap2subunit.
-rw-r--r--selftest/selftesthelpers.py10
1 files changed, 6 insertions, 4 deletions
diff --git a/selftest/selftesthelpers.py b/selftest/selftesthelpers.py
index ff5bbd7f1f..00fa8aae7c 100644
--- a/selftest/selftesthelpers.py
+++ b/selftest/selftesthelpers.py
@@ -64,15 +64,17 @@ else:
python = os.getenv("PYTHON", "python")
-#Set a default value, overridden if we find a working one on the system
+# Set a default value, overridden if we find a working one on the system
tap2subunit = "PYTHONPATH=%s/lib/subunit/python:%s/lib/testtools %s %s/lib/subunit/filters/tap2subunit" % (srcdir(), srcdir(), python, srcdir())
-sub = subprocess.Popen("tap2subunit 2> /dev/null", stdout=subprocess.PIPE, stdin=subprocess.PIPE, shell=True)
+sub = subprocess.Popen("tap2subunit", stdin=subprocess.PIPE,
+ stdout=subprocess.PIPE, stderr=subprocess.PIPE)
sub.communicate("")
if sub.returncode == 0:
- cmd = "echo -ne \"1..1\nok 1 # skip doesn't seem to work yet\n\" | tap2subunit 2> /dev/null | grep skip"
- sub = subprocess.Popen(cmd, stdout=subprocess.PIPE, stdin=subprocess.PIPE, stderr=subprocess.PIPE, shell=True)
+ cmd = "echo -ne \"1..1\nok 1 # skip doesn't seem to work yet\n\" | tap2subunit | grep skip"
+ sub = subprocess.Popen(cmd, stdout=subprocess.PIPE, stdin=subprocess.PIPE,
+ stderr=subprocess.PIPE, shell=True)
if sub.returncode == 0:
tap2subunit = "tap2subunit"