From 0d85d2b4bf9221213bd86987ff579b08e0049629 Mon Sep 17 00:00:00 2001 From: Matthieu Patou Date: Sat, 20 Nov 2010 12:22:57 +0300 Subject: selftest: fix tap2subunit detection on system with tap2subunit but not correct subunit libs Autobuild-User: Matthieu Patou Autobuild-Date: Sun Nov 21 16:21:54 CET 2010 on sn-devel-104 --- source4/selftest/tests.py | 7 ++++++- 1 file changed, 6 insertions(+), 1 deletion(-) (limited to 'source4/selftest') 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"]) -- cgit