gitlab-ci: Place files from the Mesa repo into the build tarball
authorTomeu Vizoso <tomeu.vizoso@collabora.com>
Tue, 24 Mar 2020 11:58:30 +0000 (12:58 +0100)
committerMarge Bot <eric+marge@anholt.net>
Thu, 26 Mar 2020 09:30:48 +0000 (09:30 +0000)
There's some files from the .gitlab-ci directory that are needed in the
test stage and that, because the Mesa repository isn't checked out in
that stage, need to be made available through other means.

Because those files are going to be needed in LAVA devices, place them
ino the tarball containing the built files so it's available to both
gitlab-ci runners and LAVA devices.

Before those files were passed in the artifacts of the Gitlab CI job,
but this commit places them into the built tarball so scripts later in
the pipeline don't need to account for this discrepancy.

Signed-off-by: Tomeu Vizoso <tomeu.vizoso@collabora.com>
Reviewed-by: Eric Anholt <eric@anholt.net>
Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/4295>

.gitlab-ci.yml
.gitlab-ci/bare-metal/fastboot.sh
.gitlab-ci/bare-metal/init.sh
.gitlab-ci/deqp-runner.sh
.gitlab-ci/fossilize-runner.sh
.gitlab-ci/lava-deqp.yml.jinja2
.gitlab-ci/piglit/run.sh
.gitlab-ci/prepare-artifacts.sh
.gitlab-ci/tracie-runner-gl.sh
.gitlab-ci/tracie-runner-vk.sh

index 2f9cc15a70d00301c40d1ef1e19b6436a494911a..dcbbb58784f85ba712241b1c8abc4ec0a20a69bf 100644 (file)
@@ -587,7 +587,7 @@ scons-old-llvm:
     LIBGL_ALWAYS_SOFTWARE: 1
     PIGLIT_NO_WINDOW: 1
   script:
-    - artifacts/piglit/run.sh
+    - install/piglit/run.sh
 
 piglit-quick_gl:
   extends: .piglit-test
@@ -624,7 +624,7 @@ piglit-quick_shader:
   variables:
     DEQP_SKIPS: deqp-default-skips.txt
   script:
-    - ./artifacts/deqp-runner.sh
+    - ./install/deqp-runner.sh
 
 .deqp-test-gl:
   extends:
@@ -641,7 +641,7 @@ piglit-quick_shader:
 .fossilize-test:
   extends: .test-vk
   script:
-    - ./artifacts/fossilize-runner.sh
+    - ./install/fossilize-runner.sh
 
 llvmpipe-gles2:
   variables:
@@ -790,8 +790,8 @@ arm64_a530_gles3:
     - .fossilize-test
     - .test-radv
   script:
-    - ./artifacts/fossilize-runner.sh
-    - ACO_DEBUG=validateir,validatera RADV_PERFTEST=aco ./artifacts/fossilize-runner.sh
+    - ./install/fossilize-runner.sh
+    - ACO_DEBUG=validateir,validatera RADV_PERFTEST=aco ./install/fossilize-runner.sh
 
 # Can only be triggered manually on personal branches because RADV is the only
 # driver that does Vulkan testing at the moment.
@@ -812,16 +812,16 @@ radv-fossils:
   script:
     # Polaris10
     - export RADV_FORCE_FAMILY="polaris10"
-    - ./artifacts/fossilize-runner.sh
-    - ACO_DEBUG=validateir,validatera RADV_PERFTEST=aco ./artifacts/fossilize-runner.sh
+    - ./install/fossilize-runner.sh
+    - ACO_DEBUG=validateir,validatera RADV_PERFTEST=aco ./install/fossilize-runner.sh
     # Vega10
     - export RADV_FORCE_FAMILY="gfx900"
-    - ./artifacts/fossilize-runner.sh
-    - ACO_DEBUG=validateir,validatera RADV_PERFTEST=aco ./artifacts/fossilize-runner.sh
+    - ./install/fossilize-runner.sh
+    - ACO_DEBUG=validateir,validatera RADV_PERFTEST=aco ./install/fossilize-runner.sh
     # Navi10
     - export RADV_FORCE_FAMILY="gfx1010"
-    - ./artifacts/fossilize-runner.sh
-    - ACO_DEBUG=validateir,validatera RADV_PERFTEST=aco ./artifacts/fossilize-runner.sh
+    - ./install/fossilize-runner.sh
+    - ACO_DEBUG=validateir,validatera RADV_PERFTEST=aco ./install/fossilize-runner.sh
 
 # Traces CI
 .traces-test:
@@ -835,14 +835,14 @@ radv-fossils:
     - .test-gl
     - .traces-test
   script:
-    - ./artifacts/tracie-runner-gl.sh
+    - ./install/tracie-runner-gl.sh
 
 .traces-test-vk:
   extends:
     - .test-vk
     - .traces-test
   script:
-    - ./artifacts/tracie-runner-vk.sh
+    - ./install/tracie-runner-vk.sh
 
 llvmpipe-traces:
   extends:
index 6b6174a4a9f8869ecea90ccb8e4b9616c0639452..3136f0f580128453da5b07a3a3fd2a5b984807c0 100755 (executable)
@@ -56,10 +56,9 @@ ln -sf $CI_PROJECT_DIR/install rootfs/install
 
 # Copy the deqp runner script and metadata.
 cp .gitlab-ci/deqp-runner.sh rootfs/deqp/.
-mkdir -p rootfs/artifacts/deqp
-cp .gitlab-ci/$DEQP_SKIPS rootfs/artifacts/deqp-skips.txt
+cp .gitlab-ci/$DEQP_SKIPS rootfs/$CI_PROJECT_DIR/install/deqp-skips.txt
 if [ -n "$DEQP_EXPECTED_FAILS" ]; then
-  cp .gitlab-ci/$DEQP_EXPECTED_FAILS rootfs/artifacts/deqp-expected-fails.txt
+  cp .gitlab-ci/$DEQP_EXPECTED_FAILS rootfs/$CI_PROJECT_DIR/install/deqp-expected-fails.txt
 fi
 
 # Finally, pack it up into a cpio rootfs.
index c5e5c97effcf89ed0e418819323be064ed5febe9..39a5a3c2812e521abca88afebb5e23269ef89d95 100644 (file)
@@ -15,7 +15,7 @@ export DEQP_PARALLEL=DEQP_PARALLEL_REPLACE
 export CI_NODE_INDEX=CI_NODE_INDEX_REPLACE
 export CI_NODE_TOTAL=CI_NODE_TOTAL_REPLACE
 export DEQP_SKIPS=deqp-skips.txt
-if [ -e /artifacts/deqp-expected-fails.txt ]; then
+if [ -e /install/deqp-expected-fails.txt ]; then
   export DEQP_EXPECTED_FAILS=deqp-expected-fails.txt
 fi
 
index ed95ba53578284e57110a0b9fbebbd37a0a0e6ad..1dda8e942d5d9f3ed74d472a347c05287893d19f 100755 (executable)
@@ -31,7 +31,7 @@ if [ -z "$DEQP_SKIPS" ]; then
    exit 1
 fi
 
-ARTIFACTS=`pwd`/artifacts
+INSTALL=`pwd`/install
 
 # Set up the driver environment.
 export LD_LIBRARY_PATH=`pwd`/install/lib/
@@ -66,7 +66,7 @@ if [ ! -s /tmp/case-list.txt ]; then
 fi
 
 if [ -n "$DEQP_EXPECTED_FAILS" ]; then
-    XFAIL="--xfail-list $ARTIFACTS/$DEQP_EXPECTED_FAILS"
+    XFAIL="--xfail-list $INSTALL/$DEQP_EXPECTED_FAILS"
 fi
 
 set +e
@@ -83,7 +83,7 @@ run_cts() {
         --deqp $deqp \
         --output $output \
         --caselist $caselist \
-        --exclude-list $ARTIFACTS/$DEQP_SKIPS \
+        --exclude-list $INSTALL/$DEQP_SKIPS \
         $XFAIL \
         $JOB \
        --allow-flakes true \
index 618c2aa5b72c31e4ce404e4c0fade79b93636290..b2cd2f56e4ba95749c1a62dff8d75c56c1fcfe37 100755 (executable)
@@ -7,10 +7,10 @@ if [ -z "$VK_DRIVER" ]; then
    exit 1
 fi
 
-ARTIFACTS=`pwd`/artifacts
+INSTALL=`pwd`/install
 
 # Set up the driver environment.
 export LD_LIBRARY_PATH=`pwd`/install/lib/
 export VK_ICD_FILENAMES=`pwd`/install/share/vulkan/icd.d/"$VK_DRIVER"_icd.x86_64.json
 
-"$ARTIFACTS/fossils/fossils.sh" "$ARTIFACTS/fossils.yml"
+"$INSTALL/fossils/fossils.sh" "$INSTALL/fossils.yml"
index 3cd217291d49c442893500199d485706978f4db2..e7d980ec0ccbcaaf447a70179c46747ec689e440 100644 (file)
@@ -83,6 +83,9 @@ actions:
           - export {{ env_vars }}
 {% endif %}
 
+          # deqp-runner.sh assumes some stuff is in pwd
+          - cd /
+
           - export DEQP_NO_SAVE_RESULTS=1
           - 'export DEQP_RUNNER_OPTIONS="--compact-display false --shuffle false"'
           - export DEQP_EXPECTED_FAILS=deqp-{{ gpu_version }}-fails.txt
@@ -90,15 +93,7 @@ actions:
           - export DEQP_VER={{ deqp_version }}
           - export LIBGL_DRIVERS_PATH=`pwd`/install/lib/dri
 
-          # Put stuff where the runner script expects it
-          - mkdir artifacts
-          - mkdir results
-          - mkdir -p install/lib
-          - cp /deqp/$DEQP_EXPECTED_FAILS artifacts/.
-          - cp /deqp/$DEQP_SKIPS artifacts/.
-          - mv /mesa/lib/* install/lib/.
-
-          - "if sh /deqp/deqp-runner.sh; then
+          - "if sh /install/deqp-runner.sh; then
                   echo 'deqp: pass';
              else
                   echo 'deqp: fail';
index 9b40e99738880c4f6ce0cd09555c2218e4262924..e834cb4e9786f49bc2efa52404d4bb230c0bb9a3 100755 (executable)
@@ -3,7 +3,7 @@
 set -e
 set -o xtrace
 
-VERSION=`cat artifacts/VERSION`
+VERSION=`cat install/VERSION`
 
 cd /piglit
 
@@ -15,7 +15,7 @@ xvfb-run --server-args="-noreset" sh -c \
 
 PIGLIT_RESULTS=${PIGLIT_RESULTS:-$PIGLIT_PROFILES}
 mkdir -p .gitlab-ci/piglit
-cp $OLDPWD/artifacts/piglit/$PIGLIT_RESULTS.txt .gitlab-ci/piglit/$PIGLIT_RESULTS.txt.baseline
+cp $OLDPWD/install/piglit/$PIGLIT_RESULTS.txt .gitlab-ci/piglit/$PIGLIT_RESULTS.txt.baseline
 ./piglit summary console $OLDPWD/results | head -n -1 | grep -v ": pass" >.gitlab-ci/piglit/$PIGLIT_RESULTS.txt
 
 if diff -q .gitlab-ci/piglit/$PIGLIT_RESULTS.txt{.baseline,}; then
index d1993e0c3dbcc41cb666ffa2ffcef37e6c337b1d..65830d12773a5995fa0f963a4822c2fb8d862ac1 100755 (executable)
@@ -22,20 +22,23 @@ find install -name \*.so -exec $STRIP {} \;
 
 # Test runs don't pull down the git tree, so put the dEQP helper
 # script and associated bits there.
-mkdir -p artifacts/
-cp VERSION artifacts/
-cp -Rp .gitlab-ci/deqp* artifacts/
-cp -Rp .gitlab-ci/piglit artifacts/
-cp -Rp .gitlab-ci/traces.yml artifacts/
-cp -Rp .gitlab-ci/tracie artifacts/
-cp -Rp .gitlab-ci/tracie-runner-gl.sh artifacts/
-cp -Rp .gitlab-ci/tracie-runner-vk.sh artifacts/
-cp -Rp .gitlab-ci/fossils.yml artifacts/
-cp -Rp .gitlab-ci/fossils artifacts/
-cp -Rp .gitlab-ci/fossilize-runner.sh artifacts/
+cp VERSION install/
+cp -Rp .gitlab-ci/deqp* install/
+cp -Rp .gitlab-ci/piglit install/
+cp -Rp .gitlab-ci/traces.yml install/
+cp -Rp .gitlab-ci/tracie install/
+cp -Rp .gitlab-ci/tracie-runner-gl.sh install/
+cp -Rp .gitlab-ci/tracie-runner-vk.sh install/
+cp -Rp .gitlab-ci/fossils.yml install/
+cp -Rp .gitlab-ci/fossils install/
+cp -Rp .gitlab-ci/fossilize-runner.sh install/
+cp -Rp .gitlab-ci/deqp-runner.sh install/
+cp -Rp .gitlab-ci/deqp-*-fails.txt install/
+cp -Rp .gitlab-ci/deqp-*-skips.txt install/
 
 # Tar up the install dir so that symlinks and hardlinks aren't each
 # packed separately in the zip file.
+mkdir -p artifacts/
 tar -cf artifacts/install.tar install
 
 # If the container has LAVA stuff, prepare the artifacts for LAVA jobs
@@ -45,13 +48,8 @@ if [ -d /lava-files ]; then
     cp /lava-files/*.dtb artifacts/.
 
     # Pack ramdisk for LAVA
-    mkdir -p /lava-files/rootfs-${CROSS:-arm64}/mesa
-    cp -a install/* /lava-files/rootfs-${CROSS:-arm64}/mesa/.
-
-    cp .gitlab-ci/deqp-runner.sh /lava-files/rootfs-${CROSS:-arm64}/deqp/.
-    cp .gitlab-ci/deqp-*-fails.txt /lava-files/rootfs-${CROSS:-arm64}/deqp/.
-    cp .gitlab-ci/deqp-*-skips.txt /lava-files/rootfs-${CROSS:-arm64}/deqp/.
-    find /lava-files/rootfs-${CROSS:-arm64}/ -type f -printf "%s\t%i\t%p\n" | sort -n | tail -100
+    mkdir -p /lava-files/rootfs-${CROSS:-arm64}/install
+    cp -a install/* /lava-files/rootfs-${CROSS:-arm64}/install/.
 
     pushd /lava-files/rootfs-${CROSS:-arm64}/
     find -H  |  cpio -H newc -o | gzip -c - > $CI_PROJECT_DIR/artifacts/lava-rootfs-${CROSS:-arm64}.cpio.gz
index cb7113cfcbdfa9b9e39f8493544695bb63ccb254..f65d7abba3e081b4ddfee56018191683341bbc40 100755 (executable)
@@ -2,7 +2,7 @@
 
 set -ex
 
-ARTIFACTS="$(pwd)/artifacts"
+INSTALL="$(pwd)/install"
 
 # Set up the driver environment.
 export LD_LIBRARY_PATH="$LD_LIBRARY_PATH:$(pwd)/install/lib/"
@@ -23,6 +23,6 @@ export DISPLAY=
 export WAFFLE_PLATFORM=surfaceless_egl
 
 # Perform a self-test to ensure tracie is working properly.
-"$ARTIFACTS/tracie/tests/test.sh"
+"$INSTALL/tracie/tests/test.sh"
 
-python3 $ARTIFACTS/tracie/tracie.py --file $ARTIFACTS/traces.yml --device-name $DEVICE_NAME
+python3 $INSTALL/tracie/tracie.py --file $INSTALL/traces.yml --device-name $DEVICE_NAME
index e3f8c5d5319b197658fd78d9c575aff2129bfc78..da03967d767a9b4b21c8c52748dcaafc4435f2bd 100755 (executable)
@@ -2,7 +2,7 @@
 
 set -ex
 
-ARTIFACTS="$(pwd)/artifacts"
+INSTALL="$(pwd)/install"
 
 # Set the Vulkan driver to use.
 export VK_ICD_FILENAMES="$(pwd)/install/share/vulkan/icd.d/${VK_DRIVER}_icd.x86_64.json"
@@ -12,7 +12,7 @@ export VK_LAYER_PATH="$VK_LAYER_PATH:/VulkanTools/build/etc/vulkan/explicit_laye
 export LD_LIBRARY_PATH="$LD_LIBRARY_PATH:/VulkanTools/build/lib"
 
 # Perform a self-test to ensure tracie is working properly.
-"$ARTIFACTS/tracie/tests/test.sh"
+"$INSTALL/tracie/tests/test.sh"
 
 ret=0
 
@@ -22,6 +22,6 @@ ret=0
 # file:
 # https://docs.gitlab.com/runner/configuration/advanced-configuration.html#the-runners-section
 PATH="/gfxreconstruct/build/bin:$PATH" \
-    python3 $ARTIFACTS/tracie/tracie.py --file $ARTIFACTS/traces.yml --device-name $DEVICE_NAME
+    python3 $INSTALL/tracie/tracie.py --file $INSTALL/traces.yml --device-name $DEVICE_NAME
 
 exit $ret