-
-
Notifications
You must be signed in to change notification settings - Fork 314
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
Do not move the test to child job if parallel list number=1 #5511
Changes from all commits
File filter
Filter by extension
Conversations
Jump to
Diff view
Diff view
There are no files selected for viewing
Original file line number | Diff line number | Diff line change |
---|---|---|
|
@@ -183,6 +183,7 @@ def setupParallelEnv() { | |
int childJobNum = 1 | ||
def UPSTREAM_TEST_JOB_NAME = "" | ||
def UPSTREAM_TEST_JOB_NUMBER = "" | ||
parallel_tests = [:] | ||
|
||
if (params.PARALLEL == "NodesByIterations") { | ||
childJobNum = NUM_MACHINES | ||
|
@@ -249,21 +250,24 @@ def setupParallelEnv() { | |
NUM_LIST = genParallelList(PARALLEL_OPTIONS) | ||
} | ||
|
||
if (NUM_LIST > 0) { | ||
if (NUM_LIST > 1) { | ||
childJobNum = NUM_LIST | ||
echo "Saving parallelList.mk file on jenkins..." | ||
dir('aqa-tests/TKG') { | ||
archiveArtifacts artifacts: 'parallelList.mk', fingerprint: true, allowEmptyArchive: false | ||
} | ||
} else if (NUM_LIST == 1) { | ||
echo " Number of test list is 1, no need to run tests in child job." | ||
return NUM_LIST | ||
} else { | ||
assert false : "Build failed because cannot find NUM_LIST in parallelList.mk file." | ||
} | ||
} | ||
|
||
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..." | ||
parallel_tests = [:] | ||
create_jobs = [:] | ||
|
||
for (int i = 0; i < childJobNum; i++) { | ||
|
@@ -315,7 +319,7 @@ def setupParallelEnv() { | |
if (create_jobs) { | ||
parallel create_jobs | ||
} | ||
|
||
return NUM_LIST | ||
// return to top level pipeline file in order to exit node block before running tests in parallel | ||
} | ||
|
||
|
@@ -969,7 +973,10 @@ def testBuild() { | |
// prepare environment and compile test projects | ||
if ((params.PARALLEL == "NodesByIterations" && NUM_MACHINES > 1) | ||
|| (params.PARALLEL == "Dynamic" && (NUM_MACHINES > 1 || (params.TEST_TIME && !params.NUM_MACHINES)))) { | ||
setupParallelEnv() | ||
if (setupParallelEnv() == 1) { | ||
// No need to run tests in parallel | ||
There was a problem hiding this comment. Choose a reason for hiding this commentThe reason will be displayed to describe this comment to others. Learn more. Do we want to echo here as well? There was a problem hiding this comment. Choose a reason for hiding this commentThe reason will be displayed to describe this comment to others. Learn more. Yes, it is echoed https://github.com/adoptium/aqa-tests/pull/5511/files#diff-21a56f751656da4e3e5abee13913f51a269d6eb43235bc16fc4be21ef70deaf2R260
|
||
testExecution() | ||
} | ||
} else { | ||
testExecution() | ||
} | ||
|
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
The variable
NUM_LIST
is not visible here (it's confined to the scope where it's declared, which ends on line 265); our test builds are failing as a result: