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

[Xen-devel] [PATCH OSSTEST v4 1/2] TestSupport: introduce guest_var_boolean



Signed-off-by: Wei Liu <wei.liu2@xxxxxxxxxx>
---
 Osstest/TestSupport.pm | 7 ++++++-
 1 file changed, 6 insertions(+), 1 deletion(-)

diff --git a/Osstest/TestSupport.pm b/Osstest/TestSupport.pm
index 1f3bab2..853631c 100644
--- a/Osstest/TestSupport.pm
+++ b/Osstest/TestSupport.pm
@@ -90,7 +90,7 @@ BEGIN {
                       target_kernkind_check target_kernkind_console_inittab
                       target_var target_var_prefix
                       selectguest prepareguest more_prepareguest_hvm
-                      guest_var guest_var_commalist
+                      guest_var guest_var_commalist guest_var_boolean
                       prepareguest_part_lvmdisk prepareguest_part_xencfg
                       guest_umount_lv guest_await guest_await_dhcp_tcp
                       guest_checkrunning guest_check_ip guest_find_ether
@@ -1505,6 +1505,11 @@ sub guest_var ($$$) {
     return $default;
 }
 
+sub guest_var_boolean ($$) {
+    my ($gho, $runvartail) = @_;
+    return guest_var($gho, $runvartail, 'false') =~ m/true/;
+}
+
 sub guest_var_commalist ($$) {
     my ($gho,$runvartail) = @_;
     return split /\,/, guest_var($gho,$runvartail,'');
-- 
1.9.1


_______________________________________________
Xen-devel mailing list
Xen-devel@xxxxxxxxxxxxx
http://lists.xen.org/xen-devel


 


Rackspace

Lists.xenproject.org is hosted with RackSpace, monitoring our
servers 24x7x365 and backed by RackSpace's Fanatical Support®.