summaryrefslogtreecommitdiff
path: root/tools/target_test.py
diff options
context:
space:
mode:
authorRyan Dahl <ry@tinyclouds.org>2019-09-18 17:23:27 -0400
committerGitHub <noreply@github.com>2019-09-18 17:23:27 -0400
commit4a807f42252c79139b36a8a5d7f721474f795b4d (patch)
treeb3d749fb14e622aac729e2b059241bf559c38f51 /tools/target_test.py
parent4d3df6f73b7083c03aca174ee99216a2b0444424 (diff)
First pass at github actions (#2966)
Diffstat (limited to 'tools/target_test.py')
-rw-r--r--tools/target_test.py18
1 files changed, 11 insertions, 7 deletions
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__":