# HG changeset patch # User Mads Kiilerich # Date 2013-01-07 01:00:43 # Node ID 77d06793a20d82c37cfdcfb946f67c60bc4709c8 # Parent 1528ff6ac7eeb7be9e44b0edc7239ad85b20adbc tests: make hghave and run-tests exit on unknown feature requirements diff --git a/tests/hghave b/tests/hghave --- a/tests/hghave +++ b/tests/hghave @@ -59,7 +59,7 @@ if __name__ == '__main__': if feature not in checks: error('skipped: unknown feature: ' + feature) - continue + sys.exit(2) check, desc = checks[feature] try: diff --git a/tests/run-tests.py b/tests/run-tests.py --- a/tests/run-tests.py +++ b/tests/run-tests.py @@ -602,10 +602,13 @@ def tsttest(test, wd, options, replaceme tdir = TESTDIR.replace('\\', '/') proc = Popen4('%s -c "%s/hghave %s"' % (options.shell, tdir, ' '.join(reqs)), wd, 0) - proc.communicate() + stdout, stderr = proc.communicate() ret = proc.wait() if wifexited(ret): ret = os.WEXITSTATUS(ret) + if ret == 2: + print stdout + sys.exit(1) return ret == 0 f = open(test)