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

Jiri Denemark jdenemar at redhat.com
Thu Dec 23 19:40:04 UTC 2010


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




More information about the libvir-list mailing list