Skip to content

Commit

Permalink
Upgrade test configuration to JavaSE-23 eclipse-jdt#483
Browse files Browse the repository at this point in the history
  • Loading branch information
jarthana committed Sep 4, 2024
1 parent 125facd commit 4362b4e
Show file tree
Hide file tree
Showing 4 changed files with 21 additions and 10 deletions.
2 changes: 1 addition & 1 deletion Jenkinsfile
Original file line number Diff line number Diff line change
Expand Up @@ -21,7 +21,7 @@ pipeline {
xvnc(useXauthority: true) {
sh """
mvn clean verify --batch-mode --fail-at-end -Dmaven.repo.local=$WORKSPACE/.m2/repository \
-Ptest-on-javase-21 -Pbree-libs -Papi-check -Pjavadoc\
-Ptest-on-javase-23 -Pbree-libs -Papi-check -Pjavadoc\
-Dmaven.test.failure.ignore=true\
-Dcompare-version-with-baselines.skip=false \
-Dproject.build.sourceEncoding=UTF-8 \
Expand Down
6 changes: 3 additions & 3 deletions org.eclipse.jdt.debug.jdi.tests/pom.xml
Original file line number Diff line number Diff line change
@@ -1,6 +1,6 @@
<?xml version="1.0" encoding="UTF-8"?>
<!--
Copyright (c) 2012, 2022 Eclipse Foundation and others.
Copyright (c) 2012, 2024 Eclipse Foundation and others.
All rights reserved. This program and the accompanying materials
are made available under the terms of the Eclipse Distribution License v1.0
which accompanies this distribution, and is available at
Expand Down Expand Up @@ -59,7 +59,7 @@
</build>
<profiles>
<profile>
<id>test-on-javase-21</id>
<id>test-on-javase-23</id>
<build>
<plugins>
<plugin>
Expand All @@ -76,7 +76,7 @@
<configuration>
<toolchains>
<jdk>
<id>JavaSE-21</id>
<id>JavaSE-23</id>
</jdk>
</toolchains>
</configuration>
Expand Down
Original file line number Diff line number Diff line change
@@ -1,5 +1,5 @@
/*******************************************************************************
* Copyright (c) 2000, 2022 IBM Corporation and others.
* Copyright (c) 2000, 2024 IBM Corporation and others.
*
* This program and the accompanying materials
* are made available under the terms of the Eclipse Public License 2.0
Expand Down Expand Up @@ -739,8 +739,19 @@ private void launchJavaTarget() {

commandLine.add("-classpath");
commandLine.add(fClassPath);
commandLine.add("-Xdebug");
commandLine.add("-Xnoagent");
int vmVersion = 0;
try {
String versionString = System.getProperty("java.specification.version");
vmVersion = Integer.parseInt(versionString);
} catch (Exception e) {
// Ignore
}
if (vmVersion < 22) {
commandLine.add("-Xdebug");
}
if (vmVersion < 23) {
commandLine.add("-Xnoagent");
}
commandLine.add("-Djava.compiler=NONE");
commandLine.add("-Xrunjdwp:transport=dt_socket,address=" + fBackEndPort + ",suspend=y,server=y");
injectVMArgs(commandLine);
Expand Down
6 changes: 3 additions & 3 deletions org.eclipse.jdt.debug.tests/pom.xml
Original file line number Diff line number Diff line change
@@ -1,6 +1,6 @@
<?xml version="1.0" encoding="UTF-8"?>
<!--
Copyright (c) 2012, 2023 Eclipse Foundation and others.
Copyright (c) 2012, 2024 Eclipse Foundation and others.
All rights reserved. This program and the accompanying materials
are made available under the terms of the Eclipse Distribution License v1.0
which accompanies this distribution, and is available at
Expand Down Expand Up @@ -48,7 +48,7 @@
</build>
<profiles>
<profile>
<id>test-on-javase-21</id>
<id>test-on-javase-23</id>
<build>
<plugins>
<plugin>
Expand All @@ -65,7 +65,7 @@
<configuration>
<toolchains>
<jdk>
<id>JavaSE-21</id>
<id>JavaSE-23</id>
</jdk>
</toolchains>
</configuration>
Expand Down

0 comments on commit 4362b4e

Please sign in to comment.