Skip to content

cargoNextest and cargoTest silently do not run anything #865

@RossSmyth

Description

@RossSmyth

Describe the bug

There is no error message, since it's just bash it silently fails when something doesn't run.

If I look at the derivation outputs, there is a target.tar.zst and target.tar.zst.prev in the result directory and nothing else. Running cargo test normally works fine outside of Nix.

Things that work: cargoAudit, cargoClippy, cargoDeny, cargoBuild

$ nix build .#checks.x86_64-linux.test --rebuild -L
> Running phase: unpackPhase
> unpacking source archive /nix/store/xxvpnqjf8kzb2h8wm3ha3b2fb96ga358-source
> source root is source
> Running phase: patchPhase
> Executing configureCargoCommonVars
> copying cargo artifacts from /nix/store/qa2bl9lby76nk5mjgkqjqw7294yzh8ij-PROJECT-1.0.0 to target
> Running phase: updateAutotoolsGnuConfigScriptsPhase
> Running phase: configurePhase
> will append /build/source/.cargo-home/config.toml with contents of /nix/store/pmfsi5s6wfq3lmk5493lqmil44i7vm5v-vendor-cargo-deps/config.toml
> default configurePhase, nothing to do
> Running phase: buildPhase
> +++ command cargo --version
> cargo 1.88.0 (873a06493 2025-05-10)
> +++ command cargo nextest --version
> cargo-nextest 0.9.99
> release: 0.9.99
> host: x86_64-unknown-linux-gnu
> Running phase: installPhase
> linking previous artifacts /nix/store/qa2bl9lby76nk5mjgkqjqw7294yzh8ij-PROJECT-1.0.0 to /nix/store/x0f4hzvds3842blf94bkh20jprb6y6ad-PROJECT-nextest-1.0.0/target.tar.zst
> /*stdin*\            :  0.21%   (  10.0 KiB =>     22 B, /nix/store/x0f4hzvds3842blf94bkh20jprb6y6ad-PROJECT-nextest-1.0.0/target.tar.zst)
> Running phase: fixupPhase
> shrinking RPATHs of ELF executables and libraries in /nix/store/x0f4hzvds3842blf94bkh20jprb6y6ad-PROJECT-nextest-1.0.0
> checking for references to /build/ in /nix/store/x0f4hzvds3842blf94bkh20jprb6y6ad-PROJECT-nextest-1.0.0...
> patching script interpreter paths in /nix/store/x0f4hzvds3842blf94bkh20jprb6y6ad-PROJECT-nextest-1.0.0
$ ls result/
> target.tar.zst  target.tar.zst.prev

Reproduction

I will try to do so when I get home.

Metadata

Metadata

Assignees

No one assigned

    Labels

    bugSomething isn't working

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions