Skip to content

Commit

Permalink
unset LD_LIBRARY_PATH for alpine-linux jdk8 test
Browse files Browse the repository at this point in the history
LD_LIBRARY_PATH env variable makes installed java will fail to run

Signed-off-by: Sophia Guo <sophia.gwf@gmail.com>
  • Loading branch information
sophia-guo committed May 3, 2023
1 parent 3947dab commit bc94558
Show file tree
Hide file tree
Showing 2 changed files with 14 additions and 1 deletion.
9 changes: 8 additions & 1 deletion buildenv/jenkins/JenkinsfileBase
Original file line number Diff line number Diff line change
Expand Up @@ -6,6 +6,10 @@ import org.tap4j.model.TestSet;
def makeTest(testParam) {
String tearDownCmd = "$RESOLVED_MAKE; \$MAKE -f ./aqa-tests/TKG/testEnv.mk testEnvTeardown"
String makeTestCmd = "$RESOLVED_MAKE; cd ./aqa-tests/TKG; \$MAKE $testParam"
//unset LD_LIBRARY_PATH workaround for issue https://github.com/adoptium/infrastructure/issues/2934
if (JDK_IMPL == 'hotspot' && JDK_VERSION == '8' && PLATFORM.contains('alpine-linux')) {
makeTestCmd = "unset LD_LIBRARY_PATH; $makeTestCmd"
}
try {
sh "$tearDownCmd"
if (env.DOCKER_REGISTRY_URL && env.DOCKER_REGISTRY_URL_CREDENTIAL_ID) {
Expand Down Expand Up @@ -538,6 +542,10 @@ def get_sources() {
}
def makeCompileTest(){
String makeTestCmd = "bash ./compile.sh ${USE_TESTENV_PROPERTIES}"
//unset LD_LIBRARY_PATH workaround for issue https://github.com/adoptium/infrastructure/issues/2934
if (JDK_IMPL == 'hotspot' && JDK_VERSION == '8' && PLATFORM.contains('alpine-linux')) {
makeTestCmd = "unset LD_LIBRARY_PATH; $makeTestCmd"
}
dir('aqa-tests') {
if (!env.SPEC.startsWith('zos')) {
sshagent (credentials: ["$params.SSH_AGENT_CREDENTIAL"], ignoreMissing: true) {
Expand All @@ -549,7 +557,6 @@ def makeCompileTest(){
}
}


def buildTest() {
stage('Build') {
echo 'Building tests...'
Expand Down
6 changes: 6 additions & 0 deletions get.sh
Original file line number Diff line number Diff line change
Expand Up @@ -756,6 +756,12 @@ if [ "$USE_TESTENV_PROPERTIES" = true ]; then
else
> ./testenv/testenv.properties
fi

# unset LD_LIBRARY_PATH workaround for issue https://github.com/adoptium/infrastructure/issues/2934
if [[ $JDK_IMPL == 'hotspot' && $JDK_VERSION == '8' && $PLATFORM =~ 'alpine-linux' ]]; then
unset LD_LIBRARY_PATH
fi

if [ "$SDKDIR" != "" ]; then
getBinaryOpenjdk
testJavaVersion
Expand Down

0 comments on commit bc94558

Please sign in to comment.