From f5e46c9bf2f50d66a953fa133161fc829cecff06 Mon Sep 17 00:00:00 2001 From: Matt Mastracci Date: Sat, 10 Feb 2024 13:22:13 -0700 Subject: chore: move cli/tests/ -> tests/ (#22369) This looks like a massive PR, but it's only a move from cli/tests -> tests, and updates of relative paths for files. This is the first step towards aggregate all of the integration test files under tests/, which will lead to a set of integration tests that can run without the CLI binary being built. While we could leave these tests under `cli`, it would require us to keep a more complex directory structure for the various test runners. In addition, we have a lot of complexity to ignore various test files in the `cli` project itself (cargo publish exclusion rules, autotests = false, etc). And finally, the `tests/` folder will eventually house the `test_ffi`, `test_napi` and other testing code, reducing the size of the root repo directory. For easier review, the extremely large and noisy "move" is in the first commit (with no changes -- just a move), while the remainder of the changes to actual files is in the second commit. --- cli/bench/main.rs | 35 ++++++++++++++--------------------- 1 file changed, 14 insertions(+), 21 deletions(-) (limited to 'cli/bench/main.rs') diff --git a/cli/bench/main.rs b/cli/bench/main.rs index 415f66989..4f5946414 100644 --- a/cli/bench/main.rs +++ b/cli/bench/main.rs @@ -37,7 +37,7 @@ const EXEC_TIME_BENCHMARKS: &[(&str, &[&str], Option)] = &[ // invalidating that cache. ( "cold_hello", - &["run", "--reload", "cli/tests/testdata/run/002_hello.ts"], + &["run", "--reload", "tests/testdata/run/002_hello.ts"], None, ), ( @@ -45,23 +45,19 @@ const EXEC_TIME_BENCHMARKS: &[(&str, &[&str], Option)] = &[ &[ "run", "--reload", - "cli/tests/testdata/run/003_relative_import.ts", + "tests/testdata/run/003_relative_import.ts", ], None, ), - ( - "hello", - &["run", "cli/tests/testdata/run/002_hello.ts"], - None, - ), + ("hello", &["run", "tests/testdata/run/002_hello.ts"], None), ( "relative_import", - &["run", "cli/tests/testdata/run/003_relative_import.ts"], + &["run", "tests/testdata/run/003_relative_import.ts"], None, ), ( "error_001", - &["run", "cli/tests/testdata/run/error_001.ts"], + &["run", "tests/testdata/run/error_001.ts"], Some(1), ), ( @@ -70,7 +66,7 @@ const EXEC_TIME_BENCHMARKS: &[(&str, &[&str], Option)] = &[ "run", "--reload", "--no-check", - "cli/tests/testdata/run/002_hello.ts", + "tests/testdata/run/002_hello.ts", ], None, ), @@ -79,7 +75,7 @@ const EXEC_TIME_BENCHMARKS: &[(&str, &[&str], Option)] = &[ &[ "run", "--allow-read", - "cli/tests/testdata/workers/bench_startup.ts", + "tests/testdata/workers/bench_startup.ts", ], None, ), @@ -88,7 +84,7 @@ const EXEC_TIME_BENCHMARKS: &[(&str, &[&str], Option)] = &[ &[ "run", "--allow-read", - "cli/tests/testdata/workers/bench_round_robin.ts", + "tests/testdata/workers/bench_round_robin.ts", ], None, ), @@ -97,31 +93,28 @@ const EXEC_TIME_BENCHMARKS: &[(&str, &[&str], Option)] = &[ &[ "run", "--allow-read", - "cli/tests/testdata/workers/bench_large_message.ts", + "tests/testdata/workers/bench_large_message.ts", ], None, ), ( "text_decoder", - &["run", "cli/tests/testdata/benches/text_decoder_perf.js"], + &["run", "tests/testdata/benches/text_decoder_perf.js"], None, ), ( "text_encoder", - &["run", "cli/tests/testdata/benches/text_encoder_perf.js"], + &["run", "tests/testdata/benches/text_encoder_perf.js"], None, ), ( "text_encoder_into", - &[ - "run", - "cli/tests/testdata/benches/text_encoder_into_perf.js", - ], + &["run", "tests/testdata/benches/text_encoder_into_perf.js"], None, ), ( "response_string", - &["run", "cli/tests/testdata/benches/response_string_perf.js"], + &["run", "tests/testdata/benches/response_string_perf.js"], None, ), ( @@ -314,7 +307,7 @@ fn get_binary_sizes(target_dir: &Path) -> Result> { const BUNDLES: &[(&str, &str)] = &[ ("file_server", "./test_util/std/http/file_server.ts"), - ("welcome", "./cli/tests/testdata/welcome.ts"), + ("welcome", "./tests/testdata/welcome.ts"), ]; fn bundle_benchmark(deno_exe: &Path) -> Result> { let mut sizes = HashMap::::new(); -- cgit v1.2.3