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

Signed-off-by: Anna Babu Palathingal <anna.bp@ibm.com>
  • Loading branch information
annaibm committed May 21, 2024
1 parent 9b01988 commit 327b8e2
Show file tree
Hide file tree
Showing 3 changed files with 44 additions and 18 deletions.
25 changes: 19 additions & 6 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,8 +212,14 @@ 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') {
sh "perl ./aqa-tests/TKG/scripts/getDependencies.pl -path ${env.LIB_DIR} -task default -customUrl ${customUrl}"
} else {
env.LIB_DIR = env.SYSTEM_LIB_DIR
sh "perl ./aqa-tests/TKG/scripts/getDependencies.pl -path ${env.LIB_DIR} -task default"
}
sh "perl ./aqa-tests/TKG/scripts/getDependencies.pl -path ${env.LIB_DIR} -task default -customUrl ${customUrl}"
}
} catch (Exception e) {
echo 'Exception: ' + e.toString()
Expand Down Expand Up @@ -659,8 +666,14 @@ def buildTest() {
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') {
sh "perl ./aqa-tests/TKG/scripts/getDependencies.pl -path ${env.LIB_DIR} -task default -customUrl ${customUrl}"
} else {
env.LIB_DIR = env.SYSTEM_LIB_DIR
sh "perl ./aqa-tests/TKG/scripts/getDependencies.pl -path ${env.LIB_DIR} -task default"
}
sh "perl ./aqa-tests/TKG/scripts/getDependencies.pl -path ${env.LIB_DIR} -task default -customUrl ${customUrl}"
}
} catch (Exception e) {
echo 'Exception: ' + e.toString()
Expand Down Expand Up @@ -1014,10 +1027,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) {
Expand Down
9 changes: 6 additions & 3 deletions system/common.xml
Original file line number Diff line number Diff line change
Expand Up @@ -318,6 +318,12 @@
</target>

<target name="common_dist" description="generate the distribution">
<condition property="system_lib_dir" value="${env.SYSTEM_LIB_DIR}" else="${TEST_ROOT}/systemtest_prereqs/">
<isset property="env.SYSTEM_LIB_DIR"/>
</condition>
<echo message="SYSTEMTEST_DEST is set to: ${SYSTEMTEST_DEST}" />
<echo message="TEST_ROOT is set to: ${TEST_ROOT}" />
<echo message="SYSTEM_LIB_DIR is set to: ${env.SYSTEM_LIB_DIR}" />
<copy todir="${SYSTEMTEST_DEST}/STF">
<fileset dir="${SYSTEMTEST_ROOT}/STF" includes="**" />
</copy>
Expand All @@ -336,9 +342,6 @@
<chmod file="${SYSTEMTEST_DEST}/openj9-systemtest/openj9.test.sharedClasses.jvmti/bin/native/**" perm="755"/>
</then>
</if>
<copy todir="${SYSTEMTEST_DEST}/systemtest_prereqs/">
<fileset dir="${TEST_ROOT}/systemtest_prereqs/" includes="**" />
</copy>
</target>

<!-- target to build all projects in the repository. -->
Expand Down
28 changes: 19 additions & 9 deletions system/system.mk
Original file line number Diff line number Diff line change
Expand Up @@ -14,12 +14,12 @@
# Set our own macro to indicate we're running under cygwin.
ifndef CYGWIN
OSTYPE?=$(shell echo $$OSTYPE)
CYGWIN:=0
CYGWIN := 0
ifeq ($(OSTYPE),cygwin)
CYGWIN:=1
CYGWIN := 1
endif
ifeq ($(TERM),cygwin)
CYGWIN:=1
CYGWIN := 1
endif
endif
$(warning CYGWIN is $(CYGWIN))
Expand All @@ -29,17 +29,20 @@ ifeq ($(CYGWIN),1)
# than the cygwin perl port. This assumes that version will be in a directory ending /perl/bin directory
# and the cygwin version will not. Once found, that version of perl is added ahead of cygwin perl in the PATH.
$(warning Running under cygwin, looking for Windows perl on path)
PERL:=$(shell which -a perl.exe | grep /perl/bin | sort | uniq)
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))
endif
PERL:=$(dir $(PERL))
export PATH:=$(PERL):$(PATH)
PERL := $(dir $(PERL))
export PATH := $(PERL):$(PATH)
endif

$(info TEST_RESROOT is $(TEST_RESROOT))
SYSTEMTEST_RESROOT=$(TEST_RESROOT)/../
$(info SYSTEMTEST_RESROOT is $(SYSTEMTEST_RESROOT))


ifeq (,$(findstring $(JDK_IMPL),hotspot))
OPENJ9_PRAM=;$(SYSTEMTEST_RESROOT)$(D)openj9-systemtest
Expand Down Expand Up @@ -71,15 +74,22 @@ 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

$(info SYSTEMTEST_RESROOT is $(SYSTEMTEST_RESROOT))
$(info SYSTEM_LIB_DIR is $(SYSTEM_LIB_DIR))

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 327b8e2

Please sign in to comment.