Make %check section compatible with RHEL

On RHEL, windows.img is created zero sized.  Change the test so it
checks the image size is > 0 before running the test.
This commit is contained in:
Richard W.M. Jones 2023-01-10 15:41:07 +00:00
parent cf3e580f28
commit dcd10a79fd

View File

@ -268,10 +268,12 @@ export LIBGUESTFS_TRACE=1
# The built in tests take a very long time to run under TCG (in Koji), # The built in tests take a very long time to run under TCG (in Koji),
# so just perform a very simple conversion to check things are # so just perform a very simple conversion to check things are
# working. # working.
make -C test-data/phony-guests windows.img for f in windows.img fedora.img; do
./run virt-v2v -v -x -i disk test-data/phony-guests/windows.img -o null make -C test-data/phony-guests $f
make -C test-data/phony-guests fedora.img if -s test-data/phony-guests/$f; then
./run virt-v2v -v -x -i disk test-data/phony-guests/fedora.img -o null ./run virt-v2v -v -x -i disk test-data/phony-guests/$f -o null
fi
done
%endif %endif