From 66436e6253ac9dd65a9fbc6cd5ad0e258df34ed4 Mon Sep 17 00:00:00 2001 From: Lan Xia Date: Fri, 4 Nov 2022 15:11:52 -0400 Subject: [PATCH] Remove Parallel=Subdir feature (#4112) resolve: https://github.com/adoptium/aqa-tests/issues/4101 Signed-off-by: Lan Xia Signed-off-by: Lan Xia --- buildenv/jenkins/JenkinsfileBase | 23 +---------------------- buildenv/jenkins/testJobTemplate | 5 ++--- 2 files changed, 3 insertions(+), 25 deletions(-) diff --git a/buildenv/jenkins/JenkinsfileBase b/buildenv/jenkins/JenkinsfileBase index 89c70a3d8c..4c9a536251 100644 --- a/buildenv/jenkins/JenkinsfileBase +++ b/buildenv/jenkins/JenkinsfileBase @@ -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 = "" @@ -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..." @@ -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) diff --git a/buildenv/jenkins/testJobTemplate b/buildenv/jenkins/testJobTemplate index b829a0214f..f4e5cb6c91 100644 --- a/buildenv/jenkins/testJobTemplate +++ b/buildenv/jenkins/testJobTemplate @@ -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) @@ -396,8 +396,7 @@ ARCH_OS_LIST.each { ARCH_OS -> choiceParam('PARALLEL', PARALLEL_LIST, '''Optional. Parallel mode:
None // run test(s) in serial
Dynamic // dynamically divides tests according to NUM_MACHINES or TEST_TIME and runs them in parallel. Please also provide NUM_MACHINES or TEST_TIME.
- NodesByIterations // run the same test(s) in parallel according to NUM_MACHINES. You can also provide ITERATIONS. This is mainly for debugging intermittent issues.
- 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.
''') stringParam('NUM_MACHINES', NUM_MACHINES, '''Optional. It has to be used with PARALLEL=Dynamic or PARALLEL=NodesByIterations
Use with PARALLEL=Dynamic, NUM_MACHINES cannot be greater than the number of matched nodes on Jenkins
Use with PARALLEL=NodesByIterations, NUM_MACHINES cannot be greater than 20
''')