Mercurial > public > mercurial-scm > hg-stable
diff tests/hghave @ 8060:84d0fe34427b
run-tests: detect when hghave fails to check for a feature and fail test
hghave exitcode != 0 might mean that hghave failed to check for feature
avaibility. Detect those cases, and fail the test, instead of skipping it.
author | Nicolas Dumazet <nicdumz.commits@gmail.com> |
---|---|
date | Wed, 08 Apr 2009 02:38:23 +0900 |
parents | 41a2c5cbcb6a |
children | 17ab4dab50a6 |
line wrap: on
line diff
--- a/tests/hghave Wed Apr 08 02:34:00 2009 +0900 +++ b/tests/hghave Wed Apr 08 02:38:23 2009 +0900 @@ -238,9 +238,15 @@ continue check, desc = checks[feature] - if not negate and not check(): + try: + available = check() + except Exception, e: + error('hghave check failed: ' + feature) + continue + + if not negate and not available: error('skipped: missing feature: ' + desc) - elif negate and check(): + elif negate and available: error('skipped: system supports %s' % desc) if failures != 0: