comparison tests/run-tests.py @ 21328:9da0761a22a1

run-tests: check for test file existence in Test.run() We delay this a little bit. But it shouldn't really matter when the check is performed.
author Gregory Szorc <gregory.szorc@gmail.com>
date Sat, 19 Apr 2014 21:00:24 -0700
parents 206814c9072a
children 8ead79ffbc40
comparison
equal deleted inserted replaced
21327:206814c9072a 21328:9da0761a22a1
580 580
581 if self._threadtmp and not self._options.keep_tmpdir: 581 if self._threadtmp and not self._options.keep_tmpdir:
582 shutil.rmtree(self._threadtmp, True) 582 shutil.rmtree(self._threadtmp, True)
583 583
584 def run(self, result): 584 def run(self, result):
585 if not os.path.exists(self._path):
586 result.skipped = True
587 return self.skip("Doesn't exist")
588
585 # Remove any previous output files. 589 # Remove any previous output files.
586 if os.path.exists(self._errpath): 590 if os.path.exists(self._errpath):
587 os.remove(self._errpath) 591 os.remove(self._errpath)
588 592
589 testtmp = os.path.join(self._threadtmp, os.path.basename(self._path)) 593 testtmp = os.path.join(self._threadtmp, os.path.basename(self._path))
1110 1114
1111 testpath = os.path.join(TESTDIR, test) 1115 testpath = os.path.join(TESTDIR, test)
1112 err = os.path.join(TESTDIR, test + ".err") 1116 err = os.path.join(TESTDIR, test + ".err")
1113 lctest = test.lower() 1117 lctest = test.lower()
1114 1118
1115 if not os.path.exists(testpath):
1116 return skip("doesn't exist")
1117
1118 if not (options.whitelisted and test in options.whitelisted): 1119 if not (options.whitelisted and test in options.whitelisted):
1119 if options.blacklist and test in options.blacklist: 1120 if options.blacklist and test in options.blacklist:
1120 return skip("blacklisted") 1121 return skip("blacklisted")
1121 1122
1122 if options.retest and not os.path.exists(test + ".err"): 1123 if options.retest and not os.path.exists(test + ".err"):