diff mbox

[Branch,~linaro-validation/lava-dispatcher/trunk] Rev 481: make context available to signal handlers

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

Commit Message

Andy Doan Dec. 3, 2012, 9:20 p.m. UTC
Merge authors:
  Andy Doan (doanac)
Related merge proposals:
  https://code.launchpad.net/~doanac/lava-dispatcher/signal-handlers-context/+merge/137269
  proposed by: Andy Doan (doanac)
------------------------------------------------------------
revno: 481 [merge]
committer: Andy Doan <andy.doan@linaro.org>
branch nick: lava-dispatcher
timestamp: Mon 2012-12-03 15:19:30 -0600
message:
  make context available to signal handlers
modified:
  lava_dispatcher/actions/lava_test_shell.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_shell.py'
--- lava_dispatcher/actions/lava_test_shell.py	2012-12-03 19:38:41 +0000
+++ lava_dispatcher/actions/lava_test_shell.py	2012-12-03 21:19:30 +0000
@@ -197,6 +197,7 @@ 
 Target.android_deployment_data['lava_test_configure_startup'] = \
         _configure_android_startup
 
+
 def _get_testdef_git_repo(testdef_repo, tmpdir, revision):
     cwd = os.getcwd()
     gitdir = os.path.join(tmpdir, 'gittestrepo')
@@ -255,7 +256,7 @@ 
 
         idx = len(self.testdefs)
 
-        self._append_testdef(URLTestDefinition(idx, testdef))
+        self._append_testdef(URLTestDefinition(self.context, idx, testdef))
 
     def load_from_repo(self, testdef_repo):
         tmpdir = utils.mkdtemp(self.tmpbase)
@@ -277,7 +278,8 @@ 
             testdef = yaml.load(f)
 
         idx = len(self.testdefs)
-        self._append_testdef(RepoTestDefinition(idx, testdef, repo, info))
+        self._append_testdef(
+            RepoTestDefinition(self.context, idx, testdef, repo, info))
 
 
 def _bzr_info(url, bzrdir, name):
@@ -316,7 +318,8 @@ 
     A test definition that was loaded from a URL.
     """
 
-    def __init__(self, idx, testdef):
+    def __init__(self, context, idx, testdef):
+        self.context = context
         self.testdef = testdef
         self.idx = idx
         self.test_run_id = '%s_%s' % (idx, self.testdef['metadata']['name'])
@@ -435,8 +438,8 @@ 
     the device.
     """
 
-    def __init__(self, idx, testdef, repo, info):
-        URLTestDefinition.__init__(self, idx, testdef)
+    def __init__(self, context, idx, testdef, repo, info):
+        URLTestDefinition.__init__(self, context, idx, testdef)
         self.repo = repo
         self._sw_sources.append(info)