Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Address signature test issues from issue 681 #682

Merged
merged 2 commits into from
Apr 11, 2024
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension


Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
2 changes: 1 addition & 1 deletion pom.xml
Original file line number Diff line number Diff line change
Expand Up @@ -97,7 +97,7 @@
<checkstyle.version>10.15.0</checkstyle.version>
<checkstyle.excludes></checkstyle.excludes>
<jacoco.maven.version>0.8.12</jacoco.maven.version>
<sigtest.version>1.6</sigtest.version> <!-- TODO update to 1.8 once this fix is added https://github.com/jtulach/netbeans-apitest/commit/72a3d3507202357589d77b293cb1e29349a0096e -->
<sigtest.version>2.2</sigtest.version> <!-- TODO update to 1.8 once this fix is added https://github.com/jtulach/netbeans-apitest/commit/72a3d3507202357589d77b293cb1e29349a0096e -->
<sonar.jacoco.reportPath>../target/jacoco.exec</sonar.jacoco.reportPath>
<sonar.maven.version>3.11.0.3922</sonar.maven.version>
</properties>
Expand Down
4 changes: 2 additions & 2 deletions tck/pom.xml
Original file line number Diff line number Diff line change
Expand Up @@ -128,7 +128,7 @@

<!-- Test Dependencies -->
<dependency>
<groupId>org.netbeans.tools</groupId>
<groupId>jakarta.tck</groupId>
<artifactId>sigtest-maven-plugin</artifactId>
<version>${sigtest.version}</version>
</dependency>
Expand Down Expand Up @@ -289,7 +289,7 @@

<!-- Run signature plugin to generate signature file -->
<plugin>
<groupId>org.netbeans.tools</groupId>
<groupId>jakarta.tck</groupId>
<artifactId>sigtest-maven-plugin</artifactId>
<version>${sigtest.version}</version>
<executions>
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -92,7 +92,7 @@ private static void appendSignaturePackages(final Archive<?> applicationArchive,
((ClassContainer<?>) applicationArchive).addPackage(signaturePackage);

// Add the sigtest plugin library
File sigTestDep = Maven.resolver().resolve("org.netbeans.tools:sigtest-maven-plugin:1.6").withoutTransitivity().asSingleFile();
File sigTestDep = Maven.resolver().resolve("jakarta.tck:sigtest-maven-plugin:2.2").withoutTransitivity().asSingleFile();
log.info("Application Archive [" + applicationName + "] is being appended with library " + sigTestDep.getName());
((LibraryContainer<?>) applicationArchive).addAsLibrary(sigTestDep);

Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -229,8 +229,17 @@ public void signatureTest() throws Fault {

// mapFileAsProps = getSigTestDriver().loadMapFile(mapFile);

// First try to find the signature file that matches the current JDK version
String javaVersion = System.getProperty("java.specification.version");
String sigRsrc = SIG_RESOURCE_PACKAGE.replace(".", "/") + "/" + SIG_FILE_NAME;
sigRsrc += "_" + javaVersion;
starksm64 marked this conversation as resolved.
Show resolved Hide resolved
InputStream inStreamSigFile = DataSignatureTestRunner.class.getClassLoader()
.getResourceAsStream(SIG_RESOURCE_PACKAGE.replace(".", "/") + "/" + SIG_FILE_NAME);
.getResourceAsStream(sigRsrc);
if (inStreamSigFile == null) {
// If we can't find a signature file for the current JDK version, use the plain name
inStreamSigFile = DataSignatureTestRunner.class.getClassLoader()
.getResourceAsStream(SIG_RESOURCE_PACKAGE.replace(".", "/") + "/" + SIG_FILE_NAME);
}
File sigFile = writeStreamToSigFile(inStreamSigFile);
log.info("signature File location is :" + sigFile.getCanonicalPath());
signatureRepositoryDir = System.getProperty("java.io.tmpdir");
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -100,6 +100,7 @@ protected String[] createTestArguments(String packageListFile, String mapFile, S
command.add(SMODE_FLAG);
// command.add("bin");
command.add("src");
command.add("-BootCp");
} else {
System.out.println("Not Setting static mode flag to allow constant checking.");
}
Expand Down