[sandbox PATCH v2 18/19] Add testcase for custom environment variables

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

 



"make check" now includes testcase for environment variables
---
 libvirt-sandbox/tests/test-config.c | 10 ++++++++++
 1 file changed, 10 insertions(+)

diff --git a/libvirt-sandbox/tests/test-config.c b/libvirt-sandbox/tests/test-config.c
index da05187..ac10bab 100644
--- a/libvirt-sandbox/tests/test-config.c
+++ b/libvirt-sandbox/tests/test-config.c
@@ -58,6 +58,13 @@ int main(int argc, char **argv)
         "host-bind:/tmp=",
         NULL
     };
+
+     const gchar *envs[] = {
+        "key1=val1",
+        "key2=val2",
+        NULL
+    };
+
     const gchar *disks[] = {
         "file:dbdata=/tmp/img.blah,format=qcow2",
         "file:cache=/tmp/img.qcow2",
@@ -103,6 +110,9 @@ int main(int argc, char **argv)
     if (!gvir_sandbox_config_add_mount_strv(cfg1, (gchar**)mounts, &err))
         goto cleanup;
 
+    if (!gvir_sandbox_config_add_env_strv(cfg1, (gchar**)envs, &err))
+        goto cleanup;
+
     if (!gvir_sandbox_config_add_disk_strv(cfg1, (gchar**)disks, &err))
         goto cleanup;
 
-- 
2.1.0

--
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]