From bdbbfabd398427ed8f7080a7c23549971b98278e Mon Sep 17 00:00:00 2001 From: Anna Babu Palathingal <148897727+annaibm@users.noreply.github.com> Date: Mon, 15 Apr 2024 09:38:38 -0400 Subject: [PATCH] Added system_lib for system prestage jars - Prestage system test prequisities to system_lib related: https://github.com/adoptium/aqa-tests/issues/4912 Signed-off-by: Anna Babu Palathingal --- buildenv/jenkins/JenkinsfileBase | 45 +++++++++++++++----------------- system/common.xml | 17 +++++++++--- system/system.mk | 8 ++++-- 3 files changed, 41 insertions(+), 29 deletions(-) diff --git a/buildenv/jenkins/JenkinsfileBase b/buildenv/jenkins/JenkinsfileBase index 1322fdd023..e1280327ce 100644 --- a/buildenv/jenkins/JenkinsfileBase +++ b/buildenv/jenkins/JenkinsfileBase @@ -106,6 +106,7 @@ def setupEnv() { env.EXIT_SUCCESS = params.EXIT_SUCCESS ? params.EXIT_SUCCESS : false NUM_MACHINES = params.NUM_MACHINES ? params.NUM_MACHINES.toInteger() : 1 env.LIB_DIR = JOB_NAME.contains("SmokeTests") ? "${WORKSPACE}/../../../../../testDependency/lib" : "${WORKSPACE}/../../testDependency/lib" + env.SYSTEM_LIB_DIR = JOB_NAME.contains("SmokeTests") ? "${WORKSPACE}/../../../../../testDependency/system_lib" : "${WORKSPACE}/../../testDependency/system_lib" env.OPENJCEPLUS_GIT_REPO = params.OPENJCEPLUS_GIT_REPO ?: "https://github.com/ibmruntimes/OpenJCEPlus.git" env.OPENJCEPLUS_GIT_BRANCH = params.OPENJCEPLUS_GIT_BRANCH ?: "semeru-java${params.JDK_VERSION}" @@ -211,6 +212,10 @@ def setupParallelEnv() { def customUrl = getCustomUrl() if (PLATFORM.contains("windows")) { env.LIB_DIR = env.LIB_DIR.replaceAll("\\\\", "/") + env.SYSTEM_LIB_DIR = env.SYSTEM_LIB_DIR.replaceAll("\\\\", "/") + } + if (env.BUILD_LIST == 'system') { + env.LIB_DIR = env.SYSTEM_LIB_DIR } sh "perl ./aqa-tests/TKG/scripts/getDependencies.pl -path ${env.LIB_DIR} -task default -customUrl ${customUrl}" } @@ -652,32 +657,24 @@ def buildTest() { } try { - // check pre-stage test libs on the machine - // check for each lib. If lib does not exist, donwload it. - // If lib exists, SHA will be checked. Re-download if SHA does not match. - timeout(time: 20, unit: 'MINUTES') { - def customUrl = getCustomUrl() - if (PLATFORM.contains("windows")) { - env.LIB_DIR = env.LIB_DIR.replaceAll("\\\\", "/") - } - sh "perl ./aqa-tests/TKG/scripts/getDependencies.pl -path ${env.LIB_DIR} -task default -customUrl ${customUrl}" - } - } catch (Exception e) { - echo 'Exception: ' + e.toString() - echo "Cannot pre-stage test libs from ${env.LIB_DIR} on the machine. Skipping..." - } - - try { - if (env.BUILD_LIST.contains('system')) { - //get pre-staged test jars from systemtest.getDependency build before system test compilation - timeout(time: 60, unit: 'MINUTES') { - copyArtifacts fingerprintArtifacts: true, projectName: "systemtest.getDependency", selector: lastSuccessful(), target: 'aqa-tests' + // check pre-stage test libs on the machine + // check for each lib. If lib does not exist, donwload it. + // If lib exists, SHA will be checked. Re-download if SHA does not match. + timeout(time: 20, unit: 'MINUTES') { + def customUrl = getCustomUrl() + if (PLATFORM.contains("windows")) { + env.LIB_DIR = env.LIB_DIR.replaceAll("\\\\", "/") + env.SYSTEM_LIB_DIR = env.SYSTEM_LIB_DIR.replaceAll("\\\\", "/") + } + if (env.BUILD_LIST == 'system') { + env.LIB_DIR = env.SYSTEM_LIB_DIR + } + sh "perl ./aqa-tests/TKG/scripts/getDependencies.pl -path ${env.LIB_DIR} -task default -customUrl ${customUrl}" } + } catch (Exception e) { + echo 'Exception: ' + e.toString() + echo "Cannot pre-stage test libs from ${env.LIB_DIR} on the machine. Skipping..." } - } catch (Exception e) { - echo 'Exception: ' + e.toString() - echo 'Cannot run copyArtifacts from test.getDependency/systemtest.getDependency. Skipping copyArtifacts...' - } if (BUILD_LIST.contains("external")){ try { diff --git a/system/common.xml b/system/common.xml index a01e182e8a..0a184f58c8 100644 --- a/system/common.xml +++ b/system/common.xml @@ -336,9 +336,20 @@ - - - + + + + + + + + + + + + + + diff --git a/system/system.mk b/system/system.mk index 1edaebafe3..1e00f5dd1f 100644 --- a/system/system.mk +++ b/system/system.mk @@ -71,15 +71,19 @@ ifdef JVM_OPTIONS APPLICATION_OPTIONS := $(APPLICATION_OPTIONS) -jvmArgs $(Q)$(JVM_OPTIONS)$(Q) endif +ifndef SYSTEM_LIB_DIR + SYSTEM_LIB_DIR=$(SYSTEMTEST_RESROOT)/systemtest_prereqs +endif + define SYSTEMTEST_CMD_TEMPLATE perl $(SYSTEMTEST_RESROOT)$(D)STF$(D)stf.core$(D)scripts$(D)stf.pl \ -test-root=$(Q)$(SYSTEMTEST_RESROOT)$(D)STF;$(SYSTEMTEST_RESROOT)$(D)aqa-systemtest$(OPENJ9_PRAM)$(Q) \ - -systemtest-prereqs=$(Q)$(SYSTEMTEST_RESROOT)$(D)systemtest_prereqs$(Q) \ + -systemtest-prereqs=$(Q)$(SYSTEM_LIB_DIR)$(D)$(Q) \ -java-args=$(SQ)$(JAVA_ARGS)$(SQ) \ -results-root=$(REPORTDIR) endef -# Default test to be run for system_custom in regular system test builds +# Default test to be run for system_custom in regular system test builds CUSTOM_TARGET ?= -test=ClassloadingLoadTest ifneq ($(JDK_VERSION),8)