0
0
Fork 0
mirror of https://github.com/denoland/deno.git synced 2025-02-21 12:53:05 -05:00
denoland-deno/cli
Matt Mastracci 83074caed0 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-15 10:32:20 +05:30
..
args refactor: extract out runtime::colors to deno_terminal::colors (#22324) 2024-02-08 14:56:46 +05:30
bench chore: remove unneeded benchmark (#22300) 2024-02-08 14:56:46 +05:30
cache fix: upgrade to deno_ast 0.33 (#22341) 2024-02-15 10:32:20 +05:30
js chore: upgrade deno_core to 0.259.0 (#22311) 2024-02-08 14:56:46 +05:30
lsp fix: upgrade to deno_ast 0.33 (#22341) 2024-02-15 10:32:20 +05:30
napi 1.40.4 (#22344) 2024-02-08 15:48:32 +05:30
npm feat(lockfile): track JSR and npm dependencies in config file (#22004) 2024-01-22 22:31:12 +01:00
ops refactor(cli): Move op descriptions into Rust and prepare for op import (#22271) 2024-02-08 14:56:46 +05:30
schemas feat(publish): exclude and include (#22055) 2024-01-24 20:30:08 +00:00
standalone refactor: load bytes in deno_graph (#22212) 2024-02-01 11:19:56 +05:30
tests refactor: split integration tests from CLI (part 1) (#22308) 2024-02-15 10:32:20 +05:30
tools fix: upgrade to deno_ast 0.33 (#22341) 2024-02-15 10:32:20 +05:30
tsc docs(cli): add unit info for idleTimeout (#22335) 2024-02-08 14:56:46 +05:30
util fix: upgrade to deno_ast 0.33 (#22341) 2024-02-15 10:32:20 +05:30
auth_tokens.rs fix(cli): Add IP address support to DENO_AUTH_TOKEN (#22297) 2024-02-08 14:56:46 +05:30
build.rs feat(web): ImageBitmap (#21898) 2024-01-22 12:08:01 +01:00
Cargo.toml refactor: split integration tests from CLI (part 1) (#22308) 2024-02-15 10:32:20 +05:30
cdp.rs refactor(tools/repl): reorganize code (#21810) 2024-01-05 16:14:58 +01:00
deno.ico fix(cli): add icon and metadata to deno.exe on Windows (#6693) 2020-07-15 21:54:38 +02:00
deno_std.rs 1.40.4 (#22344) 2024-02-08 15:48:32 +05:30
emit.rs refactor: load bytes in deno_graph (#22212) 2024-02-01 11:19:56 +05:30
entitlements.plist chore: start codesigning mac release builds (#21303) 2023-11-23 15:30:26 -07:00
errors.rs fix: upgrade to deno_ast 0.33 (#22341) 2024-02-15 10:32:20 +05:30
factory.rs chore: temporarily disable deprecation warnings (#22204) 2024-02-01 11:19:56 +05:30
file_fetcher.rs refactor: load bytes in deno_graph (#22212) 2024-02-01 11:19:56 +05:30
graph_util.rs refactor: load bytes in deno_graph (#22212) 2024-02-01 11:19:56 +05:30
http_util.rs chore: update copyright to 2024 (#21753) 2024-01-01 19:58:21 +00:00
js.rs chore: update copyright to 2024 (#21753) 2024-01-01 19:58:21 +00:00
main.rs fix: upgrade to deno_ast 0.33 (#22341) 2024-02-15 10:32:20 +05:30
module_loader.rs refactor: extract out runtime::colors to deno_terminal::colors (#22324) 2024-02-08 14:56:46 +05:30
node.rs fix: upgrade to deno_ast 0.33 (#22341) 2024-02-15 10:32:20 +05:30
README.md docs(cli): do not need gen doc for cli (#17260) 2023-01-04 13:19:58 +01:00
resolver.rs refactor(cli): decouple resolvers from module_loader.rs for standalone use (#22147) 2024-02-01 11:19:56 +05:30
version.rs chore: update copyright to 2024 (#21753) 2024-01-01 19:58:21 +00:00
worker.rs refactor: extract out runtime::colors to deno_terminal::colors (#22324) 2024-02-08 14:56:46 +05:30

Deno CLI Crate

crates

This provides the actual deno executable and the user-facing APIs.

The deno crate uses the deno_core to provide the executable.