Skip to content

fix: check command before running analyze - #50

Merged
brunoerg merged 1 commit into
brunoerg:mainfrom
naiyoma:fix/timeout-error
Jul 20, 2026
Merged

fix: check command before running analyze#50
brunoerg merged 1 commit into
brunoerg:mainfrom
naiyoma:fix/timeout-error

Conversation

@naiyoma

@naiyoma naiyoma commented Jul 13, 2026

Copy link
Copy Markdown
Contributor

fixes: #44

We check the command before running analyze

Previously: A bad command (e.g. an invalid --run_test filter, which makes Boost exit 200) failed for every mutant. Each failure was recorded as killed, so the run reported a
incorrect 100% mutation score.

STDERR:
Test setup error: no test cases matching filter or all test cases were disabled

  KILLED ✅
Executing command: git restore src/net_processing.cpp


Now: The run aborts immediately with a clear error, no mutants are analyzed (they stay pending), and the process exits non-zero.

bcm analyze --sqlite --run-id=1 -c "build/bin/test_bitcoin --run_test=nope_not_real"
Analyzing mutants for project: Bitcoin Core
* 13 MUTANTS in run_id=1 *
Baseline check: running the test command on unmutated code...
Executing command: build/bin/test_bitcoin --run_test=nope_not_real
Command exit code: 200
STDERR:
Test setup error: no test cases matching filter or all test cases were disabled

Error: InvalidInput("Test command failed before any mutant was applied. Fix the command and re-run. Command: build/bin/test_bitcoin --run_test=nope_not_real")

@brunoerg

Copy link
Copy Markdown
Owner

Sorry for the delay, not sure why I did not receive the notification about it.

@brunoerg brunoerg left a comment

Copy link
Copy Markdown
Owner

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

ACK 203b15b

@brunoerg
brunoerg merged commit 3e64f64 into brunoerg:main Jul 20, 2026
1 check passed
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.

Test setup errors and timeouts are incorrectly treated as mutants being killed

2 participants