diff --git a/LICENSE-MIT b/LICENSE-MIT index 31aa79387f2..35709107834 100644 --- a/LICENSE-MIT +++ b/LICENSE-MIT @@ -1,3 +1,5 @@ +Copyright (c) The nextest Contributors + Permission is hereby granted, free of charge, to any person obtaining a copy of this software and associated documentation files (the "Software"), to deal in the diff --git a/nextest-metadata/CHANGELOG.md b/nextest-metadata/CHANGELOG.md index 53c6cf9d8f0..5b70165c2d2 100644 --- a/nextest-metadata/CHANGELOG.md +++ b/nextest-metadata/CHANGELOG.md @@ -1,5 +1,15 @@ # Changelog +## [0.10.0] - 2023-12-09 + +### Added + +- `RustBuildMetaSummary` has a new field called `build_script_out_dirs`. This is a map of workspace package IDs to their corresponding build script `OUT_DIR`s. + +### Misc + +- The `.crate` files uploaded to crates.io now contain the `LICENSE-APACHE` and `LICENSE-MIT` license files. Thanks [@musicinmybrain](https://github.com/musicinmybrain) for your first contribution! + ## [0.9.3] - 2023-12-03 ### Added @@ -187,6 +197,7 @@ This release is compatible with cargo-nextest 0.9.10 and later. - Initial version, with support for listing tests. +[0.10.0]: https://github.com/nextest-rs/nextest/releases/tag/nextest-metadata-0.10.0 [0.9.3]: https://github.com/nextest-rs/nextest/releases/tag/nextest-metadata-0.9.3 [0.9.2]: https://github.com/nextest-rs/nextest/releases/tag/nextest-metadata-0.9.2 [0.9.1]: https://github.com/nextest-rs/nextest/releases/tag/nextest-metadata-0.9.1 diff --git a/site/src/CHANGELOG.md b/site/src/CHANGELOG.md index 9bd8b9af66d..ade265ae864 100644 --- a/site/src/CHANGELOG.md +++ b/site/src/CHANGELOG.md @@ -36,6 +36,10 @@ support: use case that would benefit from this, please [file an issue](https://github.com/nextest-rs/nextest/issues/new). +### Misc + +- The `.crate` files uploaded to crates.io now contain the `LICENSE-APACHE` and `LICENSE-MIT` license files. Thanks [@musicinmybrain](https://github.com/musicinmybrain) for your first contribution! + ## [0.9.64] - 2023-12-03 ### Added diff --git a/site/src/book/env-vars.md b/site/src/book/env-vars.md index fe284741fcf..c03b613ed32 100644 --- a/site/src/book/env-vars.md +++ b/site/src/book/env-vars.md @@ -49,7 +49,7 @@ Nextest exposes these environment variables to your tests _at runtime only_. The Nextest delegates to Cargo for the build, which controls the environment variables that are set. See [Environment variables Cargo sets for crates](https://doc.rust-lang.org/cargo/reference/environment-variables.html#environment-variables-cargo-sets-for-crates) for a full list. -Nextest also sets these environment variables at runtime, matching the behavior of cargo test: +Nextest also sets these environment variables at runtime, matching the behavior of `cargo test`: - `CARGO` — Path to the `cargo` binary performing the build. - `CARGO_MANIFEST_DIR` — The directory containing the manifest of your package. If [`--workspace-remap`](reusing-builds.md#specifying-a-new-location-for-the-workspace) is passed in, this is set to the remapped manifest directory. You can obtain the non-remapped directory using the value of this variable at compile-time, e.g. `env!("CARGO_MANIFEST_DIR")`. @@ -66,6 +66,7 @@ Nextest also sets these environment variables at runtime, matching the behavior - `CARGO_PKG_LICENSE` — The license from the manifest of your package. - `CARGO_PKG_LICENSE_FILE` — The license file from the manifest of your package. - Environment variables specified in [the `[env]` section of `.cargo/config.toml`](https://doc.rust-lang.org/cargo/reference/config.html#env). +- `OUT_DIR` — The path to the package's build script output directory. Only set if the crate has a build script. ### Dynamic library paths diff --git a/site/src/book/machine-readable.md b/site/src/book/machine-readable.md index 9675735ade1..c842c44bbb5 100644 --- a/site/src/book/machine-readable.md +++ b/site/src/book/machine-readable.md @@ -4,51 +4,71 @@ cargo-nextest can be configured to produce machine-readable JSON output, readabl ## Listing tests -To produce a list of tests in the JSON output format `cargo nextest list --message-format json` (or `json-pretty` for nicely formatted output). Here's some example output for the [tokio repository](https://github.com/tokio-rs/tokio): +To produce a list of tests using the JSON output, use `cargo nextest list --message-format json` (or `json-pretty` for nicely formatted output). Here's some example output for [camino](https://github.com/camino-rs/camino): ```json -% cargo nextest list -p tokio-util --features full --lib --message-format json-pretty +% cargo nextest list --all-features --lib --message-format json-pretty { "rust-build-meta": { - "target-directory": "/home/rain/dev/tokio/target", + "target-directory": "/home/rain/dev/camino/target", "base-output-directories": [ "debug" ], "non-test-binaries": {}, - "linked-paths": [] + "build-script-out-dirs": { + "camino 1.1.6 (path+file:///home/rain/dev/camino)": "debug/build/camino-02991de38c555ca1/out" + }, + "linked-paths": [], + "target-platforms": [ + { + "triple": "x86_64-unknown-linux-gnu", + "target-features": [ + "fxsr", + "sse", + "sse2" + ] + } + ], + "target-platform": null }, - "test-count": 4, + "test-count": 5, "rust-suites": { - "tokio-util": { - "package-name": "tokio-util", - "binary-id": "tokio-util", - "binary-name": "tokio-util", - "package-id": "tokio-util 0.7.3 (path+file:///home/rain/dev/tokio/tokio-util)", + "camino": { + "package-name": "camino", + "binary-id": "camino", + "binary-name": "camino", + "package-id": "camino 1.1.6 (path+file:///home/rain/dev/camino)", "kind": "lib", - "binary-path": "/home/me/dev/tokio/target/debug/deps/tokio_util-9dd5cbf268a3ffb4", + "binary-path": "/home/rain/dev/camino/target/debug/deps/camino-1bdca073ddd4474a", "build-platform": "target", - "cwd": "/home/me/dev/tokio/tokio-util", + "cwd": "/home/rain/dev/camino", "status": "listed", "testcases": { - "either::tests::either_is_async_read": { + "serde_impls::tests::invalid_utf8": { + "ignored": false, + "filter-match": { + "status": "matches" + } + }, + "serde_impls::tests::valid_utf8": { "ignored": false, "filter-match": { "status": "matches" } }, - "either::tests::either_is_stream": { + "tests::test_borrowed_into": { "ignored": false, "filter-match": { "status": "matches" } }, - "time::wheel::level::test::test_slot_for": { + "tests::test_deref_mut": { "ignored": false, "filter-match": { "status": "matches" } }, - "time::wheel::test::test_level_for": { + "tests::test_owned_into": { "ignored": false, "filter-match": { "status": "matches" diff --git a/site/src/book/reusing-builds.md b/site/src/book/reusing-builds.md index 59bb7b86efc..e671955c112 100644 --- a/site/src/book/reusing-builds.md +++ b/site/src/book/reusing-builds.md @@ -31,8 +31,12 @@ In some cases, it can be useful to separate out building tests from running them - Metadata about test binaries, at the location `target/nextest/binaries-metadata.json`. - All test binaries - Other relevant files: + - Dynamic libraries that test binaries might link to - Non-test binaries used by integration tests + - Starting nextest 0.9.65, build script output directories for workspace packages that have associated test binaries + + > **NOTE:** Currently, `OUT_DIR`s are only archived one level deep to avoid bloating archives too much. In the future, we may add configuration to archive more or less of the output directory. If you have a use case that would benefit from this, please [file an issue](https://github.com/nextest-rs/nextest/issues/new). **Note that archives do not include the source code for your project.** It is your responsibility to ensure that the source code for your workspace is transferred over to the target machine and has the same contents.