diff options
author | Matt Mastracci <matthew@mastracci.com> | 2024-02-10 13:22:13 -0700 |
---|---|---|
committer | GitHub <noreply@github.com> | 2024-02-10 20:22:13 +0000 |
commit | f5e46c9bf2f50d66a953fa133161fc829cecff06 (patch) | |
tree | 8faf2f5831c1c7b11d842cd9908d141082c869a5 /cli/bench | |
parent | d2477f780630a812bfd65e3987b70c0d309385bb (diff) |
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.
Diffstat (limited to 'cli/bench')
-rw-r--r-- | cli/bench/main.rs | 35 |
1 files changed, 14 insertions, 21 deletions
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<i32>)] = &[ // 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<i32>)] = &[ &[ "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<i32>)] = &[ "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<i32>)] = &[ &[ "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<i32>)] = &[ &[ "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<i32>)] = &[ &[ "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<HashMap<String, i64>> { 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<HashMap<String, i64>> { let mut sizes = HashMap::<String, i64>::new(); |