From dcd10a79fda9f52c09ce7ce7c11268d99e300953 Mon Sep 17 00:00:00 2001 From: "Richard W.M. Jones" Date: Tue, 10 Jan 2023 15:41:07 +0000 Subject: [PATCH] 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. --- virt-v2v.spec | 10 ++++++---- 1 file changed, 6 insertions(+), 4 deletions(-) diff --git a/virt-v2v.spec b/virt-v2v.spec index 246f084..08dfd85 100644 --- a/virt-v2v.spec +++ b/virt-v2v.spec @@ -268,10 +268,12 @@ export LIBGUESTFS_TRACE=1 # 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 # working. -make -C test-data/phony-guests windows.img -./run virt-v2v -v -x -i disk test-data/phony-guests/windows.img -o null -make -C test-data/phony-guests fedora.img -./run virt-v2v -v -x -i disk test-data/phony-guests/fedora.img -o null +for f in windows.img fedora.img; do + make -C test-data/phony-guests $f + if -s test-data/phony-guests/$f; then + ./run virt-v2v -v -x -i disk test-data/phony-guests/$f -o null + fi +done %endif