From 7e01f58f73fef860d26e96ecf17af746c2a61c1c Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?Miro=20Hron=C4=8Dok?= Date: Wed, 18 Sep 2019 17:09:03 +0200 Subject: [PATCH] Fedora CI: Publish the mock logs even when it fails --- tests/mocktest.sh | 7 +++++-- 1 file changed, 5 insertions(+), 2 deletions(-) diff --git a/tests/mocktest.sh b/tests/mocktest.sh index 5c65abc..5af4d83 100755 --- a/tests/mocktest.sh +++ b/tests/mocktest.sh @@ -23,14 +23,17 @@ spectool -g -R ${1}.spec rpmbuild -bs ${1}.spec # build the SRPM in mock +res=0 mock -r $config --enablerepo=local init -mock -r $config --enablerepo=local ~/rpmbuild/SRPMS/${1}-*.src.rpm +mock -r $config --enablerepo=local ~/rpmbuild/SRPMS/${1}-*.src.rpm || res=$? # move the results to the artifacts directory, so we can examine them artifacts=${TEST_ARTIFACTS:-/tmp/artifacts} pushd /var/lib/mock/fedora-rawhide-x86_64/result -mv *.rpm ${artifacts}/ +mv *.rpm ${artifacts}/ || : for log in *.log; do mv ${log} ${artifacts}/${1}-${log} done popd + +exit $res