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 { |