diff options
Diffstat (limited to 'tools/integration_tests.py')
-rwxr-xr-x | tools/integration_tests.py | 43 |
1 files changed, 5 insertions, 38 deletions
diff --git a/tools/integration_tests.py b/tools/integration_tests.py index 0f02ae2c5..6ce4f3d8b 100755 --- a/tools/integration_tests.py +++ b/tools/integration_tests.py @@ -7,16 +7,13 @@ # exit code can be specified. # # Usage: integration_tests.py [path to deno executable] -import argparse import os import re -import sys import subprocess -import unittest -from http_server import spawn -from util import (DenoTestCase, ColorTextTestRunner, root_path, tests_path, - pattern_match, rmtree, test_main) +import http_server +from test_util import DenoTestCase, run_tests +from util import root_path, tests_path, pattern_match, rmtree def strip_ansi_codes(s): @@ -107,36 +104,6 @@ for fn in sorted( tn = t.__name__ = "test_" + fn.split(".")[0] setattr(TestIntegrations, tn, t) - -def main(): - parser = argparse.ArgumentParser() - parser.add_argument("--filter", help="Run specific tests") - parser.add_argument( - "--release", help="Use release build of Deno", action="store_true") - parser.add_argument("--executable", help="Use external executable of Deno") - args = parser.parse_args() - - target = "release" if args.release else "debug" - build_dir = os.environ.get("DENO_BUILD_PATH", - os.path.join(root_path, "target", target)) - - deno_dir = os.path.join(build_dir, ".deno_test") - if os.path.isdir(deno_dir): - rmtree(deno_dir) - os.environ["DENO_DIR"] = deno_dir - - test_names = [ - test_name for test_name in unittest.TestLoader().getTestCaseNames( - TestIntegrations) if not args.filter or args.filter in test_name - ] - suite = unittest.TestLoader().loadTestsFromNames( - test_names, module=TestIntegrations) - - with spawn(): - result = ColorTextTestRunner(verbosity=2).run(suite) - if not result.wasSuccessful(): - sys.exit(1) - - if __name__ == "__main__": - main() + with http_server.spawn(): + run_tests() |