Skip to content

Commit d5018a0

Browse files
dfa1claude
andcommitted
build: enforce the golden corpus exists, with a friendly message
Add maven-enforcer requireFilesExist on third_party/zstd/tests in the integration-tests module, bound to validate. A missing submodule now fails the build up front with a message telling the user to run 'git submodule update --init --recursive', instead of failing later. The runtime IllegalStateException stays as a backstop for direct/IDE runs. Co-Authored-By: Claude Opus 4.8 <noreply@anthropic.com>
1 parent 5c573da commit d5018a0

1 file changed

Lines changed: 38 additions & 0 deletions

File tree

integration-tests/pom.xml

Lines changed: 38 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -49,6 +49,44 @@
4949
</dependency>
5050
</dependencies>
5151

52+
<build>
53+
<plugins>
54+
<!-- Fail early, with a clear message, if the vendored zstd submodule
55+
(the golden corpus these tests read) has not been checked out —
56+
before compiling or running anything. -->
57+
<plugin>
58+
<groupId>org.apache.maven.plugins</groupId>
59+
<artifactId>maven-enforcer-plugin</artifactId>
60+
<version>3.5.0</version>
61+
<executions>
62+
<execution>
63+
<id>require-golden-corpus</id>
64+
<phase>validate</phase>
65+
<goals>
66+
<goal>enforce</goal>
67+
</goals>
68+
<configuration>
69+
<rules>
70+
<requireFilesExist>
71+
<files>
72+
<file>${maven.multiModuleProjectDirectory}/third_party/zstd/tests</file>
73+
</files>
74+
<message>
75+
The golden corpus is missing: third_party/zstd/tests was not found.
76+
These integration tests read the vendored zstd submodule. Check it out with:
77+
78+
git submodule update --init --recursive
79+
80+
then re-run the build.</message>
81+
</requireFilesExist>
82+
</rules>
83+
</configuration>
84+
</execution>
85+
</executions>
86+
</plugin>
87+
</plugins>
88+
</build>
89+
5290
<!-- The matching native library for the host platform (test scope only). -->
5391
<profiles>
5492
<!-- Activated by ./mvnw verify -P coverage alongside the parent profile.

0 commit comments

Comments
 (0)