Support for running individual suites.

This commit is contained in:
Andrey Smirnov
2014-02-07 20:00:21 +04:00
parent 66d1f40a49
commit 803570bf26
+11 -4
View File
@@ -15,11 +15,12 @@ except ImportError:
return s return s
def run(include_long_tests=False): def run(include_long_tests=False, tests=None):
""" """
Run system test. Run system test.
""" """
tests = glob.glob("t*_*") if tests is None:
tests = glob.glob("t*_*")
fails = [] fails = []
numTests = numFailed = numSkipped = 0 numTests = numFailed = numSkipped = 0
@@ -67,5 +68,11 @@ def run(include_long_tests=False):
if __name__ == "__main__": if __name__ == "__main__":
os.chdir(os.path.realpath(os.path.dirname(sys.argv[0]))) os.chdir(os.path.realpath(os.path.dirname(sys.argv[0])))
include_long_tests = len(sys.argv) > 1 and sys.argv[1] == "--long" include_long_tests = False
run(include_long_tests) tests = None
if len(sys.argv) > 1:
if sys.argv[1] == "--long":
include_long_tests = True
else:
tests = sys.argv[1:]
run(include_long_tests, tests)