Mercurial > hg
changeset 13991:8cfe191e2ce4
run-tests: move keyword checking into runone
author | Matt Mackall <mpm@selenic.com> |
---|---|
date | Fri, 22 Apr 2011 11:24:27 -0500 |
parents | ddf488bfbdbd |
children | ec4ae5727f07 |
files | tests/run-tests.py |
diffstat | 1 files changed, 11 insertions(+), 14 deletions(-) [+] |
line wrap: on
line diff
--- 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