Skip to content
Snippets Groups Projects
Commit 41a2c5cb authored by Nicolas Dumazet's avatar Nicolas Dumazet
Browse files

hghave: checking that all targets are Exception-free

parent a0555ae3
No related branches found
No related tags found
No related merge requests found
......@@ -190,4 +190,15 @@
desc = feature[1]
print name + ':', desc
def test_features():
failed = 0
for name, feature in checks.iteritems():
check, _ = feature
try:
check()
except Exception, e:
print "feature %s failed: %s" % (name, e)
failed += 1
return failed
parser = optparse.OptionParser("%prog [options] [features]")
......@@ -193,4 +204,6 @@
parser = optparse.OptionParser("%prog [options] [features]")
parser.add_option("--test-features", action="store_true",
help="test available features")
parser.add_option("--list-features", action="store_true",
help="list available features")
parser.add_option("-q", "--quiet", action="store_true",
......@@ -202,6 +215,9 @@
list_features()
sys.exit(0)
if options.test_features:
sys.exit(test_features())
quiet = options.quiet
failures = 0
......
#!/bin/sh
# Testing that hghave does not crash when checking features
"$TESTDIR/hghave" --test-features 2>/dev/null
0% Loading or .
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment