diff options
author | Ryan Dahl <ry@tinyclouds.org> | 2018-08-09 14:48:17 -0700 |
---|---|---|
committer | GitHub <noreply@github.com> | 2018-08-09 14:48:17 -0700 |
commit | 9d90c4ae955d789d2895b8efc153aa55be6ec376 (patch) | |
tree | d4483fa3a0ddf27ede0131d32f0e9be282982063 /tools/test.py | |
parent | 413bcf20425992762a9a5a6e19caddc5ff160303 (diff) |
Adds js/unit_tests.ts (#448)
Diffstat (limited to 'tools/test.py')
-rwxr-xr-x | tools/test.py | 16 |
1 files changed, 11 insertions, 5 deletions
diff --git a/tools/test.py b/tools/test.py index 3edfa4e01..91557e0fd 100755 --- a/tools/test.py +++ b/tools/test.py @@ -4,21 +4,24 @@ import os import sys from check_output_test import check_output_test -from util import executable_suffix, run +from util import executable_suffix, run, build_path def check_exists(filename): if not os.path.exists(filename): print "Required target doesn't exist:", filename - print "Build target :all" + print "Run ./tools/build.py" sys.exit(1) def main(argv): - if len(argv) != 2: - print "Usage: tools/test.py [build dir]" + if len(argv) == 2: + build_dir = sys.argv[1] + elif len(argv) == 1: + build_dir = build_path() + else: + print "Usage: tools/test.py [build_dir]" sys.exit(1) - build_dir = argv[1] test_cc = os.path.join(build_dir, "test_cc" + executable_suffix) check_exists(test_cc) @@ -30,6 +33,9 @@ def main(argv): deno_exe = os.path.join(build_dir, "deno" + executable_suffix) check_exists(deno_exe) + run([deno_exe, "js/unit_tests.ts"]) + + check_exists(deno_exe) check_output_test(deno_exe) deno_ns_exe = os.path.join(build_dir, "deno_ns" + executable_suffix) |