From 371c6bed5155206500a1477c4509df07c1c3752f Mon Sep 17 00:00:00 2001 From: Lan Xia Date: Tue, 7 Jan 2025 17:30:03 -0500 Subject: [PATCH] Use weston on Wayland for RHEL10 Signed-off-by: Lan Xia --- buildenv/jenkins/JenkinsfileBase | 24 +++++++++++++++++------- 1 file changed, 17 insertions(+), 7 deletions(-) diff --git a/buildenv/jenkins/JenkinsfileBase b/buildenv/jenkins/JenkinsfileBase index 376f0f89de..e3850d0ea0 100644 --- a/buildenv/jenkins/JenkinsfileBase +++ b/buildenv/jenkins/JenkinsfileBase @@ -767,15 +767,25 @@ def runTest( ) { for (int i = 1; i <= ITERATIONS; i++) { echo "ITERATION: ${i}/${ITERATIONS}" if (env.SPEC.contains('linux') && !(LABEL.contains('ci.agent.dynamic') && CLOUD_PROVIDER == 'azure') && (BUILD_LIST != "external")) { - // Add an additional 10 second timeout due to issue: https://github.com/adoptium/temurin-build/issues/2368#issuecomment-756683888 - wrap([$class: 'Xvfb', autoDisplayName: true, timeout:20]) { - def DISPLAY = sh ( - script: 'ps -f | grep \'[X]vfb\' | awk \'{print \$9}\'', - returnStdout: true - ).trim() - env.DISPLAY = "${DISPLAY}" + // RHEL10 uses Wayland instead of X11 + // TODO: once proper label is added on the machine, NODE_NAME check should be removed. + if (LABEL.contains("sw.os.rhel.10") || "${NODE_NAME}".toLowerCase().contains("rhel10")) { + sh "weston --no-config --socket=wayland-vfb --backend=headless-backend.so --xwayland &" + env.DISPLAY = ":0" + echo "env.DISPLAY is ${env.DISPLAY}" makeTest("${RUNTEST_CMD}") + } else { + // Add an additional 10 second timeout due to issue: https://github.com/adoptium/temurin-build/issues/2368#issuecomment-756683888 + wrap([$class: 'Xvfb', autoDisplayName: true, timeout:20]) { + def DISPLAY = sh ( + script: 'ps -f | grep \'[X]vfb\' | awk \'{print \$9}\'', + returnStdout: true + ).trim() + env.DISPLAY = "${DISPLAY}" + echo "env.DISPLAY is ${env.DISPLAY}" + makeTest("${RUNTEST_CMD}") + } } } else if (BUILD_LIST.contains('external')) { sshagent (credentials: ["$params.SSH_AGENT_CREDENTIAL"], ignoreMissing: true) {