diff options
author | Tristan Van Berkom <tristan.van.berkom@gmail.com> | 2018-09-14 12:44:45 +0000 |
---|---|---|
committer | Tristan Van Berkom <tristan.van.berkom@gmail.com> | 2018-09-14 12:44:45 +0000 |
commit | ef846ced8135249a20237c9ec1a2eae5460f8282 (patch) | |
tree | e52c5dbfb947ddb5e4be1e5225b63e4189d9ca41 /tests/testutils/repo | |
parent | 32d0ce664093a3b5256b7af449a047cc4ffe0a87 (diff) | |
parent | 673f2372b38b017ed581b5100a9feffc29d66c41 (diff) | |
download | buildstream-ef846ced8135249a20237c9ec1a2eae5460f8282.tar.gz |
Merge branch 'tristan/fix-required-artifacts-1.2' into 'bst-1.2'
Don't delete required artifacts when tracking is enabled
See merge request BuildStream/buildstream!794
Diffstat (limited to 'tests/testutils/repo')
-rw-r--r-- | tests/testutils/repo/git.py | 7 |
1 files changed, 7 insertions, 0 deletions
diff --git a/tests/testutils/repo/git.py b/tests/testutils/repo/git.py index eea43d608..75624d597 100644 --- a/tests/testutils/repo/git.py +++ b/tests/testutils/repo/git.py @@ -46,6 +46,13 @@ class Git(Repo): ], env=GIT_ENV, cwd=self.repo) return self.latest_commit() + def modify_file(self, new_file, path): + shutil.copy(new_file, os.path.join(self.repo, path)) + subprocess.call([ + 'git', 'commit', path, '-m', 'Modified {}'.format(os.path.basename(path)) + ], env=GIT_ENV, cwd=self.repo) + return self.latest_commit() + def add_submodule(self, subdir, url=None, checkout=None): submodule = {} if checkout is not None: |