Skip to content

Commit 1750a73

Browse files
author
Mark Pollack
committed
Skip the coverage gate when the tests are skipped
./mvnw -DskipTests install after a -Dtest run failed the JaCoCo gate: skipTests stops surefire but not jacoco:check, which read the partial jacoco.exec the earlier run had left in target. run-all.sh and RunScenario install the SDK exactly that way, so a leftover exec failed the cross-SDK suite before it started. The coverage-gate execution now skips with ${skipTests} (declared false by default). Reproduced with a ToolCallNameTest-only run followed by -DskipTests verify on acp-core: failed before, passes after.
1 parent 0ed8b09 commit 1750a73

2 files changed

Lines changed: 9 additions & 0 deletions

File tree

‎CHANGELOG.md‎

Lines changed: 3 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -431,6 +431,9 @@ Found by measuring coverage with JaCoCo; each has a test.
431431

432432
### Build
433433

434+
- **The JaCoCo coverage gate skips with the tests** (`-DskipTests`). It read whatever execution data
435+
an earlier run had left in `target/`, so `./mvnw -DskipTests install` after a `-Dtest` run (a
436+
partial `jacoco.exec`) failed the gate; this broke the cross-SDK suite's SDK install.
434437
- Model checking with Lincheck (`org.jetbrains.lincheck:lincheck` 3.7, test scope) for the SDK's
435438
concurrent state: the single-turn prompt rule and its release before the response is published
436439
(#14), the requests waiting for a response, emission on a transport's outbound sink, the

‎pom.xml‎

Lines changed: 6 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -107,6 +107,8 @@
107107
<!-- Error Prone and NullAway (errorprone profile, JDK 21+ only) -->
108108
<errorprone.version>2.50.0</errorprone.version>
109109
<nullaway.version>0.13.8</nullaway.version>
110+
<!-- Surefire's own default, declared so the coverage gate can skip with the tests. -->
111+
<skipTests>false</skipTests>
110112
</properties>
111113

112114
<dependencyManagement>
@@ -500,6 +502,10 @@
500502
<goal>check</goal>
501503
</goals>
502504
<configuration>
505+
<!-- No gate without tests: with -DskipTests the check would read
506+
whatever execution data an earlier run left in target (a
507+
-Dtest run's partial coverage, for one) and fail the build. -->
508+
<skip>${skipTests}</skip>
503509
<rules>
504510
<rule>
505511
<element>BUNDLE</element>

0 commit comments

Comments
 (0)