diff mbox

[Branch,~linaro-validation/lava-dispatcher/trunk] Rev 242: pass --force-yes to apt-get & call lava-test reset after installing it

Message ID 20120309005910.27520.58137.launchpad@ackee.canonical.com
State Accepted
Headers show

Commit Message

Michael-Doyle Hudson March 9, 2012, 12:59 a.m. UTC
Merge authors:
  Le Chi Thu le.chi.thu@linaro.org <le.chi.thu@linaro.org>
Related merge proposals:
  https://code.launchpad.net/~le-chi-thu/lava-dispatcher/lava-test-deployment-fixes/+merge/96670
  proposed by: Le Chi Thu (le-chi-thu)
  review: Approve - Michael Hudson-Doyle (mwhudson)
------------------------------------------------------------
revno: 242 [merge]
committer: Michael Hudson-Doyle <michael.hudson@linaro.org>
branch nick: trunk
timestamp: Fri 2012-03-09 13:57:29 +1300
message:
  pass --force-yes to apt-get & call lava-test reset after installing it
modified:
  lava_dispatcher/actions/lava-test.py


--
lp:lava-dispatcher
https://code.launchpad.net/~linaro-validation/lava-dispatcher/trunk

You are subscribed to branch lp:lava-dispatcher.
To unsubscribe from this branch go to https://code.launchpad.net/~linaro-validation/lava-dispatcher/trunk/+edit-subscription
diff mbox

Patch

=== modified file 'lava_dispatcher/actions/lava-test.py'
--- lava_dispatcher/actions/lava-test.py	2012-02-24 00:34:24 +0000
+++ lava_dispatcher/actions/lava-test.py	2012-03-08 21:52:44 +0000
@@ -31,10 +31,10 @@ 
     #install bazaar in tester image
     session.run('apt-get update')
     #Install necessary packages for build lava-test
-    cmd = ('apt-get -y install '
+    cmd = ('apt-get -y --force-yes install '
            'bzr usbutils python-apt python-setuptools python-simplejson lsb-release')
     session.run(cmd, timeout=2400)
-    session.run("apt-get -y install python-pip")
+    session.run("apt-get -y --force-yes install python-pip")
 
     dispatcher_config = client.context.config
     lava_test_url = dispatcher_config.get("LAVA_TEST_URL")
@@ -42,10 +42,10 @@ 
     session.run('pip install -e ' + lava_test_url)
 
     #Test if lava-test installed
-    rc = session.run('lava-test help', timeout=60)
-    if rc != 0:
-        raise CriticalError("lava-test deployment failed")
+    session.run('which lava-test', timeout=60)
 
+    # cleanup the lava-test - old results, cached files...
+    session.run('lava-test reset', timeout=60)
 
 class cmd_lava_test_run(BaseAction):