diff options
Diffstat (limited to 'tools/target_test.py')
-rw-r--r-- | tools/target_test.py | 36 |
1 files changed, 7 insertions, 29 deletions
diff --git a/tools/target_test.py b/tools/target_test.py index 8ccabba53..f14aa01d7 100644 --- a/tools/target_test.py +++ b/tools/target_test.py @@ -5,15 +5,6 @@ from test_util import DenoTestCase, run_tests from util import executable_suffix, tests_path, run, run_output -# In the ninja/gn we build and test individually libdeno_test, cli_test, -# deno_core_test, deno_core_http_bench_test. When building with cargo, however -# we just run "cargo test". -# This is hacky but is only temporarily here until the ninja/gn build is -# removed. -def is_cargo_test(): - return "CARGO_TEST" in os.environ - - class TestTarget(DenoTestCase): @staticmethod def check_exists(filename): @@ -32,28 +23,15 @@ class TestTarget(DenoTestCase): run([bin_file], quiet=True) def test_cargo_test(self): - if is_cargo_test(): - cargo_test = ["cargo", "test", "--all", "--locked"] - if os.environ["DENO_BUILD_MODE"] == "release": - run(cargo_test + ["--release"]) - else: - run(cargo_test) + cargo_test = ["cargo", "test", "--all", "--locked"] + if "DENO_BUILD_MODE" in os.environ and \ + os.environ["DENO_BUILD_MODE"] == "release": + run(cargo_test + ["--release"]) + else: + run(cargo_test) def test_libdeno(self): - if not is_cargo_test(): - self._test("libdeno_test") - - def test_cli(self): - if not is_cargo_test(): - self._test("cli_test") - - def test_core(self): - if not is_cargo_test(): - self._test("deno_core_test") - - def test_core_http_benchmark(self): - if not is_cargo_test(): - self._test("deno_core_http_bench_test") + self._test("libdeno_test") def test_no_color(self): t = os.path.join(tests_path, "no_color.js") |