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

Side by Side Diff: tools/push-to-trunk/test_scripts.py

Issue 421553002: Teach releases script to read bleeding_edge tags. (Closed) Base URL: https://v8.googlecode.com/svn/branches/bleeding_edge
Patch Set: Created 6 years, 4 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 | Annotate | Revision Log
OLDNEW
1 #!/usr/bin/env python 1 #!/usr/bin/env python
2 # Copyright 2013 the V8 project authors. All rights reserved. 2 # Copyright 2013 the V8 project authors. All rights reserved.
3 # Redistribution and use in source and binary forms, with or without 3 # Redistribution and use in source and binary forms, with or without
4 # modification, are permitted provided that the following conditions are 4 # modification, are permitted provided that the following conditions are
5 # met: 5 # met:
6 # 6 #
7 # * Redistributions of source code must retain the above copyright 7 # * Redistributions of source code must retain the above copyright
8 # notice, this list of conditions and the following disclaimer. 8 # notice, this list of conditions and the following disclaimer.
9 # * Redistributions in binary form must reproduce the above 9 # * Redistributions in binary form must reproduce the above
10 # copyright notice, this list of conditions and the following 10 # copyright notice, this list of conditions and the following
(...skipping 1149 matching lines...) Expand 10 before | Expand all | Expand 10 after
1160 1160
1161 # The first run of the script stops because of the svn being down. 1161 # The first run of the script stops because of the svn being down.
1162 self.assertRaises(GitFailedException, 1162 self.assertRaises(GitFailedException,
1163 lambda: MergeToBranch(TEST_CONFIG, self).Run(args)) 1163 lambda: MergeToBranch(TEST_CONFIG, self).Run(args))
1164 1164
1165 # Test that state recovery after restarting the script works. 1165 # Test that state recovery after restarting the script works.
1166 args += ["-s", "3"] 1166 args += ["-s", "3"]
1167 MergeToBranch(TEST_CONFIG, self).Run(args) 1167 MergeToBranch(TEST_CONFIG, self).Run(args)
1168 1168
1169 def testReleases(self): 1169 def testReleases(self):
1170 tag_response_text = """
1171 ------------------------------------------------------------------------
1172 r22631 | author1@chromium.org | 2014-07-28 02:05:29 +0200 (Mon, 28 Jul 2014)
1173 Changed paths:
1174 A /tags/3.28.43 (from /trunk:22630)
1175
1176 Tagging version 3.28.43
1177 ------------------------------------------------------------------------
1178 r22629 | author2@chromium.org | 2014-07-26 05:09:29 +0200 (Sat, 26 Jul 2014)
1179 Changed paths:
1180 A /tags/3.28.41 (from /branches/bleeding_edge:22626)
1181
1182 Tagging version 3.28.41
1183 ------------------------------------------------------------------------
1184 r22556 | author3@chromium.org | 2014-07-23 13:31:59 +0200 (Wed, 23 Jul 2014)
1185 Changed paths:
1186 A /tags/3.27.34.7 (from /branches/3.27:22555)
1187
1188 Tagging version 3.27.34.7
1189 ------------------------------------------------------------------------
1190 r22627 | author4@chromium.org | 2014-07-26 01:39:15 +0200 (Sat, 26 Jul 2014)
1191 Changed paths:
1192 A /tags/3.28.40 (from /branches/bleeding_edge:22624)
1193
1194 Tagging version 3.28.40
1195 ------------------------------------------------------------------------
1196 """
1170 json_output = self.MakeEmptyTempFile() 1197 json_output = self.MakeEmptyTempFile()
1171 csv_output = self.MakeEmptyTempFile() 1198 csv_output = self.MakeEmptyTempFile()
1172 TEST_CONFIG[VERSION_FILE] = self.MakeEmptyTempFile() 1199 TEST_CONFIG[VERSION_FILE] = self.MakeEmptyTempFile()
1173 self.WriteFakeVersionFile() 1200 self.WriteFakeVersionFile()
1174 1201
1175 TEST_CONFIG[DOT_GIT_LOCATION] = self.MakeEmptyTempFile() 1202 TEST_CONFIG[DOT_GIT_LOCATION] = self.MakeEmptyTempFile()
1176 if not os.path.exists(TEST_CONFIG[CHROMIUM]): 1203 if not os.path.exists(TEST_CONFIG[CHROMIUM]):
1177 os.makedirs(TEST_CONFIG[CHROMIUM]) 1204 os.makedirs(TEST_CONFIG[CHROMIUM])
1178 def WriteDEPS(revision): 1205 def WriteDEPS(revision):
1179 TextToFile("Line\n \"v8_revision\": \"%s\",\n line\n" % revision, 1206 TextToFile("Line\n \"v8_revision\": \"%s\",\n line\n" % revision,
(...skipping 43 matching lines...) Expand 10 before | Expand all | Expand 10 after
1223 Git("log --format=%H", "hash6\n"), 1250 Git("log --format=%H", "hash6\n"),
1224 Git("diff --name-only hash6 hash6^", TEST_CONFIG[VERSION_FILE]), 1251 Git("diff --name-only hash6 hash6^", TEST_CONFIG[VERSION_FILE]),
1225 Git("checkout -f hash6 -- %s" % TEST_CONFIG[VERSION_FILE], "", 1252 Git("checkout -f hash6 -- %s" % TEST_CONFIG[VERSION_FILE], "",
1226 cb=ResetVersion(22, 3)), 1253 cb=ResetVersion(22, 3)),
1227 Git("log -1 --format=%B hash6", ""), 1254 Git("log -1 --format=%B hash6", ""),
1228 Git("log -1 --format=%s hash6", ""), 1255 Git("log -1 --format=%s hash6", ""),
1229 Git("svn find-rev hash6", "345"), 1256 Git("svn find-rev hash6", "345"),
1230 Git("log -1 --format=%ci hash6", ""), 1257 Git("log -1 --format=%ci hash6", ""),
1231 Git("checkout -f HEAD -- %s" % TEST_CONFIG[VERSION_FILE], "", 1258 Git("checkout -f HEAD -- %s" % TEST_CONFIG[VERSION_FILE], "",
1232 cb=ResetVersion(22, 5)), 1259 cb=ResetVersion(22, 5)),
1260 Git("reset --hard svn/bleeding_edge", ""),
1261 Git("log https://v8.googlecode.com/svn/tags -v --limit 20",
1262 tag_response_text),
1263 Git("svn find-rev r22626", "hash_22626"),
1264 Git("svn find-rev hash_22626", "22626"),
1265 Git("log -1 --format=%ci hash_22626", "01:23"),
1266 Git("svn find-rev r22624", "hash_22624"),
1267 Git("svn find-rev hash_22624", "22624"),
1268 Git("log -1 --format=%ci hash_22624", "02:34"),
1233 Git("status -s -uno", ""), 1269 Git("status -s -uno", ""),
1234 Git("checkout -f master", ""), 1270 Git("checkout -f master", ""),
1235 Git("pull", ""), 1271 Git("pull", ""),
1236 Git("checkout -b %s" % TEST_CONFIG[BRANCHNAME], ""), 1272 Git("checkout -b %s" % TEST_CONFIG[BRANCHNAME], ""),
1237 Git("log --format=%H --grep=\"V8\"", "c_hash1\nc_hash2\n"), 1273 Git("log --format=%H --grep=\"V8\"", "c_hash1\nc_hash2\n"),
1238 Git("diff --name-only c_hash1 c_hash1^", ""), 1274 Git("diff --name-only c_hash1 c_hash1^", ""),
1239 Git("diff --name-only c_hash2 c_hash2^", TEST_CONFIG[DEPS_FILE]), 1275 Git("diff --name-only c_hash2 c_hash2^", TEST_CONFIG[DEPS_FILE]),
1240 Git("checkout -f c_hash2 -- %s" % TEST_CONFIG[DEPS_FILE], "", 1276 Git("checkout -f c_hash2 -- %s" % TEST_CONFIG[DEPS_FILE], "",
1241 cb=ResetDEPS(345)), 1277 cb=ResetDEPS(345)),
1242 Git("svn find-rev c_hash2", "4567"), 1278 Git("svn find-rev c_hash2", "4567"),
(...skipping 10 matching lines...) Expand all
1253 Git("branch -D %s" % TEST_CONFIG[BRANCHNAME], ""), 1289 Git("branch -D %s" % TEST_CONFIG[BRANCHNAME], ""),
1254 ]) 1290 ])
1255 1291
1256 args = ["-c", TEST_CONFIG[CHROMIUM], 1292 args = ["-c", TEST_CONFIG[CHROMIUM],
1257 "--json", json_output, 1293 "--json", json_output,
1258 "--csv", csv_output, 1294 "--csv", csv_output,
1259 "--max-releases", "1"] 1295 "--max-releases", "1"]
1260 Releases(TEST_CONFIG, self).Run(args) 1296 Releases(TEST_CONFIG, self).Run(args)
1261 1297
1262 # Check expected output. 1298 # Check expected output.
1263 csv = ("3.22.3,trunk,345,4567,\r\n" 1299 csv = ("3.28.41,bleeding_edge,22626,,\r\n"
1300 "3.28.40,bleeding_edge,22624,,\r\n"
1301 "3.22.3,trunk,345,4567,\r\n"
1264 "3.21.2,3.21,123,,\r\n" 1302 "3.21.2,3.21,123,,\r\n"
1265 "3.3.1.1,3.3,234,,12\r\n") 1303 "3.3.1.1,3.3,234,,12\r\n")
1266 self.assertEquals(csv, FileToText(csv_output)) 1304 self.assertEquals(csv, FileToText(csv_output))
1267 1305
1268 expected_json = [ 1306 expected_json = [
1307 {"bleeding_edge": "22626", "patches_merged": "", "version": "3.28.41",
1308 "chromium_revision": "", "branch": "bleeding_edge", "revision": "22626",
1309 "review_link": "", "date": "01:23", "chromium_branch": "",
1310 "revision_link": "https://code.google.com/p/v8/source/detail?r=22626"},
1311 {"bleeding_edge": "22624", "patches_merged": "", "version": "3.28.40",
1312 "chromium_revision": "", "branch": "bleeding_edge", "revision": "22624",
1313 "review_link": "", "date": "02:34", "chromium_branch": "",
1314 "revision_link": "https://code.google.com/p/v8/source/detail?r=22624"},
1269 {"bleeding_edge": "", "patches_merged": "", "version": "3.22.3", 1315 {"bleeding_edge": "", "patches_merged": "", "version": "3.22.3",
1270 "chromium_revision": "4567", "branch": "trunk", "revision": "345", 1316 "chromium_revision": "4567", "branch": "trunk", "revision": "345",
1271 "review_link": "", "date": "", "chromium_branch": "7", 1317 "review_link": "", "date": "", "chromium_branch": "7",
1272 "revision_link": "https://code.google.com/p/v8/source/detail?r=345"}, 1318 "revision_link": "https://code.google.com/p/v8/source/detail?r=345"},
1273 {"patches_merged": "", "bleeding_edge": "", "version": "3.21.2", 1319 {"patches_merged": "", "bleeding_edge": "", "version": "3.21.2",
1274 "chromium_revision": "", "branch": "3.21", "revision": "123", 1320 "chromium_revision": "", "branch": "3.21", "revision": "123",
1275 "review_link": "", "date": "03:15", "chromium_branch": "", 1321 "review_link": "", "date": "03:15", "chromium_branch": "",
1276 "revision_link": "https://code.google.com/p/v8/source/detail?r=123"}, 1322 "revision_link": "https://code.google.com/p/v8/source/detail?r=123"},
1277 {"patches_merged": "12", "bleeding_edge": "", "version": "3.3.1.1", 1323 {"patches_merged": "12", "bleeding_edge": "", "version": "3.3.1.1",
1278 "chromium_revision": "", "branch": "3.3", "revision": "234", 1324 "chromium_revision": "", "branch": "3.3", "revision": "234",
(...skipping 156 matching lines...) Expand 10 before | Expand all | Expand 10 after
1435 1481
1436 Review URL: https://codereview.chromium.org/83173002 1482 Review URL: https://codereview.chromium.org/83173002
1437 1483
1438 ------------------------------------------------------------------------""") 1484 ------------------------------------------------------------------------""")
1439 self.assertEquals( 1485 self.assertEquals(
1440 """Prepare push to trunk. Now working on version 3.23.11. 1486 """Prepare push to trunk. Now working on version 3.23.11.
1441 1487
1442 R=danno@chromium.org 1488 R=danno@chromium.org
1443 1489
1444 Committed: https://code.google.com/p/v8/source/detail?r=17997""", body) 1490 Committed: https://code.google.com/p/v8/source/detail?r=17997""", body)
OLDNEW
« tools/push-to-trunk/releases.py ('K') | « tools/push-to-trunk/releases.py ('k') | no next file » | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698