0
0
Fork 0
mirror of https://github.com/denoland/deno.git synced 2025-02-09 15:42:18 -05:00
denoland-deno/cli/tests/integration
Matt Mastracci dcbbcd23f5
refactor: split integration tests from CLI (part 1) (#22308)
This PR separates integration tests from CLI tests into a new project
named `cli_tests`. This is a prerequisite for an integration test runner
that can work with either the CLI binary in the current project, or one
that is built ahead of time.

## Background

Rust does not have the concept of artifact dependencies yet
(https://github.com/rust-lang/cargo/issues/9096). Because of this, the
only way we can ensure a binary is built before running associated tests
is by hanging tests off the crate with the binary itself.

Unfortunately this means that to run those tests, you _must_ build the
binary and in the case of the deno executable that might be a 10 minute
wait in release mode.

## Implementation

To allow for tests to run with and without the requirement that the
binary is up-to-date, we split the integration tests into a project of
their own. As these tests would not require the binary to build itself
before being run as-is, we add a stub integration `[[test]]` target in
the `cli` project that invokes these tests using `cargo test`.

The stub test runner we add has `harness = false` so that we can get
access to a `main` function. This `main` function's sole job is to
`execvp` the command `cargo test -p deno_cli`, effectively "calling"
another cargo target.

This ensures that the deno executable is always correctly rebuilt before
running the stub test runner from `cli`, and gets us closer to be able
to run the entire integration test suite on arbitrary deno executables
(and therefore split the build into multiple phases).

The new `cli_tests` project lives within `cli` to avoid a large PR. In
later PRs, the test data will be split from the `cli` project. As there
are a few thousand files, it'll be better to do this as a completely
separate PR to avoid noise.
2024-02-09 13:33:05 -07:00
..
bench_tests.rs chore: update copyright to 2024 (#21753) 2024-01-01 19:58:21 +00:00
bundle_tests.rs chore: update copyright to 2024 (#21753) 2024-01-01 19:58:21 +00:00
cache_tests.rs chore: update copyright to 2024 (#21753) 2024-01-01 19:58:21 +00:00
cert_tests.rs refactor: split integration tests from CLI (part 1) (#22308) 2024-02-09 13:33:05 -07:00
check_tests.rs fix: remove conditional unstable type-checking from other commands (#21991) 2024-01-21 22:47:46 +00:00
compile_tests.rs refactor: load bytes in deno_graph (#22212) 2024-02-01 03:15:22 +00:00
coverage_tests.rs chore: update copyright to 2024 (#21753) 2024-01-01 19:58:21 +00:00
doc_tests.rs feat: warn when using --unstable, prefer granular flags (#21452) 2024-01-23 15:33:07 +01:00
eval_tests.rs refactor: don't error when .env is not present (#21879) 2024-01-22 00:27:14 +01:00
flags_tests.rs chore: update copyright to 2024 (#21753) 2024-01-01 19:58:21 +00:00
fmt_tests.rs chore: update copyright to 2024 (#21753) 2024-01-01 19:58:21 +00:00
info_tests.rs feat: warn when using --unstable, prefer granular flags (#21452) 2024-01-23 15:33:07 +01:00
init_tests.rs chore: update copyright to 2024 (#21753) 2024-01-01 19:58:21 +00:00
inspector_tests.rs refactor: split integration tests from CLI (part 1) (#22308) 2024-02-09 13:33:05 -07:00
install_tests.rs chore: update copyright to 2024 (#21753) 2024-01-01 19:58:21 +00:00
js_unit_tests.rs refactor: split integration tests from CLI (part 1) (#22308) 2024-02-09 13:33:05 -07:00
jsr_tests.rs feat(unstable): fast subset type checking of JSR dependencies (#21873) 2024-01-10 22:40:30 +00:00
jupyter_tests.rs feat(jupyter): don't require --unstable flag (#21963) 2024-01-18 23:16:14 +01:00
lint_tests.rs feat: warn when using --unstable, prefer granular flags (#21452) 2024-01-23 15:33:07 +01:00
lsp_tests.rs fix(lsp): disable no-cache diagnostics for jsr specifiers (#22284) 2024-02-06 14:56:26 +00:00
mod.rs fix(jupyter): error message when install fails due to jupyter command not being on PATH (#21767) 2024-01-03 14:45:10 +00:00
node_compat_tests.rs chore: use @test_util for node_compat tests (#22331) 2024-02-07 23:21:32 +00:00
node_unit_tests.rs refactor: split integration tests from CLI (part 1) (#22308) 2024-02-09 13:33:05 -07:00
npm_tests.rs refactor: load bytes in deno_graph (#22212) 2024-02-01 03:15:22 +00:00
publish_tests.rs chore: use same test server for jsr tests (#22303) 2024-02-07 02:06:34 +00:00
repl_tests.rs feat: TC39 decorator proposal support (#22040) 2024-01-24 18:46:23 +05:30
run_tests.rs refactor: split integration tests from CLI (part 1) (#22308) 2024-02-09 13:33:05 -07:00
shared_library_tests.rs chore: update copyright to 2024 (#21753) 2024-01-01 19:58:21 +00:00
task_tests.rs fix(task): do not eagerly auto-install packages in package.json when "nodeModulesDir": false (#21858) 2024-01-08 19:30:36 -05:00
test_tests.rs feat: warn when using --unstable, prefer granular flags (#21452) 2024-01-23 15:33:07 +01:00
upgrade_tests.rs chore: update copyright to 2024 (#21753) 2024-01-01 19:58:21 +00:00
vendor_tests.rs chore: update copyright to 2024 (#21753) 2024-01-01 19:58:21 +00:00
watcher_tests.rs feat(cli): improved diagnostics printing (#22049) 2024-01-23 16:37:43 +01:00
worker_tests.rs chore: Promote some integration tests to js_unit_tests (#22355) 2024-02-08 13:09:47 -07:00