You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
{{ message }}
Repository navigation
pitestDiff reports no mutant when the project directory contains a comma #30
In a Gradle project whose directory path contains a comma, pitestDiff mutates nothing and reports that the changed lines have no bytecode, although the same project in a directory without a comma gets its mutants. cribro 1.2.0, Gradle 9.8.2, OpenJDK 21.0.9, macOS 26.5.1 (aarch64).
The same two-commit project, copied into $TMPDIR/cribro-comma-repro/plain and $TMPDIR/cribro-comma-repro/a,b, run with ./gradlew --quiet pitestDiff -Pcribro.diffBase=HEAD~1:
== plain
Mutation testing of changed lines against HEAD~1 (79b26590b), all tests
5 mutants on 1 of 1 changed line: 2 killed, 2 survived, 1 not reached by any test
...
== a,b
Mutation testing of changed lines against HEAD~1 (79b26590b), all tests
no mutant: no changed line has bytecode PIT may mutate
build/reports/pitest-diff/pit.log in a,b:
12:13:47 PIT >> INFO : Created 0 mutation test units in pre scan
12:13:47 PIT >> WARNING : No mutations found. This probably means there is an issue with either the supplied classpath or filters.
The project: settings.gradle applies io.github.cribro-dev.cribro 1.2.0, build.gradle is java-library with JUnit Jupiter 5.14.4 and test { useJUnitPlatform() }, the base commit is empty, and the second commit adds src/main/java/demo/Calc.java (public class Calc { public static int max(int a, int b) { if (a > b) { return a; } return b; } }) and a test that calls Calc.max(2, 1).
Expected: in the a,b directory pitestDiff reports the same five mutants as in plain. Where a path cannot be passed to PIT, the task fails with a message that names the path, rather than reporting that the changed lines have no bytecode, which is false for Calc.java.
Cause, from reading the code, not tested. PIT splits --mutableCodePaths at commas (OptionsParser, withValuesSeparatedBy(',')), so .../a,b/build/classes/java/main reaches it as two entries, neither of which matches the class directory. #18 is the same splitting for --jvmArgs; #29 adds the module's jar as a code path and does not change this.
Activity
Mutate the classes of a project whose path holds a comma