[PATCH 2 of 2] tests: use new function from hghave.py in run-tests.py
Simon Heimberg
simohe at besonet.ch
Mon Nov 5 16:31:11 CST 2012
# HG changeset patch
# User Simon Heimberg <simohe at besonet.ch>
# Date 1350334854 -7200
# Branch stable
# Node ID c7ee0fd5eb125630ed44c506c2256359ed19f13a
# Parent 6048e40535539238a6368bb9e5d4f9aefb79bafe
tests: use new function from hghave.py in run-tests.py
diff -r 6048e4053553 -r c7ee0fd5eb12 tests/run-tests.py
--- a/tests/run-tests.py Mon Okt 15 22:59:03 2012 +0200
+++ b/tests/run-tests.py Mon Okt 15 23:00:54 2012 +0200
@@ -563,16 +563,15 @@
# True or False when in a true or false conditional section
skipping = None
+ import hghave as hghavemod
+
def hghave(reqs):
- # TODO: do something smarter when all other uses of hghave is gone
- tdir = TESTDIR.replace('\\', '/')
- proc = Popen4('%s -c "%s/hghave %s"' %
- (options.shell, tdir, ' '.join(reqs)), wd, 0)
- proc.communicate()
- ret = proc.wait()
- if wifexited(ret):
- ret = os.WEXITSTATUS(ret)
- return ret == 0
+ for req in reqs:
+ msg = hghavemod.feature_fails(req)
+ if msg:
+ #failed
+ return False
+ return True
f = open(test)
t = f.readlines()
More information about the Mercurial-devel
mailing list