Skip to content

Commit

Permalink
Merge branch 'adoptium:master' into revert-options
Browse files Browse the repository at this point in the history
  • Loading branch information
psoujany authored Dec 12, 2024
2 parents 7701ea1 + 7aa981f commit 0cf4b62
Show file tree
Hide file tree
Showing 11 changed files with 86 additions and 28 deletions.
8 changes: 4 additions & 4 deletions .github/workflows/codeql-analysis.yml
Original file line number Diff line number Diff line change
Expand Up @@ -42,11 +42,11 @@ jobs:

steps:
- name: Checkout repository
uses: actions/checkout@692973e3d937129bcbf40652eb9f2f61becf3332 # v4.1.7
uses: actions/checkout@11bd71901bbe5b1630ceea73d27597364c9af683 # v4.2.2

# Initializes the CodeQL tools for scanning.
- name: Initialize CodeQL
uses: github/codeql-action/init@4dd16135b69a43b6c8efb853346f8437d92d3c93 # v3.26.6
uses: github/codeql-action/init@babb554ede22fd5605947329c4d04d8e7a0b8155 # v3.27.7
with:
languages: ${{ matrix.language }}
# If you wish to specify custom queries, you can do so here or in a config file.
Expand All @@ -57,7 +57,7 @@ jobs:
# Autobuild attempts to build any compiled languages (C/C++, C#, or Java).
# If this step fails, then you should remove it and run the build manually (see below)
- name: Autobuild
uses: github/codeql-action/autobuild@4dd16135b69a43b6c8efb853346f8437d92d3c93 # v3.26.6
uses: github/codeql-action/autobuild@babb554ede22fd5605947329c4d04d8e7a0b8155 # v3.27.7

# ℹ️ Command-line programs to run using the OS shell.
# 📚 https://git.io/JvXDl
Expand All @@ -71,4 +71,4 @@ jobs:
# make release

- name: Perform CodeQL Analysis
uses: github/codeql-action/analyze@4dd16135b69a43b6c8efb853346f8437d92d3c93 # v3.26.6
uses: github/codeql-action/analyze@babb554ede22fd5605947329c4d04d8e7a0b8155 # v3.27.7
6 changes: 3 additions & 3 deletions .github/workflows/runAqa.yml
Original file line number Diff line number Diff line change
Expand Up @@ -19,7 +19,7 @@ jobs:
id: workflow_run_info
# Checkout current (TKG) repo to access the repo-specific config file `.github/workflows/runAqaConfig.json` and the shared script `scripts/testRepo/runAqaArgParse.py`
- name: Checkout current repo
uses: actions/checkout@692973e3d937129bcbf40652eb9f2f61becf3332 # v4.1.7
uses: actions/checkout@11bd71901bbe5b1630ceea73d27597364c9af683 # v4.2.2
with:
path: 'main'
- name: Parse parameters
Expand Down Expand Up @@ -107,7 +107,7 @@ jobs:
sourceType: 'buildType'
impl: ${{ matrix.jdk_impl }}
- name: Checkout PR Ref
uses: actions/checkout@692973e3d937129bcbf40652eb9f2f61becf3332 # v4.1.7
uses: actions/checkout@11bd71901bbe5b1630ceea73d27597364c9af683 # v4.2.2
if: matrix.sdk_resource == 'build-jdk'
with:
repository: ${{ matrix.build_repo_branch.repo }}
Expand Down Expand Up @@ -168,7 +168,7 @@ jobs:
openjdk_testRepo: ${{ matrix.openjdk_testrepo }}
openj9_repo: ${{ matrix.openj9_repo }}
tkg_Repo: '${{ fromJSON(steps.get-pr.outputs.result).head.repo.full_name }}:${{ fromJSON(steps.get-pr.outputs.result).head.ref }}'
- uses: actions/upload-artifact@50769540e7f4bd5e21e526ee35c689e35e0d6874 # v4.4.0
- uses: actions/upload-artifact@b4b15b8c7c6ac21ea08fcf65892d2ee8f75cf882 # v4.4.3
if: failure()
with:
name: test_output
Expand Down
4 changes: 2 additions & 2 deletions .github/workflows/testTKG.yml
Original file line number Diff line number Diff line change
Expand Up @@ -15,12 +15,12 @@ jobs:
runs-on: ubuntu-latest
if: startsWith(github.event.comment.body, 'run tkg-test')
steps:
- uses: actions/checkout@692973e3d937129bcbf40652eb9f2f61becf3332 # v4.1.7
- uses: actions/checkout@11bd71901bbe5b1630ceea73d27597364c9af683 # v4.2.2
with:
ref: refs/pull/${{ github.event.issue.number }}/head

- name: Set up JDK
uses: actions/setup-java@6a0805fcefea3d4657a47ac4c165951e33482018 # v4.2.2
uses: actions/setup-java@8df1039502a15bceb9433410b1a100fbe190c53b # v4.5.0
with:
distribution: 'temurin'
java-version: 11
Expand Down
23 changes: 15 additions & 8 deletions scripts/getDependencies.pl
Original file line number Diff line number Diff line change
Expand Up @@ -75,14 +75,14 @@
sha1 => 'a0f58cad836a410f6ba133aaa209aea7e54aaf8a'
},
byte_buddy => {
url => 'https://repo1.maven.org/maven2/net/bytebuddy/byte-buddy/1.14.12/byte-buddy-1.14.12.jar',
url => 'https://repo1.maven.org/maven2/net/bytebuddy/byte-buddy/1.15.4/byte-buddy-1.15.4.jar',
fname => 'byte-buddy.jar',
sha1 => '6e37f743dc15a8d7a4feb3eb0025cbc612d5b9e1'
sha1 => 'e8bd42992701720649765383ff570f415190b83f'
},
byte_buddy_agent => {
url => 'https://repo1.maven.org/maven2/net/bytebuddy/byte-buddy-agent/1.14.12/byte-buddy-agent-1.14.12.jar',
url => 'https://repo1.maven.org/maven2/net/bytebuddy/byte-buddy-agent/1.15.4/byte-buddy-agent-1.15.4.jar',
fname => 'byte-buddy-agent.jar',
sha1 => 'be4984cb6fd1ef1d11f218a648889dfda44b8a15'
sha1 => '58e850dde88f3cf20f41f659440bef33f6c4fe02'
},
objenesis => {
url => 'https://repo1.maven.org/maven2/org/objenesis/objenesis/3.3/objenesis-3.3.jar',
Expand Down Expand Up @@ -125,9 +125,9 @@
sha1 => 'bfcb96281ea3b59d626704f74bc6d625ff51cbce'
},
asmtools => {
url => 'https://ci.adoptium.net/view/Dependencies/job/dependency_pipeline/lastSuccessfulBuild/artifact/asmtools/asmtools-core-7.0.b10-ea.jar',
url => 'https://ci.adoptium.net/job/dependency_pipeline/lastSuccessfulBuild/artifact/asmtools/asmtools-core-7.0.b10-ea.jar',
fname => 'asmtools.jar',
shaurl => 'https://ci.adoptium.net/view/Dependencies/job/dependency_pipeline/lastSuccessfulBuild/artifact/asmtools/asmtools-core-7.0.b10-ea.jar.sha256sum.txt',
shaurl => 'https://ci.adoptium.net/job/dependency_pipeline/lastSuccessfulBuild/artifact/asmtools/asmtools-core-7.0.b10-ea.jar.sha256sum.txt',
shafn => 'asmtools.jar.sha256sum.txt',
shaalg => '256'
},
Expand Down Expand Up @@ -167,6 +167,13 @@
shafn => 'jtreg_7_3_1_1.tar.gz.sha256sum.txt',
shaalg => '256'
},
jtreg_6_1 => {
url => 'https://ci.adoptium.net/job/dependency_pipeline/lastSuccessfulBuild/artifact/jtreg/jtreg-6+1.tar.gz',
fname => 'jtreg_6_1.tar.gz',
shaurl => 'https://ci.adoptium.net/job/dependency_pipeline/lastSuccessfulBuild/artifact/jtreg/jtreg-6+1.tar.gz.sha256sum.txt',
shafn => 'jtreg_6_1.tar.gz.sha256sum.txt',
shaalg => '256'
},
jtreg_7_4_1 => {
url => 'https://ci.adoptium.net/job/dependency_pipeline/lastSuccessfulBuild/artifact/jtreg/jtreg-7.4+1.tar.gz',
fname => 'jtreg_7_4_1.tar.gz',
Expand Down Expand Up @@ -306,10 +313,10 @@
$url_custom .= "systemtest_prereqs/";
$url_custom .= $jars_info[$i]{dir};
$url_custom .= '/' unless $url_custom =~ /\/$/;
$url_custom .= $jars_info[$i]{fname};
$url = "$url_custom";
}

$url = "$url_custom/$jars_info[$i]{fname}";

if (defined $shaurl && $shaurl ne '') {
$shaurl = "$url_custom/$shafn";
}
Expand Down
17 changes: 17 additions & 0 deletions scripts/getDependencies.xml
Original file line number Diff line number Diff line change
Expand Up @@ -21,12 +21,28 @@
<!-- set default LIB property to all -->
<property name="LIB" value="all"/>
<target name="getJtregVersion">
<condition property="jtregOnZ">
<and>
<contains string="${SPEC}" substring="zos"/>
<matches pattern="^(11|17)$" string="${JDK_VERSION}"/>
</and>
</condition>
<if>
<!-- versions 8-10, 12-16 -->
<matches pattern="^([89]|1[02-6])$" string="${JDK_VERSION}"/>
<then>
<property name="jtregTar" value="jtreg_5_1_b01"/>
</then>
<elseif>
<!--
# versions 11,17 on z/OS need to use jtreg6.1, due to encoding issues with jtreg7.*.
# For more details, refer openj9-openjdk-jdk17-zos/issues/928.
-->
<isset property="jtregOnZ"/>
<then>
<property name="jtregTar" value="jtreg_6_1"/>
</then>
</elseif>
<elseif>
<!-- versions 11, 17-23 -->
<matches pattern="^(11|1[7-9]|2[0-3])$" string="${JDK_VERSION}"/>
Expand All @@ -39,6 +55,7 @@
<property name="jtregTar" value="jtreg_7_4_1"/>
</else>
</if>
<echo message="jtreg version used is : ${jtregTar}"/>

<if>
<or>
Expand Down
1 change: 1 addition & 0 deletions scripts/resultsSum.pl
Original file line number Diff line number Diff line change
Expand Up @@ -351,6 +351,7 @@ sub resultReporter {
my $timeStamp = gmtime();

#add AQACert.log content in TAP file
$tapPath =~ s[\\][/]g;
my $AQACert = $tapPath."../AQACert.log";
my $AQACertContent = `cat $AQACert`;
$AQACertContent =~ s/\n/\n# /g;
Expand Down
1 change: 1 addition & 0 deletions scripts/testTKG/test_platformRequirements.py
Original file line number Diff line number Diff line change
Expand Up @@ -149,6 +149,7 @@ def run_test():
skipped.add('test_not_arch_390_0')
else:
passed.add('test_not_arch_390_0')
passed.add('test_not_arch_390_z15plus_0')

if 'test_arch_390_z15_0' not in passed:
skipped.add('test_arch_390_z15_0')
Expand Down
6 changes: 5 additions & 1 deletion settings.mk
Original file line number Diff line number Diff line change
Expand Up @@ -168,6 +168,11 @@ ifdef JRE_IMAGE
JRE_COMMAND:=$(Q)$(JRE_IMAGE)$(D)bin$(D)java$(Q)
endif

JAVA_TO_TEST = $(JAVA_COMMAND)
ifeq ($(USE_JRE),1)
JAVA_TO_TEST = $(JRE_COMMAND)
endif

#######################################
# common dir and jars
#######################################
Expand Down Expand Up @@ -414,7 +419,6 @@ OPENDJK_METHODHANDLES_ENABLED?=$(shell $(JAVA_COMMAND) -XshowSettings:properties
ifneq (,$(findstring true,$(OPENDJK_METHODHANDLES_ENABLED)))
export EXCLUDE_FILE:=$(EXCLUDE_FILE),$(TEST_ROOT)$(D)TestConfig$(D)resources$(D)excludes$(D)feature_ojdkmh_exclude.txt
endif
# Issue to track excluded tests in x86-64_linux_vt_standard build: https://github.com/eclipse-openj9/openj9/issues/12878
VALUE_TYPE_STANDARD_BUILD?=$(shell $(JAVA_COMMAND) -version 2>&1 | grep 'vtstandard')
ifneq (,$(findstring vtstandard,$(VALUE_TYPE_STANDARD_BUILD)))
export EXCLUDE_FILE:=$(EXCLUDE_FILE),$(TEST_ROOT)$(D)TestConfig$(D)resources$(D)excludes$(D)feature_vtstandard_exclude.txt
Expand Down
2 changes: 1 addition & 1 deletion src/org/openj9/envInfo/JavaInfo.java
Original file line number Diff line number Diff line change
Expand Up @@ -259,7 +259,7 @@ public String getTestFlag() {
checkJFR();
String envTf = System.getenv("TEST_FLAG");
String paddedTf = null;
if (envTf != null) {
if (envTf != null && !envTf.isEmpty()) {
testFlag = envTf;
paddedTf = "," + envTf + ",";
}
Expand Down
19 changes: 18 additions & 1 deletion src/org/testKitGen/MkGen.java
Original file line number Diff line number Diff line change
Expand Up @@ -101,7 +101,24 @@ private void writeSingleTest(List<String> testsInPlaylist, TestInfo testInfo, Wr
f.write(testTargetName + ": TEST_GROUP=" + testInfo.getLevelStr() + "\n");
f.write(testTargetName + ": TEST_ITERATIONS=" + testInfo.getIterations() + "\n");
f.write(testTargetName + ": AOT_ITERATIONS=" + testInfo.getAotIterations() + "\n");


// Set special openjdk problem list for JVM options that contains FIPS profile
// This feature is ignored if TEST_FLAG contains FIPS
if (arg.getBuildList().contains("openjdk")) {
String jvmOpts = var.getJvmOptions();
String customprofileStr = "-Dsemeru.customprofile=";
if (!arg.getTestFlag().contains("FIPS") && !jvmOpts.isEmpty() && jvmOpts.contains(customprofileStr)) {
String[] splited = jvmOpts.split("\\s+");
for (int i = 0; i < splited.length; i++) {
if (splited[i].contains(customprofileStr)) {
String fipsProfile = splited[i].replace(customprofileStr, "").trim();
f.write(testTargetName + ": FIPS_VARIATION_PROBLEM_LIST_FILE=-exclude:$(Q)$(JTREG_JDK_TEST_DIR)/ProblemList-" + fipsProfile + ".txt$(Q)\n");
break;
}
}
}
}

f.write(testTargetName + ":\n");
f.write(indent + "@echo \"\" | tee -a $(Q)$(TESTOUTPUT)$(D)TestTargetResult$(Q);\n");
f.write(indent
Expand Down
27 changes: 19 additions & 8 deletions src/org/testKitGen/TestInfoParser.java
Original file line number Diff line number Diff line change
Expand Up @@ -88,11 +88,15 @@ public TestInfo parse() {
ti.addFeature(featElements[0].toLowerCase(), featElements[1].toLowerCase());
}
Set<String> testFlags = new HashSet<>(arg.getTestFlag());
boolean requiredFeatureFound = false;
boolean hasRequiredFeature = false;
for (Map.Entry<String,String> entry : ti.getFeatures().entrySet()) {
String featureOpt = entry.getValue().toLowerCase();
if (featureOpt.equals("required")) {
if (!isFeatureInTestFlags(testFlags, entry.getKey())) {
return null;
hasRequiredFeature = true;
if (isFeatureInTestFlags(testFlags, entry.getKey())) {
requiredFeatureFound = true;
break;
}
} else if (featureOpt.equals("nonapplicable")) {
// Do not generate make target if the test is not applicable for one feature defined in TEST_FLAG
Expand All @@ -106,7 +110,9 @@ public TestInfo parse() {
System.exit(1);
}
}

if (hasRequiredFeature && !requiredFeatureFound) {
return null;
}
if (testFlags.contains("aot")) {
for (Map.Entry<String,String> entry : ti.getFeatures().entrySet()) {
if (doesFeatureMatchTestFlag("aot", entry.getKey())) {
Expand Down Expand Up @@ -147,12 +153,17 @@ public TestInfo parse() {
getElements(ti.getPlatformRequirementsList(), "platformRequirementsList", "platformRequirements", null, ti.getTestCaseName());

List<String> variations = new ArrayList<String>();
getElements(variations, "variations", "variation", null, ti.getTestCaseName());
List<Variation> listOfVars = new ArrayList<Variation>();
for (int i = 0; i < variations.size(); i++) {
String subTestName = ti.getTestCaseName() + "_" + i;
Variation var = parseVariation(subTestName, variations.get(i), ti.getPlatform(), ti.getPlatformRequirementsList());
listOfVars.add(var);
String jvmOptions = System.getenv("JVM_OPTIONS");
if (jvmOptions == null || jvmOptions.isEmpty()) {
getElements(variations, "variations", "variation", null, ti.getTestCaseName());
for (int i = 0; i < variations.size(); i++) {
String subTestName = ti.getTestCaseName() + "_" + i;
Variation var = parseVariation(subTestName, variations.get(i), ti.getPlatform(), ti.getPlatformRequirementsList());
listOfVars.add(var);
}
} else {
System.out.println("Warning: JVM_OPTIONS specified, ignoring variations for " + testCaseName + ".");
}
if (variations.size() == 0) {
String subTestName = ti.getTestCaseName() + "_0";
Expand Down

0 comments on commit 0cf4b62

Please sign in to comment.