Mercurial > hg-stable
changeset 18229:77d06793a20d
tests: make hghave and run-tests exit on unknown feature requirements
author | Mads Kiilerich <mads@kiilerich.com> |
---|---|
date | Mon, 07 Jan 2013 02:00:43 +0100 |
parents | 1528ff6ac7ee |
children | f5842787a958 |
files | tests/hghave tests/run-tests.py |
diffstat | 2 files changed, 5 insertions(+), 2 deletions(-) [+] |
line wrap: on
line diff
--- a/tests/hghave Mon Jan 07 02:00:43 2013 +0100 +++ b/tests/hghave Mon Jan 07 02:00:43 2013 +0100 @@ -59,7 +59,7 @@ if feature not in checks: error('skipped: unknown feature: ' + feature) - continue + sys.exit(2) check, desc = checks[feature] try:
--- a/tests/run-tests.py Mon Jan 07 02:00:43 2013 +0100 +++ b/tests/run-tests.py Mon Jan 07 02:00:43 2013 +0100 @@ -602,10 +602,13 @@ 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)