tests/run-tests.py
branchstable
changeset 1272 4a224ed7e923
parent 1270 79e0df6ffaad
child 1273 4598906608cf
equal deleted inserted replaced
1270:79e0df6ffaad 1272:4a224ed7e923
   902     if not (options.whitelisted and test in options.whitelisted):
   902     if not (options.whitelisted and test in options.whitelisted):
   903         if options.blacklist and test in options.blacklist:
   903         if options.blacklist and test in options.blacklist:
   904             return skip("blacklisted")
   904             return skip("blacklisted")
   905 
   905 
   906         if options.retest and not os.path.exists(test + ".err"):
   906         if options.retest and not os.path.exists(test + ".err"):
   907             ignore("not retesting")
   907             return ignore("not retesting")
   908             return None
       
   909 
   908 
   910         if options.keywords:
   909         if options.keywords:
   911             fp = open(test)
   910             fp = open(test)
   912             t = fp.read().lower() + test.lower()
   911             t = fp.read().lower() + test.lower()
   913             fp.close()
   912             fp.close()
   914             for k in options.keywords.lower().split():
   913             for k in options.keywords.lower().split():
   915                 if k in t:
   914                 if k in t:
   916                     break
   915                     break
   917                 else:
   916                 else:
   918                     ignore("doesn't match keyword")
   917                     return ignore("doesn't match keyword")
   919                     return None
       
   920 
   918 
   921     for ext, func, out in testtypes:
   919     for ext, func, out in testtypes:
   922         if lctest.startswith("test-") and lctest.endswith(ext):
   920         if lctest.startswith("test-") and lctest.endswith(ext):
   923             runner = func
   921             runner = func
   924             ref = os.path.join(TESTDIR, test + out)
   922             ref = os.path.join(TESTDIR, test + out)