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

Side by Side Diff: tools/release/test_mergeinfo.py

Issue 1391153002: [Release] Remove usage of roll ref (Closed) Base URL: https://chromium.googlesource.com/v8/v8.git@master
Patch Set: Created 5 years, 2 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 unified diff | Download patch
« no previous file with comments | « tools/release/mergeinfo.py ('k') | no next file » | no next file with comments »
Toggle Intra-line Diffs ('i') | Expand Comments ('e') | Collapse Comments ('c') | Show Comments Hide Comments ('s')
OLDNEW
1 #!/usr/bin/env python 1 #!/usr/bin/env python
2 # Copyright 2015 the V8 project authors. All rights reserved. 2 # Copyright 2015 the V8 project authors. All rights reserved.
3 # Use of this source code is governed by a BSD-style license that can be 3 # Use of this source code is governed by a BSD-style license that can be
4 # found in the LICENSE file. 4 # found in the LICENSE file.
5 5
6 import mergeinfo 6 import mergeinfo
7 import shutil 7 import shutil
8 import unittest 8 import unittest
9 9
10 from collections import namedtuple 10 from collections import namedtuple
(...skipping 133 matching lines...) Expand 10 before | Expand all | Expand 10 after
144 hash_of_followup = self._make_empty_commit(message) 144 hash_of_followup = self._make_empty_commit(message)
145 145
146 merges = mergeinfo.get_merge_commits(self.base_dir, hash_of_first_commit) 146 merges = mergeinfo.get_merge_commits(self.base_dir, hash_of_first_commit)
147 # Check if follow up is ignored 147 # Check if follow up is ignored
148 self.assertTrue(hash_of_followup not in merges) 148 self.assertTrue(hash_of_followup not in merges)
149 149
150 # Check for proper return of merges 150 # Check for proper return of merges
151 self.assertTrue(hash_of_hit in merges) 151 self.assertTrue(hash_of_hit in merges)
152 self.assertTrue(hash_of_ignored not in merges) 152 self.assertTrue(hash_of_ignored not in merges)
153 153
154 def testIsRolling(self):
155 commits = self._get_commits()
156 hash_of_first_commit = commits[0]
157 self._make_empty_commit('This one is the roll head')
158 self._execute_git(['branch', 'remotes/origin/roll'])
159 hash_of_not_rolled = self._make_empty_commit('This one is not yet rolled')
160
161 self.assertTrue(mergeinfo.is_rolling(
162 self.base_dir, hash_of_first_commit))
163 self.assertFalse(mergeinfo.is_rolling(
164 self.base_dir, hash_of_not_rolled))
165
166 def testIsLkgr(self): 154 def testIsLkgr(self):
167 commits = self._get_commits() 155 commits = self._get_commits()
168 hash_of_first_commit = commits[0] 156 hash_of_first_commit = commits[0]
169 self._make_empty_commit('This one is the lkgr head') 157 self._make_empty_commit('This one is the lkgr head')
170 self._execute_git(['branch', 'remotes/origin/lkgr']) 158 self._execute_git(['branch', 'remotes/origin/lkgr'])
171 hash_of_not_lkgr = self._make_empty_commit('This one is not yet lkgr') 159 hash_of_not_lkgr = self._make_empty_commit('This one is not yet lkgr')
172 160
173 self.assertTrue(mergeinfo.is_lkgr( 161 self.assertTrue(mergeinfo.is_lkgr(
174 self.base_dir, hash_of_first_commit)) 162 self.base_dir, hash_of_first_commit))
175 self.assertFalse(mergeinfo.is_lkgr( 163 self.assertFalse(mergeinfo.is_lkgr(
176 self.base_dir, hash_of_not_lkgr)) 164 self.base_dir, hash_of_not_lkgr))
177 165
178 def testShowFirstCanary(self): 166 def testShowFirstCanary(self):
179 commits = self._get_commits() 167 commits = self._get_commits()
180 hash_of_first_commit = commits[0] 168 hash_of_first_commit = commits[0]
181 169
182 self.assertEqual(mergeinfo.get_first_canary( 170 self.assertEqual(mergeinfo.get_first_canary(
183 self.base_dir, hash_of_first_commit), 'No Canary coverage') 171 self.base_dir, hash_of_first_commit), 'No Canary coverage')
184 172
185 self._execute_git(['branch', 'remotes/origin/chromium/2345']) 173 self._execute_git(['branch', 'remotes/origin/chromium/2345'])
186 self._execute_git(['branch', 'remotes/origin/chromium/2346']) 174 self._execute_git(['branch', 'remotes/origin/chromium/2346'])
187 175
188 self.assertEqual(mergeinfo.get_first_canary( 176 self.assertEqual(mergeinfo.get_first_canary(
189 self.base_dir, hash_of_first_commit), '2345') 177 self.base_dir, hash_of_first_commit), '2345')
190 178
191 if __name__ == "__main__": 179 if __name__ == "__main__":
192 unittest.main() 180 unittest.main()
OLDNEW
« no previous file with comments | « tools/release/mergeinfo.py ('k') | no next file » | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698