Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Extending test timeout on slow platforms #915

Merged
merged 6 commits into from
Feb 13, 2024
Merged
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
56 changes: 33 additions & 23 deletions pipelines/build/common/openjdk_build_pipeline.groovy
Original file line number Diff line number Diff line change
Expand Up @@ -178,6 +178,7 @@ class Build {
def jobParams = [:]
String jdk_Version = getJavaVersionNumber() as String
jobParams.put('JDK_VERSIONS', jdk_Version)

if (buildConfig.VARIANT == 'temurin') {
jobParams.put('JDK_IMPL', 'hotspot')
} else {
Expand All @@ -187,7 +188,12 @@ class Build {
def arch = buildConfig.ARCHITECTURE
if (arch == 'x64') {
arch = 'x86-64'
} else if (arch == 's390x') {
jobParams.put('TIME_LIMIT', '20')
} else if (arch == 'riscv64') {
jobParams.put('TIME_LIMIT', '20')
}

def arch_os = "${arch}_${buildConfig.TARGET_OS}"
jobParams.put('ARCH_OS_LIST', arch_os)
jobParams.put('LIGHT_WEIGHT_CHECKOUT', false)
Expand Down Expand Up @@ -300,7 +306,7 @@ class Build {

// Use BUILD_REF override if specified
vendorTestBranches = buildConfig.BUILD_REF ?: vendorTestBranches

try {
context.println 'Running smoke test'
context.stage('smoke test') {
Expand Down Expand Up @@ -334,7 +340,6 @@ class Build {
]
currentBuild.result = testJob.getResult()
return testJob.getResult()

}
} catch (Exception e) {
context.println "Failed to execute test: ${e.message}"
Expand All @@ -350,7 +355,6 @@ class Build {
def jdkBranch = getJDKBranch()
def jdkRepo = getJDKRepo()
def openj9Branch = (buildConfig.SCM_REF && buildConfig.VARIANT == 'openj9') ? buildConfig.SCM_REF : 'master'

List testList = buildConfig.TEST_LIST
List dynamicList = buildConfig.DYNAMIC_LIST
List numMachines = buildConfig.NUM_MACHINES
Expand Down Expand Up @@ -445,26 +449,33 @@ class Build {
}
}

def testJobParams = [
context.string(name: 'UPSTREAM_JOB_NUMBER', value: "${env.BUILD_NUMBER}"),
context.string(name: 'UPSTREAM_JOB_NAME', value: "${env.JOB_NAME}"),
context.string(name: 'SDK_RESOURCE', value: 'upstream'),
context.string(name: 'JDK_REPO', value: jdkRepo),
context.string(name: 'JDK_BRANCH', value: jdkBranch),
context.string(name: 'OPENJ9_BRANCH', value: openj9Branch),
context.string(name: 'LABEL_ADDITION', value: additionalTestLabel),
context.booleanParam(name: 'KEEP_REPORTDIR', value: keep_test_reportdir),
context.string(name: 'PARALLEL', value: parallel),
context.string(name: 'NUM_MACHINES', value: "${numMachinesPerTest}"),
context.booleanParam(name: 'USE_TESTENV_PROPERTIES', value: useTestEnvProperties),
context.booleanParam(name: 'GENERATE_JOBS', value: aqaAutoGen),
context.string(name: 'ADOPTOPENJDK_BRANCH', value: aqaBranch),
context.string(name: 'ACTIVE_NODE_TIMEOUT', value: "${buildConfig.ACTIVE_NODE_TIMEOUT}"),
context.booleanParam(name: 'DYNAMIC_COMPILE', value: DYNAMIC_COMPILE),
context.string(name: 'RERUN_ITERATIONS', value: "${rerunIterations}")
]

// If TIME_LIMIT is set, override target job default TIME_LIMIT value.
if (jobParams.any{mapEntry -> mapEntry.key.equals("TIME_LIMIT")}) {
testJobParams.add(context.string(name: 'TIME_LIMIT', value: jobParams["TIME_LIMIT"]))
}

def testJob = context.build job: jobName,
propagate: false,
parameters: [
context.string(name: 'UPSTREAM_JOB_NUMBER', value: "${env.BUILD_NUMBER}"),
context.string(name: 'UPSTREAM_JOB_NAME', value: "${env.JOB_NAME}"),
context.string(name: 'SDK_RESOURCE', value: 'upstream'),
context.string(name: 'JDK_REPO', value: jdkRepo),
context.string(name: 'JDK_BRANCH', value: jdkBranch),
context.string(name: 'OPENJ9_BRANCH', value: openj9Branch),
context.string(name: 'LABEL_ADDITION', value: additionalTestLabel),
context.booleanParam(name: 'KEEP_REPORTDIR', value: keep_test_reportdir),
context.string(name: 'PARALLEL', value: parallel),
context.string(name: 'NUM_MACHINES', value: "${numMachinesPerTest}"),
context.booleanParam(name: 'USE_TESTENV_PROPERTIES', value: useTestEnvProperties),
context.booleanParam(name: 'GENERATE_JOBS', value: aqaAutoGen),
context.string(name: 'ADOPTOPENJDK_BRANCH', value: aqaBranch),
context.string(name: 'ACTIVE_NODE_TIMEOUT', value: "${buildConfig.ACTIVE_NODE_TIMEOUT}"),
context.booleanParam(name: 'DYNAMIC_COMPILE', value: DYNAMIC_COMPILE),
context.string(name: 'RERUN_ITERATIONS', value: "${rerunIterations}")
],
parameters: testJobParams,
wait: true
currentBuild.result = testJob.getResult()
context.node('worker') {
Expand Down Expand Up @@ -1852,7 +1863,7 @@ class Build {
context.println "Executing tests: ${buildConfig.TEST_LIST}"
context.println "Build num: ${env.BUILD_NUMBER}"
context.println "File name: ${filename}"

def enableReproducibleCompare = Boolean.valueOf(buildConfig.ENABLE_REPRODUCIBLE_COMPARE)
def enableTests = Boolean.valueOf(buildConfig.ENABLE_TESTS)
def enableInstallers = Boolean.valueOf(buildConfig.ENABLE_INSTALLERS)
Expand Down Expand Up @@ -1922,7 +1933,6 @@ class Build {
if (buildConfig.DOCKER_CREDENTIAL) {
context.docker.withRegistry(buildConfig.DOCKER_REGISTRY, buildConfig.DOCKER_CREDENTIAL) {
if (buildConfig.DOCKER_ARGS) {

context.sh(script: "docker pull ${buildConfig.DOCKER_IMAGE} ${buildConfig.DOCKER_ARGS}")
} else {
context.docker.image(buildConfig.DOCKER_IMAGE).pull()
Expand Down
Loading