Compare commits
20 commits
| Author | SHA1 | Date | |
|---|---|---|---|
|
|
fa142264da | ||
|
|
cdde8ee0c4 | ||
|
|
ab75ca899d | ||
|
|
bacaa3fac6 | ||
|
|
04ea350a32 | ||
|
|
0155ec6aad | ||
|
|
08ba815c91 | ||
|
|
d9697fe3e6 | ||
|
|
435956e755 | ||
|
|
fb7e6ae5b3 | ||
|
|
aa94813c36 | ||
|
|
94b1bd7545 | ||
|
|
3716dc184a | ||
|
|
fd9733cb95 | ||
|
|
131a09bfe4 | ||
|
|
433737f45d | ||
|
|
49efc441d9 | ||
|
|
ed326c9eb1 | ||
|
|
6cb24ea1a1 | ||
|
|
efe08cfac1 |
3 changed files with 4 additions and 38 deletions
|
|
@ -15,6 +15,8 @@ public class ValidatorFactoryGeneric implements ValidatorFactory {
|
|||
new JavaExclusiveArchValidatorJP(),
|
||||
new MavenMetadataValidator(),
|
||||
new NoBootstrapValidator(),
|
||||
new JpmsProvidesValidatorJP(),
|
||||
new NVRJarMetadataValidator(),
|
||||
});
|
||||
}
|
||||
}
|
||||
|
|
|
|||
|
|
@ -1,37 +0,0 @@
|
|||
package tests;
|
||||
|
||||
import static io.kojan.runit.api.RUnit.*;
|
||||
import static io.kojan.runit.api.matcher.RUnitMatchers.*;
|
||||
import static org.hamcrest.Matchers.*;
|
||||
|
||||
import java.nio.charset.StandardCharsets;
|
||||
|
||||
import org.junit.jupiter.api.DisplayName;
|
||||
|
||||
import io.kojan.javadeptools.rpm.RpmInfo;
|
||||
import io.kojan.runit.api.ExcludeFileName;
|
||||
import io.kojan.runit.api.ExcludeSource;
|
||||
import io.kojan.runit.api.ExcludeSymlink;
|
||||
import io.kojan.runit.api.FileTest;
|
||||
import io.kojan.runit.api.IncludeFileName;
|
||||
|
||||
@DisplayName("/jpackage_script")
|
||||
public class JPackageScriptCheck {
|
||||
@FileTest
|
||||
@IncludeFileName("/usr/bin/.*")
|
||||
@ExcludeSource
|
||||
@ExcludeSymlink
|
||||
@ExcludeFileName("/usr/bin/ant")
|
||||
public void testJPackageScript(RpmInfo rpm, byte[] bytes) {
|
||||
assumeThat("The binary is a script with a shebang", bytes.length, greaterThan(1));
|
||||
assumeThat("The binary is a script with a shebang", bytes[0], is((byte)'#'));
|
||||
assumeThat("The binary is a script with a shebang", bytes[1], is((byte)'!'));
|
||||
String content = new String(bytes, StandardCharsets.UTF_8);
|
||||
assumeThat("The script was generated with %jpackage_script", content,
|
||||
containsString(". /usr/share/java-utils/java-functions\n"));
|
||||
assertThat("The script explicitly sets JAVA_HOME to Java 21", content,
|
||||
containsString("\nJAVA_HOME=\"${JAVA_HOME:-/usr/lib/jvm/jre-21-openjdk}\"\n"));
|
||||
assertThat("Requires on java-21-openjdk-headless are present", rpm, requires("java-21-openjdk-headless"));
|
||||
assertThat("Requires on javapackages-tools are present", rpm, requires("javapackages-tools"));
|
||||
}
|
||||
}
|
||||
|
|
@ -23,6 +23,7 @@ public class JavadocCheck {
|
|||
@IncludeBinary(".*-javadoc")
|
||||
public void javadocFiles(RpmInfo rpm, Path path) {
|
||||
assertThat("Javadoc package contains only javadoc content", path.toString(),
|
||||
anyOf(startsWith("/usr/share/javadoc/"), startsWith("/usr/share/licenses/")));
|
||||
anyOf(startsWith("/usr/share/doc/"), // provisional for c10s
|
||||
startsWith("/usr/share/javadoc/"), startsWith("/usr/share/licenses/")));
|
||||
}
|
||||
}
|
||||
|
|
|
|||
Loading…
Add table
Add a link
Reference in a new issue