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

Testflag #7

Closed
wants to merge 5 commits into from
Closed
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
6 changes: 3 additions & 3 deletions .github/workflows/codeql-analysis.yml
Original file line number Diff line number Diff line change
Expand Up @@ -46,7 +46,7 @@ jobs:

# Initializes the CodeQL tools for scanning.
- name: Initialize CodeQL
uses: github/codeql-action/init@294a9d92911152fe08befb9ec03e240add280cb3 # v3.26.8
uses: github/codeql-action/init@461ef6c76dfe95d5c364de2f431ddbd31a417628 # v3.26.9
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@294a9d92911152fe08befb9ec03e240add280cb3 # v3.26.8
uses: github/codeql-action/autobuild@461ef6c76dfe95d5c364de2f431ddbd31a417628 # v3.26.9

# ℹ️ 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@294a9d92911152fe08befb9ec03e240add280cb3 # v3.26.8
uses: github/codeql-action/analyze@461ef6c76dfe95d5c364de2f431ddbd31a417628 # v3.26.9
2 changes: 1 addition & 1 deletion .github/workflows/testTKG.yml
Original file line number Diff line number Diff line change
Expand Up @@ -20,7 +20,7 @@ jobs:
ref: refs/pull/${{ github.event.issue.number }}/head

- name: Set up JDK
uses: actions/setup-java@2dfa2011c5b2a0f1489bf9e433881c92c1631f88 # v4.3.0
uses: actions/setup-java@b36c23c0d998641eff861008f374ee103c25ac73 # v4.4.0
with:
distribution: 'temurin'
java-version: 11
Expand Down
3 changes: 2 additions & 1 deletion scripts/testTKG/test_platformRequirements.py
Original file line number Diff line number Diff line change
Expand Up @@ -149,10 +149,11 @@ 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')

if 'test_arch_390_z14_0' not in passed:
skipped.add('test_arch_390_z14_0')

Expand Down
12 changes: 9 additions & 3 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