summaryrefslogtreecommitdiff
path: root/cli/tools/test/mod.rs
diff options
context:
space:
mode:
authorMatt Mastracci <matthew@mastracci.com>2024-02-28 09:12:43 -0700
committerGitHub <noreply@github.com>2024-02-28 09:12:43 -0700
commita3f982c1d58a4c96377348aae203ab3f2c234729 (patch)
tree47a2968e50fa80c25b7fd4e8f9edb72f024f895d /cli/tools/test/mod.rs
parentc2c4e745a5db4f2e53aa70bf22b6c828fa1b4040 (diff)
chore(cli): rename `--trace-ops` to `--trace-leaks` (#22598)
As we add tracing to more types of runtime activity, `--trace-ops` is less useful of a name. `--trace-leaks` better reflects that this feature traces both ops and timers, and will eventually trace resource opening as well. This keeps `--trace-ops` as an alias for `--trace-leaks`, but prints a warning to the console suggesting migration to `--trace-leaks`. One test continues to use `--trace-ops` to test the deprecation warning. --------- Signed-off-by: Matt Mastracci <matthew@mastracci.com>
Diffstat (limited to 'cli/tools/test/mod.rs')
-rw-r--r--cli/tools/test/mod.rs8
1 files changed, 4 insertions, 4 deletions
diff --git a/cli/tools/test/mod.rs b/cli/tools/test/mod.rs
index 526f48c21..13c1c3ed6 100644
--- a/cli/tools/test/mod.rs
+++ b/cli/tools/test/mod.rs
@@ -440,7 +440,7 @@ struct TestSpecifiersOptions {
pub struct TestSpecifierOptions {
pub shuffle: Option<u64>,
pub filter: TestFilter,
- pub trace_ops: bool,
+ pub trace_leaks: bool,
}
impl TestSummary {
@@ -559,7 +559,7 @@ async fn test_specifier_inner(
let mut coverage_collector = worker.maybe_setup_coverage_collector().await?;
- if options.trace_ops {
+ if options.trace_leaks {
worker.execute_script_static(
located_script_name!(),
"Deno[Deno.internal].core.setLeakTracingEnabled(true);",
@@ -1503,7 +1503,7 @@ pub async fn run_tests(
specifier: TestSpecifierOptions {
filter: TestFilter::from_flag(&test_options.filter),
shuffle: test_options.shuffle,
- trace_ops: test_options.trace_ops,
+ trace_leaks: test_options.trace_leaks,
},
},
)
@@ -1647,7 +1647,7 @@ pub async fn run_tests_with_watch(
specifier: TestSpecifierOptions {
filter: TestFilter::from_flag(&test_options.filter),
shuffle: test_options.shuffle,
- trace_ops: test_options.trace_ops,
+ trace_leaks: test_options.trace_leaks,
},
},
)