From be05fecca02dcda2cae7b759823c8f82298830ef Mon Sep 17 00:00:00 2001 From: Andres Gomez Date: Mon, 3 May 2021 22:11:17 +0300 Subject: [PATCH] ci: allow starting xorg for piglit run And enable it in the radv's Raven traces job. v2: - Adapt to changes in the start-x.sh script. v3: - Not deleting any more the non-existent by now ".gitlab-ci/common/start-x.sh" script (Martin). Signed-off-by: Andres Gomez Reviewed-by: Martin Peres Part-of: --- .gitlab-ci/piglit/run.sh | 51 +++++++++++++++++++++------------------- 1 file changed, 27 insertions(+), 24 deletions(-) diff --git a/.gitlab-ci/piglit/run.sh b/.gitlab-ci/piglit/run.sh index 0247b16655f..d98c562c4b0 100755 --- a/.gitlab-ci/piglit/run.sh +++ b/.gitlab-ci/piglit/run.sh @@ -17,6 +17,21 @@ export __LD_LIBRARY_PATH="$LD_LIBRARY_PATH:$INSTALL/lib/" # run against the Mesa built by CI, rather than any installed distro version. MESA_VERSION=$(cat "$INSTALL/VERSION" | sed 's/\./\\./g') +print_red() { + RED='\033[0;31m' + NC='\033[0m' # No Color + printf "${RED}" + "$@" + printf "${NC}" +} + +# wrapper to supress +x to avoid spamming the log +quiet() { + set +x + "$@" + set -x +} + if [ "$VK_DRIVER" ]; then ### VULKAN ### @@ -43,15 +58,18 @@ if [ "$VK_DRIVER" ]; then # Set up the Window System Interface (WSI) - # IMPORTANT: - # - # Nothing to do here. - # - # Run vulkan against the host's running X server (xvfb doesn't - # have DRI3 support). - # Set the DISPLAY env variable in each gitlab-runner's - # configuration file: - # https://docs.gitlab.com/runner/configuration/advanced-configuration.html#the-runners-section + if [ ${TEST_START_XORG:-0} -eq 1 ]; then + "$INSTALL"/common/start-x.sh "$INSTALL" + export DISPLAY=:0 + else + # Run vulkan against the host's running X server (xvfb doesn't + # have DRI3 support). + # Set the DISPLAY env variable in each gitlab-runner's + # configuration file: + # https://docs.gitlab.com/runner/configuration/advanced-configuration.html#the-runners-section + quiet printf "%s%s\n" "Running against the hosts' X server. " \ + "DISPLAY is \"$DISPLAY\"." + fi else ### GL/ES ### @@ -120,21 +138,6 @@ if [ -n "$CI_NODE_INDEX" ]; then USE_CASELIST=1 fi -print_red() { - RED='\033[0;31m' - NC='\033[0m' # No Color - printf "${RED}" - "$@" - printf "${NC}" -} - -# wrapper to supress +x to avoid spamming the log -quiet() { - set +x - "$@" - set -x -} - replay_minio_upload_images() { find "$RESULTS/$__PREFIX" -type f -name "*.png" -printf "%P\n" \ | while read -r line; do