From 4a807f42252c79139b36a8a5d7f721474f795b4d Mon Sep 17 00:00:00 2001 From: Ryan Dahl Date: Wed, 18 Sep 2019 17:23:27 -0400 Subject: First pass at github actions (#2966) --- tools/target_test.py | 18 +++++++++++------- 1 file changed, 11 insertions(+), 7 deletions(-) (limited to 'tools/target_test.py') diff --git a/tools/target_test.py b/tools/target_test.py index cd5e1b7d1..b4cb6996c 100644 --- a/tools/target_test.py +++ b/tools/target_test.py @@ -2,7 +2,7 @@ import os import sys from test_util import DenoTestCase, run_tests -from util import executable_suffix, tests_path, run, run_output +from util import build_mode, executable_suffix, tests_path, run, run_output class TestTarget(DenoTestCase): @@ -23,8 +23,7 @@ class TestTarget(DenoTestCase): def test_cargo_test(self): cargo_test = ["cargo", "test", "--all", "--locked"] - if "DENO_BUILD_MODE" in os.environ and \ - os.environ["DENO_BUILD_MODE"] == "release": + if build_mode() == "release": run(cargo_test + ["--release"]) else: run(cargo_test) @@ -48,11 +47,16 @@ class TestTarget(DenoTestCase): "tests/exec_path.ts" ] result = run_output(cmd, quiet=True) - print "exec_path", result.code - print result.out - print result.err - assert self.deno_exe in result.out.strip() + print "exec_path", result self.assertEqual(result.code, 0) + if os.name == "nt": + # When running in github actions, the windows drive letter of the + # executable path reported by deno has a different case than the one + # reported by python. + assert self.deno_exe.upper() in result.out.strip().upper() + assert self.deno_exe[1:] in result.out.strip() + else: + assert self.deno_exe in result.out.strip() if __name__ == "__main__": -- cgit v1.2.3