mirror of
https://github.com/denoland/deno.git
synced 2025-09-26 12:19:12 +00:00
parent
595b4daa77
commit
acaff6d056
24 changed files with 179 additions and 4022 deletions
|
@ -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")
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue