]> xenbits.xensource.com Git - libvirt.git/commitdiff
ci: integration: Rename all Avocado standard stream log files to *.log
authorErik Skultety <eskultet@redhat.com>
Tue, 22 Mar 2022 11:31:49 +0000 (12:31 +0100)
committerErik Skultety <eskultet@redhat.com>
Tue, 22 Mar 2022 16:11:51 +0000 (17:11 +0100)
By default, stdout/stderr Avocado test log files do not have any file
extension which confuses GitLab's web UI to mangle the MIME type for
these and so the browser will never offer the option to open such file
from in a text editor rather than dowloading it.
Since GitLab sets a proper MIME for .txt and .log file extensions,
rename all Avocado log files without an extension to *.log . This pairs
nicely with the coredumpctl info file which we already name as
'coredumpctl.txt' because of this.

Signed-off-by: Erik Skultety <eskultet@redhat.com>
Reviewed-by: Daniel P. Berrangé <berrange@redhat.com>
ci/integration.yml

index 519494cfd584fc40d5bbe2c75b753e7e581d3da6..2808e829efb7560d52b85c9cc05e1cfe20184884 100644 (file)
@@ -36,6 +36,9 @@
     - sudo coredumpctl info --no-pager > logs/coredumpctl.txt
     - sudo mv /var/log/libvirt logs/libvirt
     - sudo chown -R $(whoami):$(whoami) logs
+      # rename all Avocado stderr/stdout logs to *.log so that GitLab's web UI doesn't mangle the MIME type
+    - find logs/avocado/ -type f ! -name "*.log" -exec
+        sh -c 'DIR=$(dirname {}); NAME=$(basename {}); mv $DIR/$NAME{,.log}' \;
   variables:
     SCRATCH_DIR: "/tmp/scratch"
   artifacts: