[PATCH] spec: Really skip tests that don't work in mock build root

[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

 



Two of the tests we want to skip are C tests and since we moved
compiling tests to make check phase, replacing compiled binary with a
no-op shell script before running make check doesn't really work for
them. We need to replace the source of such tests.
---
 libvirt.spec.in |    8 ++++++--
 1 files changed, 6 insertions(+), 2 deletions(-)

diff --git a/libvirt.spec.in b/libvirt.spec.in
index fd99a54..3889f5d 100644
--- a/libvirt.spec.in
+++ b/libvirt.spec.in
@@ -700,8 +700,12 @@ cd tests
 for i in nodeinfotest daemon-conf seclabeltest
 do
   rm -f $i
-  printf "#!/bin/sh\nexit 0\n" > $i
-  chmod +x $i
+  if [ -f $i.c ]; then
+    echo 'int main(void) { return 0; }' > $i.c
+  else
+    printf "#!/bin/sh\nexit 0\n" > $i
+    chmod +x $i
+  fi
 done
 make check
 
-- 
1.7.3.4

--
libvir-list mailing list
libvir-list@xxxxxxxxxx
https://www.redhat.com/mailman/listinfo/libvir-list


[Index of Archives]     [Virt Tools]     [Libvirt Users]     [Lib OS Info]     [Fedora Users]     [Fedora Desktop]     [Fedora SELinux]     [Big List of Linux Books]     [Yosemite News]     [KDE Users]     [Fedora Tools]