summaryrefslogtreecommitdiff
path: root/tools/test.py
diff options
context:
space:
mode:
Diffstat (limited to 'tools/test.py')
-rwxr-xr-xtools/test.py16
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)