Skip to content

Commit

Permalink
[nextest-runner] prepare for releases
Browse files Browse the repository at this point in the history
Add documentation and changelogs, and bump version.
  • Loading branch information
sunshowers committed Jun 2, 2022
1 parent c7c29c8 commit 3efdbc3
Show file tree
Hide file tree
Showing 8 changed files with 52 additions and 14 deletions.
4 changes: 2 additions & 2 deletions Cargo.lock

Some generated files are not rendered by default. Learn more about how customized files appear on GitHub.

4 changes: 2 additions & 2 deletions cargo-nextest/Cargo.toml
Original file line number Diff line number Diff line change
@@ -1,7 +1,7 @@
[package]
name = "cargo-nextest"
description = "A next-generation test runner for Rust."
version = "0.9.15"
version = "0.9.16"
readme = "README.md"
license = "Apache-2.0 OR MIT"
repository = "https://github.com/nextest-rs/nextest"
Expand All @@ -26,7 +26,7 @@ log = "0.4.17"
itertools = "0.10.2"
miette = { version = "4.7.1", features = ["fancy"] }
nextest-filtering = { version = "0.1.0", path = "../nextest-filtering" }
nextest-runner = { version = "0.8.0", path = "../nextest-runner" }
nextest-runner = { version = "0.8.1", path = "../nextest-runner" }
nextest-metadata = { version = "0.4.0", path = "../nextest-metadata" }
owo-colors = { version = "3.4.0", features = ["supports-colors"] }
pathdiff = { version = "0.2.1", features = ["camino"] }
Expand Down
20 changes: 19 additions & 1 deletion nextest-runner/CHANGELOG.md
Original file line number Diff line number Diff line change
@@ -1,5 +1,23 @@
# Changelog

## [0.8.1] - 2022-06-02

### Added

- Nextest now [sets `NEXTEST_LD_*` and `NEXTEST_DYLD_*` environment
variables](https://nexte.st/book/env-vars.html#environment-variables-nextest-sets) to work around
macOS System Integrity Protection sanitization.

### Fixed

- While [archiving build artifacts](https://nexte.st/book/reusing-builds), work around some libraries producing linked paths that don't exist ([#247]). Print a warning for those paths instead of failing.

[#247]: https://github.com/nextest-rs/nextest/issues/247

### Changed

- Build artifact archives no longer recurse into linked path subdirectories. This is not a behavioral change because `LD_LIBRARY_PATH` and other similar variables do not recurse into subdirectories either.

## [0.8.0] - 2022-05-31

### Added
Expand All @@ -13,7 +31,6 @@
Fix for experimental feature [filter expressions](https://nexte.st/book/filter-expressions.html):
- Fix test filtering when expression filters are set but name-based filters aren't.


### Changed

- MSRV bumped to Rust 1.59.
Expand Down Expand Up @@ -93,6 +110,7 @@ Thanks to [Guiguiprim](https://github.com/Guiguiprim) for their contributions to

- Initial version.

[0.8.1]: https://github.com/nextest-rs/nextest/releases/tag/nextest-runner-0.8.1
[0.8.0]: https://github.com/nextest-rs/nextest/releases/tag/nextest-runner-0.8.0
[0.7.0]: https://github.com/nextest-rs/nextest/releases/tag/nextest-runner-0.7.0
[0.6.0]: https://github.com/nextest-rs/nextest/releases/tag/nextest-runner-0.6.0
Expand Down
2 changes: 1 addition & 1 deletion nextest-runner/Cargo.toml
Original file line number Diff line number Diff line change
@@ -1,7 +1,7 @@
[package]
name = "nextest-runner"
description = "Core runner logic for cargo nextest."
version = "0.8.0"
version = "0.8.1"
readme = "README.md"
license = "MIT OR Apache-2.0"
repository = "https://github.com/nextest-rs/nextest"
Expand Down
4 changes: 2 additions & 2 deletions nextest-runner/src/list/test_list.rs
Original file line number Diff line number Diff line change
Expand Up @@ -690,8 +690,8 @@ pub(crate) fn make_test_expression(
// Nextest never changes these environment variables within its own process, so caching them is
// valid.
fn is_sip_sanitized(var: &str) -> bool {
// Is this the correct set of environment variables? The exact list isn't documented anywhere
// but it seems like this would be a good heuristic.
// Look for variables starting with LD_ or DYLD_.
// https://briandfoy.github.io/macos-s-system-integrity-protection-sanitizes-your-environment/
var.starts_with("LD_") || var.starts_with("DYLD_")
}

Expand Down
19 changes: 19 additions & 0 deletions site/src/CHANGELOG.md
Original file line number Diff line number Diff line change
Expand Up @@ -3,6 +3,24 @@
This page documents new features and bugfixes for cargo-nextest. Please see the [stability
policy](book/stability.md) for how versioning works with cargo-nextest.

## [0.9.16] - 2022-06-02

### Added

- Nextest now [sets `NEXTEST_LD_*` and `NEXTEST_DYLD_*` environment
variables](https://nexte.st/book/env-vars.html#environment-variables-nextest-sets) to work around
macOS System Integrity Protection sanitization.

### Fixed

- While [archiving build artifacts](https://nexte.st/book/reusing-builds), work around some libraries producing linked paths that don't exist ([#247]). Print a warning for those paths instead of failing.

[#247]: https://github.com/nextest-rs/nextest/issues/247

### Changed

- Build artifact archives no longer recurse into linked path subdirectories. This is not a behavioral change because `LD_LIBRARY_PATH` and other similar variables do not recurse into subdirectories either.

## [0.9.15] - 2022-05-31

### Added
Expand Down Expand Up @@ -193,6 +211,7 @@ Supported in this initial release:
* [Test retries](book/retries.md) and flaky test detection
* [JUnit support](book/junit.md) for integration with other test tooling

[0.9.16]: https://github.com/nextest-rs/nextest/releases/tag/cargo-nextest-0.9.16
[0.9.15]: https://github.com/nextest-rs/nextest/releases/tag/cargo-nextest-0.9.15
[0.9.14]: https://github.com/nextest-rs/nextest/releases/tag/cargo-nextest-0.9.14
[0.9.13]: https://github.com/nextest-rs/nextest/releases/tag/cargo-nextest-0.9.13
Expand Down
7 changes: 6 additions & 1 deletion site/src/book/env-vars.md
Original file line number Diff line number Diff line change
Expand Up @@ -29,9 +29,14 @@ cargo-nextest exposes these environment variables to your tests *at runtime only

* `NEXTEST` — always set to `"1"`.
* `NEXTEST_EXECUTION_MODE` — currently, always set to `process-per-test`. More options may be added in the future if nextest gains the ability to run all tests within the same process ([#27]).
* `NEXTEST_BIN_EXE_<name>`: The absolute path to a binary target's executable. This is only set when running an [integration test] or benchmark. The `<name>` is the name of the binary target, exactly as-is. For example, `NEXTEST_BIN_EXE_my-program` for a binary named `my-program`.
* `NEXTEST_BIN_EXE_<name>`The absolute path to a binary target's executable. This is only set when running an [integration test] or benchmark. The `<name>` is the name of the binary target, exactly as-is. For example, `NEXTEST_BIN_EXE_my- program` for a binary named `my-program`.
* Binaries are automatically built when the test is built, unless the binary has required features that are not enabled.
* When [reusing builds](reusing-builds.md) from an archive, this is set to the remapped path within the target directory.
* `NEXTEST_LD_*` and `NEXTEST_DYLD_*` — These replicate the values of any environment variables that start with the prefixes `LD_*` and `DYLD_*`, such as `LD_LIBRARY_PATH` or `DYLD_LIBRARY_PATH`.

This is a workaround for [macOS's System Integrity Protection](https://developer.apple.com/library/archive/documentation/Security/Conceptual/System_Integrity_Protection_Guide/RuntimeProtections/RuntimeProtections.html) sanitizing dynamic linker environment variables for processes like the system `bash`, and is particularly relevant for [target runners](target-runners.md). See [this blog post](https://briandfoy.github.io/macos-s-system-integrity-protection-sanitizes-your-environment/) for more about how sanitization works.

> Note: The `NEXTEST_LD_*` and `NEXTEST_DYLD_*` variables are set on all platforms, not just macOS.
[#27]: https://github.com/nextest-rs/nextest/issues/27
[integration test]: https://doc.rust-lang.org/cargo/reference/cargo-targets.html#integration-tests
Expand Down
6 changes: 1 addition & 5 deletions site/src/book/target-runners.md
Original file line number Diff line number Diff line change
Expand Up @@ -28,11 +28,7 @@ Then, running this command will cause your tests to be run as `wine <test-binary
cargo nextest run --target x86_64-pc-windows-msvc
```

> **Note:** If your target runner is a shell script, it might malfunction on macOS due to System Integrity Protection's environment sanitization. This is a system limitation with macOS and not a bug in nextest.
>
> See the discussion in [PR #84] for more.
[PR #84]: https://github.com/nextest-rs/nextest/pull/84
> **Note:** If your target runner is a shell script, it might malfunction on macOS due to System Integrity Protection's environment sanitization. Nextest provides the `NEXTEST_LD_*` and `NEXTEST_DYLD_*` environment variables as workarounds: see [Environment variables nextest sets](env-vars.md#environment-variables-nextest-sets) for more.
## Cross-compiling

Expand Down

0 comments on commit 3efdbc3

Please sign in to comment.