mirror of
https://github.com/libvirt/libvirt.git
synced 2025-02-25 18:55:26 -06:00
ci: integration: Bundle only failed Avocado test results
Latest versions of Avocado create 'by-status' symlink shortcuts to test
results, IOW:
# this is the main test results directory containing all data
$ ls <path>/avocado/job-results/latest/test-results/
01-scripts_networks_050-transient-lifecycle.t
02-scripts_networks_051-transient-autostart.t
...
22-scripts_networks_400-guest-bandwidth.t
by_status/
# list only the failed tests
$ ls -l <path>/avocado/job-results/latest/test-results/by-status/FAIL
19-scripts_networks_360-guest-network-vepa.t ->
<path>/avocado/job-results/latest/test-results/19-scripts_networks_360-guest-network-vepa.t
Therefore, let's bundle only the failed ones, it's going to make the
log artifacts more obvious when looking for libvirt errors.
Signed-off-by: Erik Skultety <eskultet@redhat.com>
Reviewed-by: Michal Privoznik <mprivozn@redhat.com>
This commit is contained in:
@@ -56,10 +56,16 @@
|
||||
|
||||
.collect-logs: &collect-logs
|
||||
- set +e
|
||||
- shopt -s nullglob
|
||||
- mkdir logs
|
||||
- test -d "$SCRATCH_DIR"/avocado && mkdir logs/avocado
|
||||
- sudo coredumpctl &>/dev/null && sudo coredumpctl info --no-pager > logs/coredumpctl.txt
|
||||
- sudo mv /var/log/libvirt logs/libvirt
|
||||
# filter only the failed tests, omitting successful job logs
|
||||
- for test_log in "$SCRATCH_DIR"/avocado/latest/test-results/by-status/{ERROR,FAIL}/*;
|
||||
do
|
||||
sudo mv "$(realpath $test_log)" logs/avocado;
|
||||
done;
|
||||
- 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
|
||||
|
||||
Reference in New Issue
Block a user