[gnome-boxes] tests: Restore VMs when scenario are skipped



commit bac6c26ad37464c891042f387f8b866ecfe084d5
Author: Vladimir Benes <benesv email cz>
Date:   Wed Feb 18 20:39:01 2015 +0100

    tests: Restore VMs when scenario are skipped
    
    Ensure machines are now restored even after skipped scenarios.
    
    https://bugzilla.gnome.org/show_bug.cgi?id=744682

 tests/environment.py |    3 ++-
 1 files changed, 2 insertions(+), 1 deletions(-)
---
diff --git a/tests/environment.py b/tests/environment.py
index 0051d41..e2ef01e 100644
--- a/tests/environment.py
+++ b/tests/environment.py
@@ -169,6 +169,7 @@ def before_scenario(context, scenario):
 def before_tag(context, tag):
     if 'vnc' in tag:
         if not os.path.isfile('/usr/bin/vncserver'):
+            do_restore()
             sys.exit(77)
 
         os.system('vncserver -SecurityTypes None > /dev/null 2>&1')
@@ -178,7 +179,7 @@ def before_tag(context, tag):
         if call('pkcheck -a org.libvirt.unix.manage --process $BASHPID', shell=True) != 0 \
             or not os.path.isfile('/usr/bin/virt-install') \
             or call('systemctl status libvirtd  > /dev/null 2>&1', shell=True) != 0:
-
+            do_restore()
             sys.exit(77)
 
     if 'help' in tag:


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