diff options
Diffstat (limited to 'tools')
-rwxr-xr-x | tools/benchmark.py | 4 | ||||
-rwxr-xr-x | tools/fmt_test.py | 11 | ||||
-rwxr-xr-x | tools/unit_tests.py | 4 |
3 files changed, 12 insertions, 7 deletions
diff --git a/tools/benchmark.py b/tools/benchmark.py index 6a4ec29c8..cf2bc4ff7 100755 --- a/tools/benchmark.py +++ b/tools/benchmark.py @@ -23,8 +23,8 @@ exec_time_benchmarks = [ ("hello", ["tests/002_hello.ts"]), ("relative_import", ["tests/003_relative_import.ts"]), ("error_001", ["tests/error_001.ts"]), - ("cold_hello", ["tests/002_hello.ts", "--recompile"]), - ("cold_relative_import", ["tests/003_relative_import.ts", "--recompile"]), + ("cold_hello", ["tests/002_hello.ts", "--reload"]), + ("cold_relative_import", ["tests/003_relative_import.ts", "--reload"]), ] gh_pages_data_file = "gh-pages/data.json" diff --git a/tools/fmt_test.py b/tools/fmt_test.py index d4aca75aa..dd704485d 100755 --- a/tools/fmt_test.py +++ b/tools/fmt_test.py @@ -4,6 +4,7 @@ import os import sys from util import mkdtemp, root_path, tests_path, run, green_ok import shutil +import json def fmt_test(deno_exe): @@ -18,13 +19,17 @@ def fmt_test(deno_exe): # Set DENO_DIR to //js/ so we don't have to rely on an intenet # connection to download https://deno.land/std/prettier/main.ts deno_dir = os.path.join(root_path, "js") - run([deno_exe, dst, "--fmt", "--allow-read"], - merge_env={"DENO_DIR": deno_dir}) + run([deno_exe, dst, "--fmt"], merge_env={"DENO_DIR": deno_dir}) with open(fixed_filename) as f: expected = f.read() with open(dst) as f: actual = f.read() - assert expected == actual + if expected != actual: + print "Expected didn't match actual." + print "expected: ", json.dumps(expected) + print "actual: ", json.dumps(actual) + sys.exit(1) + finally: shutil.rmtree(d) print green_ok() diff --git a/tools/unit_tests.py b/tools/unit_tests.py index 216fab81e..45b35b417 100755 --- a/tools/unit_tests.py +++ b/tools/unit_tests.py @@ -32,7 +32,7 @@ def run_unit_test2(cmd): def run_unit_test(deno_exe, permStr, flags=None): if flags is None: flags = [] - cmd = [deno_exe, "--reload", "js/unit_tests.ts", permStr] + flags + cmd = [deno_exe, "js/unit_tests.ts", permStr] + flags run_unit_test2(cmd) @@ -43,7 +43,7 @@ def run_unit_test(deno_exe, permStr, flags=None): # tests by the special string. permW0N0 means allow-write but not allow-net. # See js/test_util.ts for more details. def unit_tests(deno_exe): - run_unit_test(deno_exe, "permR0W0N0E0U0") + run_unit_test(deno_exe, "permR0W0N0E0U0", ["--reload"]) run_unit_test(deno_exe, "permR1W0N0E0U0", ["--allow-read"]) run_unit_test(deno_exe, "permR0W1N0E0U0", ["--allow-write"]) run_unit_test(deno_exe, "permR1W1N0E0U0", |