summaryrefslogtreecommitdiff
path: root/source4/selftest
diff options
context:
space:
mode:
authorMatthieu Patou <mat@matws.net>2010-11-20 12:22:57 +0300
committerMatthieu Patou <mat@samba.org>2010-11-21 16:21:54 +0100
commit0d85d2b4bf9221213bd86987ff579b08e0049629 (patch)
tree3b1c442fc2a730f8474992bc3e8f375611929831 /source4/selftest
parentd2184723100382c8b4c346de3ebe092372c20a7f (diff)
downloadsamba-0d85d2b4bf9221213bd86987ff579b08e0049629.tar.gz
samba-0d85d2b4bf9221213bd86987ff579b08e0049629.tar.bz2
samba-0d85d2b4bf9221213bd86987ff579b08e0049629.zip
selftest: fix tap2subunit detection on system with tap2subunit but not correct subunit libs
Autobuild-User: Matthieu Patou <mat@samba.org> Autobuild-Date: Sun Nov 21 16:21:54 CET 2010 on sn-devel-104
Diffstat (limited to 'source4/selftest')
-rwxr-xr-xsource4/selftest/tests.py7
1 files changed, 6 insertions, 1 deletions
diff --git a/source4/selftest/tests.py b/source4/selftest/tests.py
index 7a2dd44a61..1d1d517a4c 100755
--- a/source4/selftest/tests.py
+++ b/source4/selftest/tests.py
@@ -149,7 +149,12 @@ sub.communicate("")
if sub.returncode != 0:
tap2subunit = "PYTHONPATH=%s/../lib/subunit/python:%s/../lib/testtools %s %s/../lib/subunit/filters/tap2subunit" % (samba4srcdir, samba4srcdir, python, samba4srcdir)
else:
- tap2subunit = "tap2subunit"
+ 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, shell=True)
+ if sub.returncode == 0:
+ tap2subunit = "tap2subunit"
+ else:
+ tap2subunit = "PYTHONPATH=%s/../lib/subunit/python:%s/../lib/testtools %s %s/../lib/subunit/filters/tap2subunit" % (samba4srcdir, samba4srcdir, python, samba4srcdir)
subprocess.call([smb4torture, "-V"])