gitlab-ci: attach the Fossilize log file as artifact on failure
authorSamuel Pitoiset <samuel.pitoiset@gmail.com>
Thu, 25 Jun 2020 09:21:12 +0000 (11:21 +0200)
committerMarge Bot <eric+marge@anholt.net>
Fri, 26 Jun 2020 06:45:23 +0000 (06:45 +0000)
It might be help.

Signed-off-by: Samuel Pitoiset <samuel.pitoiset@gmail.com>
Reviewed-by: Eric Anholt <eric@anholt.net>
Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/5627>

.gitlab-ci.yml
.gitlab-ci/fossilize-runner.sh
.gitlab-ci/fossils/fossils.sh

index daab01c86bb2e059f7f4769b820b48ffd1c73b7a..92e006b324d7e3f5f4470ee5d47f06d841547dc1 100644 (file)
@@ -802,6 +802,11 @@ piglit-quick_shader:
   extends: .test-vk
   script:
     - ./install/fossilize-runner.sh
+  artifacts:
+    when: on_failure
+    name: "mesa_${CI_JOB_NAME}"
+    paths:
+      - results/
 
 llvmpipe-gles2:
   variables:
index b2cd2f56e4ba95749c1a62dff8d75c56c1fcfe37..c3528ac53adcfd626d13467708b7aebb1bdf67bf 100755 (executable)
@@ -13,4 +13,8 @@ INSTALL=`pwd`/install
 export LD_LIBRARY_PATH=`pwd`/install/lib/
 export VK_ICD_FILENAMES=`pwd`/install/share/vulkan/icd.d/"$VK_DRIVER"_icd.x86_64.json
 
-"$INSTALL/fossils/fossils.sh" "$INSTALL/fossils.yml"
+# To store Fossilize logs on failure.
+RESULTS=`pwd`/results
+mkdir -p results
+
+"$INSTALL/fossils/fossils.sh" "$INSTALL/fossils.yml" "$RESULTS"
index 60394f7b2dcfa1f1416c4019e26f37dfed274128..0dffa4776f7c851b1cc670aa8375e3af1c532d7d 100755 (executable)
@@ -2,6 +2,7 @@
 
 FOSSILS_SCRIPT_DIR="$(dirname "$(readlink -f "$0")")"
 FOSSILS_YAML="$(readlink -f "$1")"
+FOSSILS_RESULTS="$2"
 
 clone_fossils_db()
 {
@@ -64,10 +65,10 @@ create_clean_git
 for fossil in $(query_fossils_yaml fossils)
 do
     fetch_fossil "$fossil" || exit $?
-    fossilize-replay --num-threads 4 $fossil 1>&2 2> fossil_replay.txt
+    fossilize-replay --num-threads 4 $fossil 1>&2 2> $FOSSILS_RESULTS/fossil_replay.txt
     if [ $? != 0 ]; then
         echo "Replay of $fossil failed"
-        grep "pipeline crashed or hung" fossil_replay.txt
+        grep "pipeline crashed or hung" $FOSSILS_RESULTS/fossil_replay.txt
         exit 1
     fi
     rm $fossil