Skip to content

Commit 371c6be

Browse files
llxiapshipton
authored andcommitted
Use weston on Wayland for RHEL10
Signed-off-by: Lan Xia <[email protected]>
1 parent 31b35bb commit 371c6be

File tree

1 file changed

+17
-7
lines changed

1 file changed

+17
-7
lines changed

buildenv/jenkins/JenkinsfileBase

+17-7
Original file line numberDiff line numberDiff line change
@@ -767,15 +767,25 @@ def runTest( ) {
767767
for (int i = 1; i <= ITERATIONS; i++) {
768768
echo "ITERATION: ${i}/${ITERATIONS}"
769769
if (env.SPEC.contains('linux') && !(LABEL.contains('ci.agent.dynamic') && CLOUD_PROVIDER == 'azure') && (BUILD_LIST != "external")) {
770-
// Add an additional 10 second timeout due to issue: https://github.com/adoptium/temurin-build/issues/2368#issuecomment-756683888
771-
wrap([$class: 'Xvfb', autoDisplayName: true, timeout:20]) {
772-
def DISPLAY = sh (
773-
script: 'ps -f | grep \'[X]vfb\' | awk \'{print \$9}\'',
774-
returnStdout: true
775-
).trim()
776-
env.DISPLAY = "${DISPLAY}"
770+
// RHEL10 uses Wayland instead of X11
771+
// TODO: once proper label is added on the machine, NODE_NAME check should be removed.
772+
if (LABEL.contains("sw.os.rhel.10") || "${NODE_NAME}".toLowerCase().contains("rhel10")) {
773+
sh "weston --no-config --socket=wayland-vfb --backend=headless-backend.so --xwayland &"
774+
env.DISPLAY = ":0"
775+
777776
echo "env.DISPLAY is ${env.DISPLAY}"
778777
makeTest("${RUNTEST_CMD}")
778+
} else {
779+
// Add an additional 10 second timeout due to issue: https://github.com/adoptium/temurin-build/issues/2368#issuecomment-756683888
780+
wrap([$class: 'Xvfb', autoDisplayName: true, timeout:20]) {
781+
def DISPLAY = sh (
782+
script: 'ps -f | grep \'[X]vfb\' | awk \'{print \$9}\'',
783+
returnStdout: true
784+
).trim()
785+
env.DISPLAY = "${DISPLAY}"
786+
echo "env.DISPLAY is ${env.DISPLAY}"
787+
makeTest("${RUNTEST_CMD}")
788+
}
779789
}
780790
} else if (BUILD_LIST.contains('external')) {
781791
sshagent (credentials: ["$params.SSH_AGENT_CREDENTIAL"], ignoreMissing: true) {

0 commit comments

Comments
 (0)