Skip to content

Commit

Permalink
Merge branch 'master' into unexclude-runtime-ErrorHandling-jdk8
Browse files Browse the repository at this point in the history
  • Loading branch information
zzambers authored Mar 27, 2023
2 parents aa57db5 + b357df7 commit bfcec42
Show file tree
Hide file tree
Showing 78 changed files with 527,718 additions and 394 deletions.
34 changes: 19 additions & 15 deletions .github/ISSUE_TEMPLATE/bug_report.md
Original file line number Diff line number Diff line change
@@ -1,23 +1,27 @@
---
name: Bug report
about: Create a report to help us improve
title: ''
name: Failing test report
about: An Issue to describe a failing test
title: '<Test Name> FAILED in <Jenkins Test Job Name>'
labels: ''
assignees: ''

---
**Failing Test Info**
Test Name:
Test Duration:
Machine it fails on:
Machines it passes on (if intermittent):

**Describe the bug**
A clear and concise description of what the bug is.
**Jenkins Test Job Info**
Jenkins Test Job Name: (Example: Test_openjdk8_hs_extended.openjdk_arm_linux_testList_0)
Jenkins Test Job URL:
TRSS link for the build (if available):

**To Reproduce**
Steps to reproduce the behavior (or Grinder rerun link):
**Deep History Link from TRSS (if available)**

**Expected behavior**
A clear and concise description of what you expected to happen.
** Rerun in Grinder Link (if available) or Steps to Reproduce**

**Screenshots**
If applicable, add screenshots to help explain your problem.
**Java Version output (from console output)**

**Additional context**
Add any other context about the problem here.
**Relevant Console Output (showing exceptions/errors/crashes)**

**Attach or link to relevant artifacts**
In the case of test failures, the Jenkins Test Job has test_output.tar.gz artifacts that contain extra logs and core files in the case of crashes. Please download and inspect these files. Copy relevant files to an accessible location that can be linked to, or attach relevant files to this issue directly.
18 changes: 0 additions & 18 deletions .github/ISSUE_TEMPLATE/release-pipeline-triage-report.md

This file was deleted.

58 changes: 29 additions & 29 deletions .gitignore
Original file line number Diff line number Diff line change
@@ -1,29 +1,29 @@
# java .class files
*.class

# misc auto generated folders
bin
!perf/liberty/scripts/bin

# misc auto generated files
autoGen.mk

TestConfig
TKG
functional
!functional/security
!functional/security/AQAvit
!functional/security/Crypto
!functional/SyntheticGCWorkload
!functional/MBCS_Tests

Utils
systemtest_prereqs/*
openjdk/*.gz
.DS_Store
.idea/

/.classpath
/.project
/job.properties
.vscode/
# java .class files
*.class

# misc auto generated folders
bin
!perf/liberty/scripts/bin

# misc auto generated files
autoGen.mk

TestConfig
TKG
functional
!functional/security
!functional/security/AQAvit
!functional/security/Crypto
!functional/SyntheticGCWorkload
!functional/MBCS_Tests

Utils
systemtest_prereqs/*
openjdk/*.gz
.DS_Store
.idea/

/.classpath
/.project
/job.properties
.vscode/
70 changes: 52 additions & 18 deletions buildenv/jenkins/JenkinsfileBase
Original file line number Diff line number Diff line change
Expand Up @@ -364,6 +364,21 @@ def setup() {
} else if (params.CUSTOMIZED_SDK_URL) {
SDK_RESOURCE = "customized"
CUSTOMIZED_SDK_URL_OPTION = "-c '${params.CUSTOMIZED_SDK_URL}'"
if (params.ADDITIONAL_ARTIFACTS_REQUIRED == "RI_JDK") {
def server = Artifactory.server params.ARTIFACTORY_SERVER
def artifactoryUrl = server.getUrl()
def repoForRi = ''
def riURL = ''
if (params.ARTIFACTORY_REPO.contains(',')) {
String[] repos = params.ARTIFACTORY_REPO.split(",")
// Assumption: ARTIFACTORY_REPO=X,Y (X=to upload results, Y=to download ri)
repoForRi = repos[1].trim()
if (!env.SPEC.startsWith('aix') && !env.SPEC.startsWith('zos')) {
riURL = "${artifactoryUrl}/${repoForRi}/Latest/${PLATFORM}/${JDK_VERSION}"
}
}
CUSTOMIZED_SDK_URL_OPTION = "-c '${params.CUSTOMIZED_SDK_URL} ${riURL}'"
}
} else {
CUSTOMIZED_SDK_URL_OPTION = ""
}
Expand Down Expand Up @@ -421,9 +436,10 @@ def setup() {
TEST_IMAGES_REQUIRED = (params.TEST_IMAGES_REQUIRED == false) ? "--test_images_required false" : ""
DEBUG_IMAGES_REQUIRED = (params.DEBUG_IMAGES_REQUIRED == false) ? "--debug_images_required false" : ""
CODE_COVERAGE_OPTION = params.CODE_COVERAGE ? "--code_coverage true" : ""
ADDITIONAL_ARTIFACTS_REQUIRED_OPTION = (params.ADDITIONAL_ARTIFACTS_REQUIRED) ? "--additional_artifacts_required ${params.ADDITIONAL_ARTIFACTS_REQUIRED}" : ""

CURL_OPTS = (params.CURL_OPTS) ? "--curl_opts \"${params.CURL_OPTS}\"" : ""
GET_SH_CMD = "./get.sh -s `pwd`/.. -p $PLATFORM -r ${SDK_RESOURCE} ${JDK_VERSION_OPTION} ${JDK_IMPL_OPTION} ${CUSTOMIZED_SDK_URL_OPTION} ${CLONE_OPENJ9_OPTION} ${OPENJ9_REPO_OPTION} ${OPENJ9_BRANCH_OPTION} ${OPENJ9_SHA_OPTION} ${TKG_REPO_OPTION} ${TKG_BRANCH_OPTION} ${VENDOR_TEST_REPOS} ${VENDOR_TEST_BRANCHES} ${VENDOR_TEST_DIRS} ${VENDOR_TEST_SHAS} ${TEST_IMAGES_REQUIRED} ${DEBUG_IMAGES_REQUIRED} ${CODE_COVERAGE_OPTION} ${CURL_OPTS}"
GET_SH_CMD = "./get.sh -s `pwd`/.. -p $PLATFORM -r ${SDK_RESOURCE} ${JDK_VERSION_OPTION} ${JDK_IMPL_OPTION} ${CUSTOMIZED_SDK_URL_OPTION} ${CLONE_OPENJ9_OPTION} ${OPENJ9_REPO_OPTION} ${OPENJ9_BRANCH_OPTION} ${OPENJ9_SHA_OPTION} ${TKG_REPO_OPTION} ${TKG_BRANCH_OPTION} ${VENDOR_TEST_REPOS} ${VENDOR_TEST_BRANCHES} ${VENDOR_TEST_DIRS} ${VENDOR_TEST_SHAS} ${TEST_IMAGES_REQUIRED} ${DEBUG_IMAGES_REQUIRED} ${CODE_COVERAGE_OPTION} ${CURL_OPTS} ${ADDITIONAL_ARTIFACTS_REQUIRED_OPTION}"
RESOLVED_MAKE = "if [ `uname` = AIX ] || [ `uname` = SunOS ] || [ `uname` = *BSD ]; then MAKE=gmake; else MAKE=make; fi"
dir( WORKSPACE) {
// use sshagent with Jenkins credentials ID for all platforms except zOS
Expand Down Expand Up @@ -759,7 +775,7 @@ def post(output_name) {

step([$class: "TapPublisher", testResults: "aqa-tests/TKG/**/*.tap", outputTapToConsole: false, failIfNoResults: true])

junit allowEmptyResults: true, keepLongStdio: true, testResults: '**/work/**/*.jtr.xml, **/junitreports/**/*.xml, **/external_test_reports/**/*.xml'
junit allowEmptyResults: true, keepLongStdio: true, testResults: '**/work/**/*.jtr.xml, **/result/**/*.jtr.xml, **/junitreports/**/*.xml, **/external_test_reports/**/*.xml'

//call the archive function for each file
archiveFile("aqa-tests/testenv/testenv.properties", true)
Expand Down Expand Up @@ -855,18 +871,7 @@ def testBuild() {
terminateTestProcesses()

if (!params.KEEP_WORKSPACE) {
try {
// cleanWs() does not work in some cases, so set opts below
cleanWs disableDeferredWipeout: true, deleteDirs: true
} catch (Exception e) {
echo 'Exception: ' + e.toString()
//cleanWs has issue to delete workspace that contains non-ASCII filename in TKG output https://issues.jenkins.io/browse/JENKINS-33478
//cannot delete workspace directly. Otherwise, Jenkins job will abort due to missing workspace
sh "rm -rf ${env.WORKSPACE}/aqa-tests/TKG"
// call cleanWs() again
cleanWs disableDeferredWipeout: true, deleteDirs: true
}

forceCleanWS()
// clean up remaining core files
if (PLATFORM.contains("mac")) {
sh "find /cores -name '*core*' -print 2>/dev/null -exec rm -f {} \\; || true"
Expand Down Expand Up @@ -976,6 +981,12 @@ def uploadToArtifactory(pattern, artifactoryUploadDir="") {
if (params.ARTIFACTORY_SERVER) {
def server = Artifactory.server params.ARTIFACTORY_SERVER
def artifactoryRepo = params.ARTIFACTORY_REPO ? params.ARTIFACTORY_REPO : "sys-rt-generic-local"

if (artifactoryRepo.contains(',')) {
String[] repos = artifactoryRepo.split(",")
artifactoryRepo = repos[0].trim()
}

def artifactoryRoorDir = params.ARTIFACTORY_ROOT_DIR ? params.ARTIFACTORY_ROOT_DIR : getJenkinsDomain()
if (artifactoryRoorDir.endsWith("/")) {
artifactoryRoorDir = artifactoryRoorDir.substring(0, artifactoryRoorDir.length() - 1);
Expand Down Expand Up @@ -1046,6 +1057,7 @@ def addGrinderLink() {
def labelValue = ""
def targetValue = ""
def customTargetKeyValue = ""
def rerunIterations = ""
def urlParams = params.findAll {
// Exclude separator and help text parameters from url
!(it.key.endsWith('_PARAMS') || it.key.endsWith('_HELP_TEXT'))
Expand All @@ -1066,11 +1078,20 @@ def addGrinderLink() {
if ( key == "CUSTOM_TARGET") {
customTargetKeyValue = "CUSTOM_TARGET=${value}"
}
if ( key == "RERUN_ITERATIONS") {
rerunIterations = "RERUN_ITERATIONS=${value}"
}

}
env.RERUN_LINK = url
env.FAILED_TEST_TARGET = targetValue
env.CUSTOM_TARGET_KEY_VALUE = customTargetKeyValue

// reset RERUN_ITERATIONS to 0 in Rerun in Grinder link
if (rerunIterations) {
url = url.replace(rerunIterations,"RERUN_ITERATIONS=0")
}

currentBuild.description += "<br><a href=\"https://github.com/adoptium/aqa-tests/wiki/How-to-Run-a-Grinder-Build-on-Jenkins\">Grinder Wiki</a>"
echo "Rerun in Grinder: ${url}"
currentBuild.description += "<br><a href=${url}>Rerun in Grinder</a> Change TARGET to run only the failed test targets."
Expand Down Expand Up @@ -1102,6 +1123,8 @@ def addFailedTestsGrinderLink(paths=""){
failedTestCasesInfo = failedTestCasesInfo.substring(failedTestCasesInfo.indexOf('TEST:'))
failedTestCasesInfo = failedTestCasesInfo.substring(0, failedTestCasesInfo.indexOf('Test results:'))
failedTestCasesInfo = failedTestCasesInfo.split("\\n").join(" ").replaceAll("TEST: ", "")
// Remove #id suffixed to the openjdk testcase name. Jtreg doesn't work with it.
failedTestCasesInfo = failedTestCasesInfo.replaceAll(/#id\d{1,}/, "")
if (failedtest.startsWith("jdk_")) {
jdkFailedTestCaseList += "${failedTestCasesInfo} "
} else {
Expand Down Expand Up @@ -1211,8 +1234,7 @@ def run_parallel_tests() {
stage ("Parallel Tests") {
def childJobs = parallel parallel_tests
node {
// cleanWs() does not work in some cases, so set opts below
cleanWs disableDeferredWipeout: true, deleteDirs: true
forceCleanWS()
try {
def buildPaths = ""
childJobs.each {
Expand Down Expand Up @@ -1243,8 +1265,7 @@ def run_parallel_tests() {
triggerRerunJob(failedTests)
}
} finally {
// cleanWs() does not work in some cases, so set opts below
cleanWs disableDeferredWipeout: true, deleteDirs: true
forceCleanWS()
}
}
}
Expand All @@ -1270,4 +1291,17 @@ def getGitRepoBranch(ownerBranch, defaultOwnerBranch, repo) {
return actualRepoBranch
}

def forceCleanWS() {
try {
cleanWs disableDeferredWipeout: true, deleteDirs: true
} catch (Exception e) {
echo 'Exception: ' + e.toString()
//cleanWs has issue to delete workspace that contains non-ASCII filename in TKG output https://issues.jenkins.io/browse/JENKINS-33478
//cannot delete workspace directly. Otherwise, Jenkins job will abort due to missing workspace
sh "rm -rf ${env.WORKSPACE}/aqa-tests/TKG"
// call cleanWs() again
cleanWs disableDeferredWipeout: true, deleteDirs: true
}
}

return this
25 changes: 18 additions & 7 deletions buildenv/jenkins/openjdk_tests
Original file line number Diff line number Diff line change
Expand Up @@ -181,10 +181,6 @@ timestamps{
if (params.TEST_FLAG == "FIPS") {
LABEL = LABEL.minus("ci.role.test&&").concat("&&ci.role.test.fips")
env.EXTRA_OPTIONS += " -Dsemeru.fips=true"
// For FIPS functional testing, limit BUILD_LIST to FIPS test folder
if (JOB_NAME.contains ("functional") && JOB_NAME.contains("_fips")) {
env.BUILD_LIST = "functional/cmdLineTests/fips"
}
}

// Temporarily exclude ubuntu 22 machines for criu sanity.external pipeline
Expand Down Expand Up @@ -274,11 +270,11 @@ timestamps{
}
}


def runTest() {
try {
def retry_count = 0
def sleep_time = 180

if (params.PLATFORM.contains('zos')) {
/* Ensure correct CC env */
env._CC_CCMODE = '1'
Expand All @@ -299,7 +295,7 @@ def runTest() {
}
retry_count++
timeout(time: 1, unit: 'HOURS') {
cleanWs disableDeferredWipeout: true, deleteDirs: true
forceCleanWS()
}
sh "git clone -b ${SCM_GIT_BRANCH} ${SCM_GIT_REPO_VAL} aqa-tests"
}
Expand All @@ -315,7 +311,7 @@ def runTest() {
}
retry_count++
timeout(time: 1, unit: 'HOURS') {
cleanWs disableDeferredWipeout: true, deleteDirs: true
forceCleanWS()
}
checkout scm: [$class: 'GitSCM',
branches: [[name: "${scm.branches[0].name}"]],
Expand Down Expand Up @@ -424,3 +420,18 @@ def checkErrors(errorList) {
}
}
}


def forceCleanWS() {
try {
cleanWs disableDeferredWipeout: true, deleteDirs: true
} catch (Exception e) {
echo 'Exception: ' + e.toString()
//cleanWs has issue to delete workspace that contains non-ASCII filename in TKG output https://issues.jenkins.io/browse/JENKINS-33478
//cannot delete workspace directly. Otherwise, Jenkins job will abort due to missing workspace
sh "rm -rf ${env.WORKSPACE}/aqa-tests/TKG"
// call cleanWs() again
cleanWs disableDeferredWipeout: true, deleteDirs: true
}
}

2 changes: 2 additions & 0 deletions buildenv/jenkins/testJobTemplate
Original file line number Diff line number Diff line change
Expand Up @@ -64,6 +64,7 @@ if (!binding.hasVariable('CLOUD_PROVIDER')) CLOUD_PROVIDER = ""
if (!binding.hasVariable('RERUN_ITERATIONS')) RERUN_ITERATIONS = "0"
if (!binding.hasVariable('JENKINS_KEY')) JENKINS_KEY = ""
if (!binding.hasVariable('RELATED_NODES')) RELATED_NODES = ""
if (!binding.hasVariable('ADDITIONAL_ARTIFACTS_REQUIRED')) ADDITIONAL_ARTIFACTS_REQUIRED = ""

if (!binding.hasVariable('BUILDS_TO_KEEP')) {
BUILDS_TO_KEEP = 10
Expand Down Expand Up @@ -317,6 +318,7 @@ ARCH_OS_LIST.each { ARCH_OS ->
stringParam('JDK_IMPL', JDK_IMPL_BASE, "JDK Base implementation, e.g. hotspot, openj9")
stringParam('CUSTOMIZED_SDK_URL', "", "Customized SDK url, need to set when SDK_RESOURCE=customized")
stringParam('CUSTOMIZED_SDK_URL_CREDENTIAL_ID', CUSTOMIZED_SDK_URL_CREDENTIAL_ID, "Only use this if you are pulling an JDK from a site that needs credential")
stringParam('ADDITIONAL_ARTIFACTS_REQUIRED', ADDITIONAL_ARTIFACTS_REQUIRED, "Optional. Only use this to specify the type of additional artifacts")
stringParam('DOCKER_REGISTRY_URL', DOCKER_REGISTRY_URL, "Only use this if you need to access a docker registry")
stringParam('DOCKER_REGISTRY_DIR', DOCKER_REGISTRY_DIR, "Only use this if you need to specify the directory in docker registry")
stringParam('DOCKER_REGISTRY_URL_CREDENTIAL_ID', DOCKER_REGISTRY_URL_CREDENTIAL_ID, "Only use this if the docker registry you access needs credential")
Expand Down
Loading

0 comments on commit bfcec42

Please sign in to comment.