diff --git a/build.gradle b/build.gradle index 79129aa..0422573 100644 --- a/build.gradle +++ b/build.gradle @@ -113,7 +113,7 @@ tasks.register('jspecifySamplesTest', Test) { include '**/NullSpecTest$Lenient.class' include '**/NullSpecTest$Strict.class' - inputs.files("${jspecify.projectDir}/samples") + inputs.files(unzipConformanceTestSuite) } tasks.register('unzipConformanceTestSuite', Copy) { @@ -140,11 +140,11 @@ tasks.register('conformanceTests', Test) { } // Conformance tests run on the samples directory - inputs.dir("${jspecify.projectDir}/samples") + inputs.dir("${unzipConformanceTestSuite.destinationDir}/samples") inputs.files("tests/ConformanceTestOnSamples-report.txt") doFirst { systemProperties([ - "JSpecifyConformanceTest.samples.inputs": "${jspecify.projectDir}/samples", + "JSpecifyConformanceTest.samples.inputs": "${unzipConformanceTestSuite.destinationDir}/samples", "JSpecifyConformanceTest.samples.report": "tests/ConformanceTestOnSamples-report.txt" ]) } diff --git a/src/test/java/tests/NullSpecTest.java b/src/test/java/tests/NullSpecTest.java index 117f112..d5ed847 100644 --- a/src/test/java/tests/NullSpecTest.java +++ b/src/test/java/tests/NullSpecTest.java @@ -49,7 +49,7 @@ public Lenient(List testFiles) { @Parameters public static String[] getTestDirs() { - return new String[] {"../../jspecify/samples"}; + return getSamplesDirs(); } } @@ -61,10 +61,14 @@ public Strict(List testFiles) { @Parameters public static String[] getTestDirs() { - return new String[] {"../../jspecify/samples"}; + return getSamplesDirs(); } } + private static String[] getSamplesDirs() { + return new String[] {"../build/conformanceTests/samples"}; + } + private final boolean strict; NullSpecTest(List testFiles, boolean strict) {