--- a/tests/run-tests.py Fri Apr 22 11:22:02 2011 -0500
+++ b/tests/run-tests.py Fri Apr 22 11:24:27 2011 -0500
@@ -671,6 +671,17 @@
else:
return None # not a supported test, don't record
+ if options.keywords:
+ fp = open(test)
+ t = fp.read().lower() + test.lower()
+ fp.close()
+ for k in options.keywords.lower().split():
+ if k in t:
+ break
+ else:
+ ignores.append((test, "doesn't match keyword"))
+ return None
+
vlog("# Test", test)
# create a fresh hgrc
@@ -954,20 +965,6 @@
ignores.append((test, "not retesting"))
continue
- if options.keywords:
- try:
- fp = open(test)
- except IOError:
- continue
- t = fp.read().lower() + test.lower()
- fp.close()
- for k in options.keywords.lower().split():
- if k in t:
- break
- else:
- ignores.append((test, "doesn't match keyword"))
- continue
-
ret = runone(options, test, skips, fails, ignores)
if ret is None:
skipped += 1