ci: integration: Create the avocado logs artifact dir conditionally

Don't create an avocado directory in the resulting log artifacts
if Avocado didn't even run (e.g. libvirt errored out on service
restart).

Signed-off-by: Erik Skultety <eskultet@redhat.com>
Reviewed-by: Michal Privoznik <mprivozn@redhat.com>
This commit is contained in:
Erik Skultety 2022-10-14 12:24:59 +02:00
parent 5243dcea65
commit 2b26127397

View File

@ -57,7 +57,7 @@
.collect-logs: &collect-logs
- set +e
- mkdir logs
- test -d "$SCRATCH_DIR"/avocado && sudo mv "$SCRATCH_DIR"/avocado/latest/test-results logs/avocado;
- 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
- sudo chown -R $(whoami):$(whoami) logs