diff mbox

[Branch,~linaro-validation/lava-dispatcher/trunk] Rev 462: replicate BZR_HOME=/dev/null hack for getting a testdef from bzr

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

Commit Message

Michael-Doyle Hudson Nov. 21, 2012, 10:57 p.m. UTC
------------------------------------------------------------
revno: 462
committer: Michael Hudson-Doyle <michael.hudson@linaro.org>
branch nick: trunk
timestamp: Thu 2012-11-22 11:55:57 +1300
message:
  replicate BZR_HOME=/dev/null hack for getting a testdef from bzr
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-11-21 13:02:46 +0000
+++ lava_dispatcher/actions/lava_test_shell.py	2012-11-21 22:55:57 +0000
@@ -272,12 +272,13 @@ 
             if revision is None:
                 revision = '-1'
 
-            subprocess.check_call(['bzr',
-                                   'branch',
-                                   '-r',
-                                   revision,
-                                   testdef_repo,
-                                   bzrdir])
+            # Pass non-existent BZR_HOME value, or otherwise bzr may
+            # have non-reproducible behavior because it may rely on
+            # bzr whoami value, presence of ssh keys, etc.
+            subprocess.check_call(
+                ['bzr', 'branch', '-r', revision, testdef_repo, bzrdir],
+                env={'BZR_HOME': '/dev/null', 'BZR_LOG': '/dev/null'})
+
             return bzrdir
         except Exception as e:
             logging.error('Unable to get test definition from bzr\n' + str(e))