Skip to content

Commit

Permalink
pre-stage test libs on the machine
Browse files Browse the repository at this point in the history
Signed-off-by: Lan Xia <[email protected]>
  • Loading branch information
llxia committed Dec 6, 2023
1 parent 45537f2 commit 29cc92e
Show file tree
Hide file tree
Showing 2 changed files with 21 additions and 18 deletions.
33 changes: 15 additions & 18 deletions buildenv/jenkins/JenkinsfileBase
Original file line number Diff line number Diff line change
Expand Up @@ -622,27 +622,24 @@ def buildTest() {
}
}

def libDir="${WORKSPACE}/../../testDependency/lib"
try {
//get pre-staged jars from test.getDependency build before test compilation
timeout(time: 15, unit: 'MINUTES') {
copyArtifacts fingerprintArtifacts: true, projectName: "test.getDependency", filter: "json-simple.jar", selector: lastSuccessful(), target: 'aqa-tests/TKG/lib'
}
if (env.BUILD_LIST.contains('functional')) {
timeout(time: 60, unit: 'MINUTES') {
copyArtifacts fingerprintArtifacts: true, projectName: "test.getDependency", excludes: "json-simple.jar, jtreg*.*, openj9jtregtimeouthandler.*", selector: lastSuccessful(), target: 'aqa-tests/TKG/lib'
}
// jtreg is needed in dev.functional and extended.functional (for ssl-tests and CryptoTest)
if (params.TARGET.contains('dev.functional') || params.TARGET.contains('extended.functional')) {
timeout(time: 60, unit: 'MINUTES') {
copyArtifacts fingerprintArtifacts: true, projectName: "test.getDependency", filter: "jtreg*.*,openj9jtregtimeouthandler.*", selector: lastSuccessful(), target: 'aqa-tests/TKG/lib'
}
// 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 check. Redlownload if SHA does not match.
timeout(time: 20, unit: 'MINUTES') {
def customUrl = "https://ci.adoptium.net/job/test.getDependency/lastSuccessfulBuild/artifact/"
if (PLATFORM.contains("windows")) {
libDir = libDir.replaceAll("\\\\", "/")
}
sh "perl ./aqa-tests/TKG/scripts/getDependencies.pl -path ${libDir} -task default -customUrl ${customUrl}"
}
if (env.BUILD_LIST.contains('openjdk')) {
timeout(time: 60, unit: 'MINUTES') {
copyArtifacts fingerprintArtifacts: true, projectName: "test.getDependency", filter: "jtreg*.*,openj9jtregtimeouthandler.*", selector: lastSuccessful(), target: 'aqa-tests/TKG/lib'
}
}
} catch (Exception e) {
echo 'Exception: ' + e.toString()
echo "Cannot pre-stage test libs from ${libDir} 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') {
Expand Down
6 changes: 6 additions & 0 deletions buildenv/jenkins/openjdk_tests
Original file line number Diff line number Diff line change
Expand Up @@ -378,6 +378,12 @@ timestamps{
}
} else {
node(LABEL) {
def libDir="${WORKSPACE}/../../testDependency/lib"
echo "libDir1: ${libDir}"
if (PLATFORM.contains("windows")) {
libDir = libDir.replaceAll("\\\\", "/")
}
echo "libDir2: ${libDir}"
runTest()
}
}
Expand Down

0 comments on commit 29cc92e

Please sign in to comment.