[Pkg-libvirt-commits] [libguestfs] 33/61: tests: isolate iso_system_id baseline string

Hilko Bengen bengen at moszumanska.debian.org
Fri Oct 31 19:09:38 UTC 2014


This is an automated email from the git hooks/post-receive script.

bengen pushed a commit to annotated tag debian/1%1.28.2-1
in repository libguestfs.

commit 641ff7c16524aab3a8e16742b7da40792b7382a8
Author: Pino Toscano <ptoscano at redhat.com>
Date:   Mon Oct 20 10:39:03 2014 +0200

    tests: isolate iso_system_id baseline string
    
    Move the reference iso_system_id for the isoinfo_device test to an own
    define for Linux, with an error for unknown OSes.
    
    (cherry picked from commit abd93812ca0cd845b4e1133126391b429ec944ce)
---
 generator/actions.ml     | 2 +-
 generator/tests_c_api.ml | 6 ++++++
 2 files changed, 7 insertions(+), 1 deletion(-)

diff --git a/generator/actions.ml b/generator/actions.ml
index 4cfba0d..955f638 100644
--- a/generator/actions.ml
+++ b/generator/actions.ml
@@ -9883,7 +9883,7 @@ this will create the largest possible LV." };
     tests = [
       InitNone, Always, TestResult (
         [["isoinfo_device"; "/dev/sdd"]],
-        "STREQ (ret->iso_system_id, \"LINUX\") && "^
+        "STREQ (ret->iso_system_id, GUESTFS_ISO_SYSTEM_ID) && "^
           "STREQ (ret->iso_volume_id, \"CDROM\") && "^
           "STREQ (ret->iso_volume_set_id, \"\") && "^
           "ret->iso_volume_set_size == 1 && "^
diff --git a/generator/tests_c_api.ml b/generator/tests_c_api.ml
index 88aa07e..43a99e3 100644
--- a/generator/tests_c_api.ml
+++ b/generator/tests_c_api.ml
@@ -47,6 +47,12 @@ let rec generate_c_api_tests () =
 
 #include \"tests.h\"
 
+#ifdef __linux__
+#define GUESTFS_ISO_SYSTEM_ID \"LINUX\"
+#else
+#error Missing GUESTFS_ISO_SYSTEM_ID for the current OS
+#endif
+
 ";
 
   (* Generate a list of commands which are not tested anywhere. *)

-- 
Alioth's /usr/local/bin/git-commit-notice on /srv/git.debian.org/git/pkg-libvirt/libguestfs.git



More information about the Pkg-libvirt-commits mailing list