[Pkg-libvirt-commits] [libguestfs] 133/179: tests: isolate iso_system_id baseline string
Hilko Bengen
bengen at moszumanska.debian.org
Fri Oct 31 19:08:47 UTC 2014
This is an automated email from the git hooks/post-receive script.
bengen pushed a commit to branch experimental
in repository libguestfs.
commit abd93812ca0cd845b4e1133126391b429ec944ce
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.
---
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