Skip to content

Commit

Permalink
LRCI-4128 Remove modules.includes.required.test.batch.class.names.inc…
Browse files Browse the repository at this point in the history
…ludes property for modified modules
  • Loading branch information
brittneyq authored and brianchandotcom committed Mar 14, 2024
1 parent 467b1f9 commit 7e49b11
Showing 1 changed file with 0 additions and 30 deletions.
Original file line number Diff line number Diff line change
Expand Up @@ -20,7 +20,6 @@
import java.util.List;
import java.util.Properties;
import java.util.Set;
import java.util.regex.Matcher;
import java.util.regex.Pattern;

import org.json.JSONObject;
Expand Down Expand Up @@ -155,43 +154,17 @@ protected List<JobProperty> getRelevantIncludesJobProperties() {

Set<JobProperty> includesJobProperties = new HashSet<>();

String moduleName = null;

Matcher matcher = _singleModuleBatchNamePattern.matcher(batchName);

if (matcher.find()) {
moduleName = matcher.group("moduleName");
}

for (File modifiedModuleDir : modifiedModuleDirsSet) {
if (modifiedPoshiModulesList.contains(modifiedModuleDir) &&
!modifiedNonposhiModulesList.contains(modifiedModuleDir)) {

continue;
}

String modifiedModuleAbsolutePath =
JenkinsResultsParserUtil.getCanonicalPath(modifiedModuleDir);

String modifiedModuleRelativePath =
modifiedModuleAbsolutePath.substring(
modifiedModuleAbsolutePath.indexOf("modules/"));

if ((moduleName != null) &&
!modifiedModuleRelativePath.contains("/" + moduleName)) {

continue;
}

includesJobProperties.add(
getJobProperty(
"test.batch.class.names.includes.modules",
modifiedModuleDir, JobProperty.Type.INCLUDE_GLOB));

includesJobProperties.add(
getJobProperty(
"modules.includes.required.test.batch.class.names.includes",
modifiedModuleDir, JobProperty.Type.MODULE_INCLUDE_GLOB));
}

for (File modifiedFile :
Expand Down Expand Up @@ -467,7 +440,4 @@ private String _getSymbolicName(File bndBndFile) {
return bndBndProperties.getProperty("Bundle-SymbolicName");
}

private static final Pattern _singleModuleBatchNamePattern =
Pattern.compile("modules-unit-(?<moduleName>\\S+)-jdk\\d+");

}

0 comments on commit 7e49b11

Please sign in to comment.