Skip to content

Commit

Permalink
Added system_lib for system prestage jars
Browse files Browse the repository at this point in the history
- Prestage system test prequisities to system_lib

related: #4912

Signed-off-by: Anna Babu Palathingal <anna.bp@ibm.com>
  • Loading branch information
annaibm committed May 24, 2024
1 parent ba55ad9 commit a6dbf7c
Show file tree
Hide file tree
Showing 2 changed files with 20 additions and 7 deletions.
19 changes: 14 additions & 5 deletions buildenv/jenkins/JenkinsfileBase
Original file line number Diff line number Diff line change
Expand Up @@ -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}"

Expand Down Expand Up @@ -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}"
}
Expand Down Expand Up @@ -656,12 +661,16 @@ def buildTest() {
// 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("\\\\", "/")
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}"
}
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..."
Expand Down
8 changes: 6 additions & 2 deletions system/system.mk
Original file line number Diff line number Diff line change
Expand Up @@ -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)
Expand Down

0 comments on commit a6dbf7c

Please sign in to comment.