summaryrefslogtreecommitdiff
path: root/cli
diff options
context:
space:
mode:
authorMatt Mastracci <matthew@mastracci.com>2024-02-12 17:13:14 -0700
committerGitHub <noreply@github.com>2024-02-12 17:13:14 -0700
commit3d2e52ae7ecdecadad6830f7991fee79185a9ffe (patch)
tree88a9ad7f3a52d4ab56c79170816fa48139e7e36d /cli
parent49d82e609f7da97f793900528e800019d502a2ff (diff)
chore: continue tests/ re-org (#22396)
Split `node_compat_tests` into its own top-level test so its stdout doesn't stomp on the remainder of the tests.
Diffstat (limited to 'cli')
-rw-r--r--cli/Cargo.toml4
-rw-r--r--cli/integration_tests_runner.rs18
2 files changed, 19 insertions, 3 deletions
diff --git a/cli/Cargo.toml b/cli/Cargo.toml
index 083cb4aa8..03eb73d56 100644
--- a/cli/Cargo.toml
+++ b/cli/Cargo.toml
@@ -4,10 +4,8 @@
name = "deno"
version = "1.40.4"
authors.workspace = true
-autotests = false
default-run = "deno"
edition.workspace = true
-exclude = ["tests/testdata/npm/registry/*"]
license.workspace = true
repository.workspace = true
description = "Provides the deno executable"
@@ -19,7 +17,7 @@ doc = false
[[test]]
name = "integration"
-path = "../tests/integration_tests_runner.rs"
+path = "integration_tests_runner.rs"
harness = false
[[bench]]
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();
+}