fix: prevent duplicate execution of testenvSettings.sh when DYNAMIC_COMPILE=false#6765
Merged
smlambert merged 4 commits intoadoptium:masterfrom Dec 4, 2025
Merged
Conversation
…OMPILE=false Signed-off-by: Agaba-derrick <agabaderrick18@gmail.com>
Contributor
Author
|
@llxia kindly requesting for a review |
smlambert
reviewed
Dec 1, 2025
Contributor
smlambert
left a comment
There was a problem hiding this comment.
thanks @Agaba-derrick - Some changes requested, then committers will run some testing against this PR to verify it.
Signed-off-by: Agaba-derrick <agabaderrick18@gmail.com>
smlambert
reviewed
Dec 1, 2025
Signed-off-by: Agaba-derrick <agabaderrick18@gmail.com>
karianna
approved these changes
Dec 3, 2025
| // Note: keyword source cannot be used in Jenkins script. Therefore, using "." instead. | ||
| String makeTestCmd = "$RESOLVED_MAKE;cd ./aqa-tests; . ./scripts/testenv/testenvSettings.sh;cd ./TKG; \$MAKE $testParam" | ||
| // When DYNAMIC_COMPILE=false, do not source testenvSettings.sh. Only | ||
| // source the settings when env.DYNAMIC_COMPILE is true. |
Contributor
There was a problem hiding this comment.
Suggested change
| // source the settings when env.DYNAMIC_COMPILE is true. | |
| // source those settings when env.DYNAMIC_COMPILE is true. |
buildenv/jenkins/JenkinsfileBase
Outdated
| String tearDownCmd = "$RESOLVED_MAKE; \$MAKE -f ./aqa-tests/TKG/testEnv.mk testEnvTeardown" | ||
| // Note: keyword source cannot be used in Jenkins script. Therefore, using "." instead. | ||
| String makeTestCmd = "$RESOLVED_MAKE;cd ./aqa-tests; . ./scripts/testenv/testenvSettings.sh;cd ./TKG; \$MAKE $testParam" | ||
| // When DYNAMIC_COMPILE=false, do not source testenvSettings.sh. Only |
Contributor
There was a problem hiding this comment.
to avoid calling testenvSettings.sh twice during execution in pipelines
karianna
approved these changes
Dec 3, 2025
Co-authored-by: Martijn Verburg <martijnverburg@gmail.com>
Contributor
|
Some test runs to verify: |
smlambert
approved these changes
Dec 4, 2025
Contributor
smlambert
left a comment
There was a problem hiding this comment.
Grinder runs confirm the script is now called only once in both cases (of DYNAMIC_COMPILE=true and DYNAMIC_COMPILE=false).
Thanks @Agaba-derrick !
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Add this suggestion to a batch that can be applied as a single commit.This suggestion is invalid because no changes were made to the code.Suggestions cannot be applied while the pull request is closed.Suggestions cannot be applied while viewing a subset of changes.Only one suggestion per line can be applied in a batch.Add this suggestion to a batch that can be applied as a single commit.Applying suggestions on deleted lines is not supported.You must change the existing code in this line in order to create a valid suggestion.Outdated suggestions cannot be applied.This suggestion has been applied or marked resolved.Suggestions cannot be applied from pending reviews.Suggestions cannot be applied on multi-line comments.Suggestions cannot be applied while the pull request is queued to merge.Suggestion cannot be applied right now. Please check back later.
Jenkins pipeline behavior (single-source of testenvSettings.sh)
Avoid re-sourcing testenvSettings.sh from JenkinsfileBase in non-dynamic compile scenarios to prevent double-sourcing when compile.sh already sources it.
Implement the change using a Groovy boolean conditional for DYNAMIC_COMPILE (i.e., if (params.DYNAMIC_COMPILE)), defaulting to NOT sourcing in the makeTestCmd command.
Ensures testenvSettings.sh is only sourced by Jenkins if DYNAMIC_COMPILE is enabled; otherwise it runs once under compile.sh.
Closes #5297