[gnome-boxes] tests: Add "Install TC Linux package" step



commit 60a7b34e21df220d366edbc0d1bebebc62bf2e63
Author: Vladimir Benes <benesv email cz>
Date:   Tue Jun 2 16:18:46 2015 +0200

    tests: Add "Install TC Linux package" step
    
    Add a step to install packages in TC Linux guests.
    
    https://bugzilla.gnome.org/show_bug.cgi?id=744852

 tests/steps/general.py |   10 ++++++++++
 1 files changed, 10 insertions(+), 0 deletions(-)
---
diff --git a/tests/steps/general.py b/tests/steps/general.py
index 956e422..e5e075f 100644
--- a/tests/steps/general.py
+++ b/tests/steps/general.py
@@ -69,6 +69,16 @@ def help_shown(context):
     yelp = root.application('yelp')
     assert yelp.child('Boxes') != None, "Yelp wasn't opened"
 
+ step('Install TC Linux package "{pkg}" and wait "{time}" seconds')
+def install_tc_linux_package(context, pkg, time):
+    if "/" in pkg:
+        call("xdotool type --delay 150 'wget %s\n'" %pkg, shell=True)
+        call("xdotool type --delay 150 'tce-load -i %s\n'" %pkg.split('/')[-1], shell=True)
+    else:
+        typeText('tce-load -wi %s\n' %pkg)
+
+    sleep(int(time))
+
 @step('No box is visible')
 def no_box_sign(context):
     assert context.app.child('Just hit the New button to create your first one.') != None


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