diff options
Diffstat (limited to 'cli/integration_tests_runner.rs')
-rw-r--r-- | cli/integration_tests_runner.rs | 18 |
1 files changed, 18 insertions, 0 deletions
diff --git a/cli/integration_tests_runner.rs b/cli/integration_tests_runner.rs new file mode 100644 index 000000000..12e83a019 --- /dev/null +++ b/cli/integration_tests_runner.rs @@ -0,0 +1,18 @@ +// Copyright 2018-2024 the Deno authors. All rights reserved. MIT license. +pub fn main() { + let mut args = vec!["cargo", "test", "-p", "cli_tests", "--features", "run"]; + + if !cfg!(debug_assertions) { + args.push("--release"); + } + + args.push("--"); + + // If any args were passed to this process, pass them through to the child + let orig_args = std::env::args().skip(1).collect::<Vec<_>>(); + let orig_args: Vec<&str> = + orig_args.iter().map(|x| x.as_ref()).collect::<Vec<_>>(); + args.extend(orig_args); + + test_util::spawn::exec_replace("cargo", &args).unwrap(); +} |