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

Remove Parallel=Subdir feature #4112

Merged
merged 1 commit into from
Nov 4, 2022
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
23 changes: 1 addition & 22 deletions buildenv/jenkins/JenkinsfileBase
Original file line number Diff line number Diff line change
Expand Up @@ -147,7 +147,6 @@ def setupEnv() {
def setupParallelEnv() {
stage('setupParallelEnv') {
def maxChildJobNum = 25
def testSubDirs = []
int childJobNum = 1
def UPSTREAM_TEST_JOB_NAME = ""
def UPSTREAM_TEST_JOB_NUMBER = ""
Expand Down Expand Up @@ -223,24 +222,8 @@ def setupParallelEnv() {
} else {
assert false : "Build failed because cannot find NUM_LIST in parallelList.mk file."
}
} else if (params.PARALLEL == "Subdir") {
dir("$WORKSPACE/aqa-tests/${env.BUILD_LIST}") {
testSubDirs = sh(returnStdout: true, script: "ls -d */").trim().tokenize()
}

if (TARGET.contains('special.system')) {
// In special.system, some subfolders do not have any system test in special level
// In order to save machine resources, exclude the following system test subfolders in parallel mode
def excludes = ["jlm/", "modularity/", "sharedClasses/"]
echo "exclude the following system test subfolders: ${excludes}"
testSubDirs = testSubDirs - excludes
}

childJobNum = testSubDirs.size()
if ( childJobNum > maxChildJobNum) {
assert false : "Build failed becuase childJobNum: ${childJobNum} > ${maxChildJobNum}."
}
}

UPSTREAM_TEST_JOB_NAME = JOB_NAME
UPSTREAM_TEST_JOB_NUMBER = BUILD_NUMBER
echo "[PARALLEL: ${params.PARALLEL}] childJobNum is ${childJobNum}, creating jobs and running them in parallel..."
Expand All @@ -256,11 +239,7 @@ def setupParallelEnv() {
} else if (params.PARALLEL == "Dynamic") {
childTest = "testList_${i}"
childTarget = "-f parallelList.mk ${childTest}"
} else if (params.PARALLEL == "Subdir") {
childTest = testSubDirs[i].trim().replace("/","");
buildListName = "${env.BUILD_LIST}/${childTest}"
}

def TEST_JOB_NAME = "${JOB_NAME}_${childTest}"

generateJob(create_jobs, childTest, TEST_JOB_NAME)
Expand Down
5 changes: 2 additions & 3 deletions buildenv/jenkins/testJobTemplate
Original file line number Diff line number Diff line change
Expand Up @@ -123,7 +123,7 @@ if (JDK_IMPL == "openj9") {
}

// If user specifies a PARALLEL_DEFAULT option, prepend it to the list so it becomes the default in the generated job(s)
PARALLEL_LIST = ['None', 'Dynamic', 'Subdir', 'NodesByIterations']
PARALLEL_LIST = ['None', 'Dynamic', 'NodesByIterations']
if (binding.hasVariable('PARALLEL_DEFAULT')) {
PARALLEL_LIST.remove(PARALLEL_DEFAULT)
PARALLEL_LIST.add(0, PARALLEL_DEFAULT)
Expand Down Expand Up @@ -396,8 +396,7 @@ ARCH_OS_LIST.each { ARCH_OS ->
choiceParam('PARALLEL', PARALLEL_LIST, '''Optional. Parallel mode: <br/>
None // run test(s) in serial <br/>
Dynamic // dynamically divides tests according to NUM_MACHINES or TEST_TIME and runs them in parallel. Please also provide NUM_MACHINES or TEST_TIME. <br/>
NodesByIterations // run the same test(s) in parallel according to NUM_MACHINES. You can also provide ITERATIONS. This is mainly for debugging intermittent issues. <br/>
Subdir // run tests in parallel according to subdir. This is mainly for external tests.''')
NodesByIterations // run the same test(s) in parallel according to NUM_MACHINES. You can also provide ITERATIONS. This is mainly for debugging intermittent issues. <br/>''')
stringParam('NUM_MACHINES', NUM_MACHINES, '''Optional. It has to be used with PARALLEL=Dynamic or PARALLEL=NodesByIterations<br/>
Use with PARALLEL=Dynamic, NUM_MACHINES cannot be greater than the number of matched nodes on Jenkins<br/>
Use with PARALLEL=NodesByIterations, NUM_MACHINES cannot be greater than 20<br/>''')
Expand Down