Chromium Code Reviews
chromiumcodereview-hr@appspot.gserviceaccount.com (chromiumcodereview-hr) | Please choose your nickname with Settings | Help | Chromium Project | Gerrit Changes | Sign out
(813)

Unified Diff: unittests/repo_test_util.py

Issue 2829203002: [autoroller] All commits in updates(), only roll interesting ones. (Closed)
Patch Set: windows fix Created 3 years, 8 months ago
Use n/p to move between diff chunks; N/P to move between comments. Draft comments are only viewable by you.
Jump to:
View side-by-side diff with in-line comments
Download patch
« no previous file with comments | « unittests/autoroll_test.py ('k') | no next file » | no next file with comments »
Expand Comments ('e') | Collapse Comments ('c') | Show Comments Hide Comments ('s')
Index: unittests/repo_test_util.py
diff --git a/unittests/repo_test_util.py b/unittests/repo_test_util.py
index 8908bca14b50128125594fd72c340ff15251252f..fc2b4f2f6cfc6a351f0f3fba0be1cdffe5a7ec1b 100644
--- a/unittests/repo_test_util.py
+++ b/unittests/repo_test_util.py
@@ -123,7 +123,9 @@ class RepoTest(unittest.TestCase):
self._recipe_tool,
os.path.join(repo_dir, 'infra', 'config', 'recipes.cfg')),
]))
- subprocess.check_output(['git', 'add', 'recipes.py'])
+ with open('some_file', 'w') as f:
+ print >> f, 'I\'m a file'
+ subprocess.check_output(['git', 'add', 'recipes.py', 'some_file'])
rev = self.update_recipes_cfg(name, spec)
return {
'name': name,
@@ -195,10 +197,11 @@ class RepoTest(unittest.TestCase):
env = dict(os.environ)
env['GIT_AUTHOR_NAME'] = author_name
env['GIT_AUTHOR_EMAIL'] = author_email
+ with open(os.path.join(root, 'some_file'), 'a') as f:
+ print >> f, message
subprocess.check_output(
['git', '-C', root, 'commit',
- '-a', '--allow-empty',
- '-m', message], env=env)
+ '-a', '-m', message], env=env)
rev = subprocess.check_output(
['git', '-C', root, 'rev-parse', 'HEAD']).strip()
return {
« no previous file with comments | « unittests/autoroll_test.py ('k') | no next file » | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698