diff options
author | Phillip Smyth <phillip.smyth@codethink.co.uk> | 2018-08-30 15:47:06 +0000 |
---|---|---|
committer | Phillip Smyth <phillip.smyth@codethink.co.uk> | 2018-08-30 15:47:06 +0000 |
commit | 8cd719eb91acb2c240b459214947a5dd77204106 (patch) | |
tree | 9c1899e054d06da2b29049d79b035940ab855767 | |
parent | bb6aa5a58cade9d2ad26018acdc02093b7a886c6 (diff) | |
parent | 680e4fe1d3d3b48a7f628d980cceacf52c4795df (diff) | |
download | buildstream-8cd719eb91acb2c240b459214947a5dd77204106.tar.gz |
Merge branch 'bzr_fix' into 'master'
Replacing string 'bzr' with value from host tools
See merge request BuildStream/buildstream!764
-rw-r--r-- | tests/testutils/repo/bzr.py | 12 |
1 files changed, 7 insertions, 5 deletions
diff --git a/tests/testutils/repo/bzr.py b/tests/testutils/repo/bzr.py index 8b0b6c295..e8abdfee0 100644 --- a/tests/testutils/repo/bzr.py +++ b/tests/testutils/repo/bzr.py @@ -2,6 +2,7 @@ import os import subprocess import pytest +from buildstream import utils from .repo import Repo from ..site import HAVE_BZR @@ -16,15 +17,16 @@ class Bzr(Repo): if not HAVE_BZR: pytest.skip("bzr is not available") super(Bzr, self).__init__(directory, subdir) + self.bzr = utils.get_host_tool('bzr') def create(self, directory): branch_dir = os.path.join(self.repo, 'trunk') - subprocess.call(['bzr', 'init-repo', self.repo], env=BZR_ENV) - subprocess.call(['bzr', 'init', branch_dir], env=BZR_ENV) + subprocess.call([self.bzr, 'init-repo', self.repo], env=BZR_ENV) + subprocess.call([self.bzr, 'init', branch_dir], env=BZR_ENV) self.copy_directory(directory, branch_dir) - subprocess.call(['bzr', 'add', '.'], env=BZR_ENV, cwd=branch_dir) - subprocess.call(['bzr', 'commit', '--message="Initial commit"'], + subprocess.call([self.bzr, 'add', '.'], env=BZR_ENV, cwd=branch_dir) + subprocess.call([self.bzr, 'commit', '--message="Initial commit"'], env=BZR_ENV, cwd=branch_dir) return self.latest_commit() @@ -42,7 +44,7 @@ class Bzr(Repo): def latest_commit(self): output = subprocess.check_output([ - 'bzr', 'version-info', + self.bzr, 'version-info', '--custom', '--template={revno}', os.path.join(self.repo, 'trunk') ], env=BZR_ENV) |