From 961dd887cf0d927bb5a639c6e89ea8d937d62c97 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 Signed-off-by: Anna Babu Palathingal --- buildenv/jenkins/JenkinsfileBase | 41 ++++++++++++++------------------ system/common.xml | 3 --- system/system.mk | 12 +++++----- 3 files changed, 24 insertions(+), 32 deletions(-) diff --git a/buildenv/jenkins/JenkinsfileBase b/buildenv/jenkins/JenkinsfileBase index dfb5562aaa..ace8b38724 100644 --- a/buildenv/jenkins/JenkinsfileBase +++ b/buildenv/jenkins/JenkinsfileBase @@ -39,7 +39,7 @@ def setupEnv() { env.JOBSTARTTIME = sh(script: 'LC_TIME=C date +"%a, %d %b %Y %T %z"', returnStdout: true).trim() // Terminate any previous test related processes that are running - terminateTestProcesses() + terminateTestProcesses() if ( params.JDK_VERSION ) { env.ORIGIN_JDK_VERSION = params.JDK_VERSION @@ -105,6 +105,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/IBM/OpenJCEPlus.git" env.OPENJCEPLUS_GIT_BRANCH = params.OPENJCEPLUS_GIT_BRANCH ?: "java${params.JDK_VERSION}" @@ -207,7 +208,10 @@ def setupParallelEnv() { // 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 = "https://ci.adoptium.net/job/test.getDependency/lastSuccessfulBuild/artifact/" + def defaultUrl = "https://ci.adoptium.net/job/test.getDependency/lastSuccessfulBuild/artifact/" + def systemUrl = "https://ci.adoptium.net/job/systemtest.getDependency/lastSuccessfulBuild/artifact/" + env.LIB_DIR = (env.BUILD_LIST == 'system') ? env.SYSTEM_LIB_DIR : env.LIB_DIR + def customUrl = (env.BUILD_LIST == 'system') ? systemUrl : defaultUrl if (PLATFORM.contains("windows")) { env.LIB_DIR = env.LIB_DIR.replaceAll("\\\\", "/") } @@ -315,7 +319,7 @@ def setupParallelEnv() { } -// Returns NUM_LIST from parallelList.mk. +// Returns NUM_LIST from parallelList.mk. // NUM_LIST can be different than numOfMachines. def genParallelList(PARALLEL_OPTIONS) { String unsetLLP = "" @@ -415,7 +419,7 @@ def setup() { if (params.SDK_RESOURCE == 'nightly') { // remove single quote to allow variables to be set in CUSTOMIZED_SDK_URL CUSTOMIZED_SDK_URL_OPTION = "-c ${params.CUSTOMIZED_SDK_URL}" - } else if (!params.SDK_RESOURCE || params.SDK_RESOURCE == 'customized') { + } else if (!params.SDK_RESOURCE || params.SDK_RESOURCE == 'customized') { SDK_RESOURCE = "customized" CUSTOMIZED_SDK_URL_OPTION = "-c '${params.CUSTOMIZED_SDK_URL}'" if (params.ADDITIONAL_ARTIFACTS_REQUIRED == "RI_JDK") { @@ -437,7 +441,7 @@ def setup() { error("SDK_RESOURCE: ${params.SDK_RESOURCE} and CUSTOMIZED_SDK_URL: ${params.CUSTOMIZED_SDK_URL} combo is not supported!") } } else { - if (params.SDK_RESOURCE == 'customized') { + if (params.SDK_RESOURCE == 'customized') { error("SDK_RESOURCE: ${params.SDK_RESOURCE}, please provide CUSTOMIZED_SDK_URL") } else { CUSTOMIZED_SDK_URL_OPTION = "" @@ -466,7 +470,7 @@ def setup() { if (CLONE_OPENJ9_OPTION == "") { if (env.BUILD_LIST.contains('functional')) { CLONE_OPENJ9_OPTION = "--clone_openj9 true" - // If USE_TESTENV_PROPERTIES = false, set Openj9 repo and brnach. + // If USE_TESTENV_PROPERTIES = false, set Openj9 repo and brnach. // Otherwise, testenv.properties will be used. // And the Openj9 repo and brnach values will be set in get.sh if(!params.USE_TESTENV_PROPERTIES) { @@ -655,7 +659,10 @@ 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 = "https://ci.adoptium.net/job/test.getDependency/lastSuccessfulBuild/artifact/" + def defaultUrl = "https://ci.adoptium.net/job/test.getDependency/lastSuccessfulBuild/artifact/" + def systemUrl = "https://ci.adoptium.net/job/systemtest.getDependency/lastSuccessfulBuild/artifact/" + env.LIB_DIR = (env.BUILD_LIST == 'system') ? env.SYSTEM_LIB_DIR : env.LIB_DIR + def customUrl = (env.BUILD_LIST == 'system') ? systemUrl : defaultUrl if (PLATFORM.contains("windows")) { env.LIB_DIR = env.LIB_DIR.replaceAll("\\\\", "/") } @@ -666,18 +673,6 @@ def buildTest() { 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' - } - } - } catch (Exception e) { - echo 'Exception: ' + e.toString() - echo 'Cannot run copyArtifacts from test.getDependency/systemtest.getDependency. Skipping copyArtifacts...' - } - if (BUILD_LIST.contains("external")){ try { timeout(time: 60, unit: 'MINUTES') { @@ -1013,10 +1008,10 @@ def testExecution() { def terminateTestProcesses() { echo "PROCESSCATCH: Terminating any hung/left over test processes:" - def statusCode=sh(script:"aqa-tests/terminateTestProcesses.sh ${env.USER} 2>&1", returnStatus:true) - if (statusCode != 0) { - echo "rc = ${statusCode}, Unable to terminate all processes." - } + def statusCode=sh(script:"aqa-tests/terminateTestProcesses.sh ${env.USER} 2>&1", returnStatus:true) + if (statusCode != 0) { + echo "rc = ${statusCode}, Unable to terminate all processes." + } } def getJDKImpl(jvm_version) { diff --git a/system/common.xml b/system/common.xml index a01e182e8a..1992069b99 100644 --- a/system/common.xml +++ b/system/common.xml @@ -336,9 +336,6 @@ - - - diff --git a/system/system.mk b/system/system.mk index 1edaebafe3..daff26d84a 100644 --- a/system/system.mk +++ b/system/system.mk @@ -16,10 +16,10 @@ ifndef CYGWIN OSTYPE?=$(shell echo $$OSTYPE) CYGWIN:=0 ifeq ($(OSTYPE),cygwin) - CYGWIN:=1 + CYGWIN:=1 endif ifeq ($(TERM),cygwin) - CYGWIN:=1 + CYGWIN:=1 endif endif $(warning CYGWIN is $(CYGWIN)) @@ -31,9 +31,9 @@ ifeq ($(CYGWIN),1) $(warning Running under cygwin, looking for Windows perl on path) PERL:=$(shell which -a perl.exe | grep /perl/bin | sort | uniq) ifeq (,$(PERL)) - $(error Unable to find Windows perl e.g. Strawberry perl in a /perl/bin subdirectory on PATH. Install perl or add to PATH and retry) + $(error Unable to find Windows perl e.g. Strawberry perl in a /perl/bin subdirectory on PATH. Install perl or add to PATH and retry) else - $(warning Found perl in $(PERL)) + $(warning Found perl in $(PERL)) endif PERL:=$(dir $(PERL)) export PATH:=$(PERL):$(PATH) @@ -74,12 +74,12 @@ 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)$(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)