##// END OF EJS Templates
run-tests: make a table of test types
Matt Mackall -
r19239:db978c79 default
parent child Browse files
Show More
@@ -904,17 +904,16 b' def runone(options, test):'
904 904 hgrc.write('[%s]\n%s\n' % (section, key))
905 905 hgrc.close()
906 906
907 ref = os.path.join(TESTDIR, test+".out")
908 907 err = os.path.join(TESTDIR, test+".err")
909 908 if os.path.exists(err):
910 909 os.remove(err) # Remove any previous output files
911 910 lctest = test.lower()
912 911
913 if lctest.endswith('.py'):
914 runner = pytest
915 elif lctest.endswith('.t'):
916 runner = tsttest
917 ref = testpath
912 for ext, func, out in testtypes:
913 if lctest.endswith(ext):
914 runner = func
915 ref = os.path.join(TESTDIR, test + out)
916 break
918 917 else:
919 918 return skip("unknown test type")
920 919
@@ -1234,6 +1233,9 b' def runtests(options, tests):'
1234 1233 if failed:
1235 1234 sys.exit(1)
1236 1235
1236 testtypes = [('.py', pytest, '.out'),
1237 ('.t', tsttest, '')]
1238
1237 1239 def main():
1238 1240 (options, args) = parseargs()
1239 1241 if not options.child:
General Comments 0
You need to be logged in to leave comments. Login now