From 9d90c4ae955d789d2895b8efc153aa55be6ec376 Mon Sep 17 00:00:00 2001 From: Ryan Dahl Date: Thu, 9 Aug 2018 14:48:17 -0700 Subject: Adds js/unit_tests.ts (#448) --- tools/test.py | 16 +++++++++++----- 1 file changed, 11 insertions(+), 5 deletions(-) (limited to 'tools/test.py') 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) @@ -29,6 +32,9 @@ def main(argv): run([test_rs]) 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) -- cgit v1.2.3