Skip to content

Commit

Permalink
Remove Parallel=Subdir feature (#4112)
Browse files Browse the repository at this point in the history
resolve: #4101
Signed-off-by: Lan Xia <Lan_Xia@ca.ibm.com>

Signed-off-by: Lan Xia <Lan_Xia@ca.ibm.com>
  • Loading branch information
llxia authored Nov 4, 2022
1 parent bd84ed3 commit 66436e6
Show file tree
Hide file tree
Showing 2 changed files with 3 additions and 25 deletions.
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

0 comments on commit 66436e6

Please sign in to comment.