Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

feat: Add a --profile option to choose a cargo profile #398

Merged
merged 9 commits into from
Aug 20, 2024
Merged

Conversation

sourcefrog
Copy link
Owner

Fixes #338

@sourcefrog
Copy link
Owner Author

sourcefrog commented Aug 20, 2024

This seems to currently fail baseline tests when run on itself, but not when the tests are run outside of mutants:

test well_tested_tree_finds_no_problems ... ok

failures:

---- hang_avoided_by_build_timeout_with_cap_lints stdout ----
thread 'hang_avoided_by_build_timeout_with_cap_lints' panicked at /home/mbp/.cargo/registry/src/index.crates.io-6f17d22bba15001f/assert_cmd-2.0.0/src/assert.rs:124:9:
Unexpected return code, failed var == 3
└── var: 4

command=`cd "/tmp/.tmpo0X0V9" && env -u RUST_BACKTRACE "/tmp/cargo-mutants-mutants-c1AEL6.tmp/target/mutants/cargo-mutants" "mutants" "--build-timeout-multiplier=4" "--regex=const" "--cap-lints=true"`
code=4
stdout=```"Found 1 mutant to test\nFAILED   Unmutated baseline in 0.1s build\n\n*** baseline\n\n*** /home/mbp/.rustup/toolchains/beta-x86_64-unknown-linux-gnu/bin/cargo test --no-run --verbose --manifest-path /tmp/cargo-mutants-.tmpo0X0V9-KZk1eU.tmp/Cargo.toml\nerror: failed to run `rustc` to learn about target-specific information\n\nCaused by:\n  process didn\'t exit successfully: `/home/mbp/.rustup/toolchains/beta-x86_64-unknown-linux-gnu/bin/rustc - --crate-name ___ --print=file-names \'\' --cap-lints=warn --crate-type bin --crate-type rlib --crate-type dylib --crate-type cdylib --crate-type staticlib --crate-type proc-macro --print=sysroot --print=split-debuginfo --print=crate-name --print=cfg` (exit status: 1)\n  --- stderr\n  error: multiple input filenames provided (first two filenames are `-` and ``)\n\n\n*** result: Failure(101)\n\n"```
stderr=```"ERROR cargo build failed in an unmutated tree, so no mutants were tested\n"```

note: run with `RUST_BACKTRACE=1` environment variable to display a backtrace

This error also occurs when I use cargo-mutants main branch to test this tree, and even with the profile removed from .cargo/mutants.toml.

Actually, maybe this is a separate existing (intermittent?) error?

Fixed in #399, I think.

@sourcefrog sourcefrog marked this pull request as ready for review August 20, 2024 16:39
@sourcefrog sourcefrog merged commit 1586307 into main Aug 20, 2024
41 checks passed
@sourcefrog sourcefrog deleted the profile branch August 20, 2024 16:39
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

Successfully merging this pull request may close these issues.

Try using a build profile that is quick but has no debug symbols
1 participant