aqa-tests icon indicating copy to clipboard operation
aqa-tests copied to clipboard

testenvSettings.sh should only run once

Open llxia opened this issue 9 months ago • 10 comments

When USE_TESTENV_PROPERTIES=true and DYNAMIC_COMPILE=false, testenvSettings.sh gets triggered twice - once in compile.sh and once before make <test>. This does not cause any issues, but it is not necessary.

https://github.com/adoptium/aqa-tests/blob/83bec274a10eb52ac812af2acc50bb3ec4bc4673/compile.sh#L12 https://github.com/adoptium/aqa-tests/blob/83bec274a10eb52ac812af2acc50bb3ec4bc4673/buildenv/jenkins/JenkinsfileBase#L9

Console output:

00:01:13.427  + bash ./compile.sh
00:01:13.427  Set values based on ./testenv/testenv.properties:
00:01:13.427  =========
00:01:13.427  TKG_REPO=https://github.com/adoptium/TKG.git
00:01:13.427  TKG_BRANCH=master
...
00:02:11.016  + MAKE=make
00:02:11.016  + cd ./aqa-tests
00:02:11.016  + . ./scripts/testenv/testenvSettings.sh
00:02:11.016  ++ set +x
00:02:11.016  Set values based on ./testenv/testenv.properties:
00:02:11.016  =========
00:02:11.016  TKG_REPO=https://github.com/adoptium/TKG.git
00:02:11.016  TKG_BRANCH=master
...

We should add an if statement in https://github.com/adoptium/aqa-tests/blob/83bec274a10eb52ac812af2acc50bb3ec4bc4673/buildenv/jenkins/JenkinsfileBase#L9

run . ./scripts/testenv/testenvSettings.sh only if DYNAMIC_COMPILE == true

llxia avatar May 09 '24 01:05 llxia