OLD | NEW |
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 336 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
347 os.close(handle) | 347 os.close(handle) |
348 self._tmp_files.append(name) | 348 self._tmp_files.append(name) |
349 return name | 349 return name |
350 | 350 |
351 def MakeEmptyTempDirectory(self): | 351 def MakeEmptyTempDirectory(self): |
352 name = tempfile.mkdtemp() | 352 name = tempfile.mkdtemp() |
353 self._tmp_files.append(name) | 353 self._tmp_files.append(name) |
354 return name | 354 return name |
355 | 355 |
356 | 356 |
357 def WriteFakeVersionFile(self, minor=22, build=4, patch=0): | 357 def WriteFakeVersionFile(self, major=3, minor=22, build=4, patch=0): |
358 version_file = os.path.join(TEST_CONFIG["DEFAULT_CWD"], VERSION_FILE) | 358 version_file = os.path.join(TEST_CONFIG["DEFAULT_CWD"], VERSION_FILE) |
359 if not os.path.exists(os.path.dirname(version_file)): | 359 if not os.path.exists(os.path.dirname(version_file)): |
360 os.makedirs(os.path.dirname(version_file)) | 360 os.makedirs(os.path.dirname(version_file)) |
361 with open(version_file, "w") as f: | 361 with open(version_file, "w") as f: |
362 f.write(" // Some line...\n") | 362 f.write(" // Some line...\n") |
363 f.write("\n") | 363 f.write("\n") |
364 f.write("#define MAJOR_VERSION 3\n") | 364 f.write("#define MAJOR_VERSION %s\n" % major) |
365 f.write("#define MINOR_VERSION %s\n" % minor) | 365 f.write("#define MINOR_VERSION %s\n" % minor) |
366 f.write("#define BUILD_NUMBER %s\n" % build) | 366 f.write("#define BUILD_NUMBER %s\n" % build) |
367 f.write("#define PATCH_LEVEL %s\n" % patch) | 367 f.write("#define PATCH_LEVEL %s\n" % patch) |
368 f.write(" // Some line...\n") | 368 f.write(" // Some line...\n") |
369 f.write("#define IS_CANDIDATE_VERSION 0\n") | 369 f.write("#define IS_CANDIDATE_VERSION 0\n") |
370 | 370 |
371 def MakeStep(self): | 371 def MakeStep(self): |
372 """Convenience wrapper.""" | 372 """Convenience wrapper.""" |
373 options = ScriptsBase(TEST_CONFIG, self, self._state).MakeOptions([]) | 373 options = ScriptsBase(TEST_CONFIG, self, self._state).MakeOptions([]) |
374 return MakeStep(step_class=Step, state=self._state, | 374 return MakeStep(step_class=Step, state=self._state, |
(...skipping 248 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
623 test_tag | 623 test_tag |
624 """ | 624 """ |
625 | 625 |
626 # Version as tag: 3.22.4.0. Version on master: 3.22.6. | 626 # Version as tag: 3.22.4.0. Version on master: 3.22.6. |
627 # Make sure that the latest version is 3.22.6.0. | 627 # Make sure that the latest version is 3.22.6.0. |
628 def testIncrementVersion(self): | 628 def testIncrementVersion(self): |
629 self.Expect([ | 629 self.Expect([ |
630 Cmd("git fetch origin +refs/tags/*:refs/tags/*", ""), | 630 Cmd("git fetch origin +refs/tags/*:refs/tags/*", ""), |
631 Cmd("git tag", self.TAGS), | 631 Cmd("git tag", self.TAGS), |
632 Cmd("git checkout -f origin/master -- src/version.cc", | 632 Cmd("git checkout -f origin/master -- src/version.cc", |
633 "", cb=lambda: self.WriteFakeVersionFile(22, 6)), | 633 "", cb=lambda: self.WriteFakeVersionFile(3, 22, 6)), |
634 ]) | 634 ]) |
635 | 635 |
636 self.RunStep(PushToCandidates, IncrementVersion) | 636 self.RunStep(PushToCandidates, IncrementVersion) |
637 | 637 |
638 self.assertEquals("3", self._state["new_major"]) | 638 self.assertEquals("3", self._state["new_major"]) |
639 self.assertEquals("22", self._state["new_minor"]) | 639 self.assertEquals("22", self._state["new_minor"]) |
640 self.assertEquals("7", self._state["new_build"]) | 640 self.assertEquals("7", self._state["new_build"]) |
641 self.assertEquals("0", self._state["new_patch"]) | 641 self.assertEquals("0", self._state["new_patch"]) |
642 | 642 |
643 def _TestSquashCommits(self, change_log, expected_msg): | 643 def _TestSquashCommits(self, change_log, expected_msg): |
(...skipping 640 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
1284 | 1284 |
1285 # The first run of the script stops because of git being down. | 1285 # The first run of the script stops because of git being down. |
1286 self.assertRaises(GitFailedException, | 1286 self.assertRaises(GitFailedException, |
1287 lambda: MergeToBranch(TEST_CONFIG, self).Run(args)) | 1287 lambda: MergeToBranch(TEST_CONFIG, self).Run(args)) |
1288 | 1288 |
1289 # Test that state recovery after restarting the script works. | 1289 # Test that state recovery after restarting the script works. |
1290 args += ["-s", "4"] | 1290 args += ["-s", "4"] |
1291 MergeToBranch(TEST_CONFIG, self).Run(args) | 1291 MergeToBranch(TEST_CONFIG, self).Run(args) |
1292 | 1292 |
1293 def testReleases(self): | 1293 def testReleases(self): |
| 1294 c_hash1_commit_log = """Update V8 to Version 4.2.71. |
| 1295 |
| 1296 Cr-Commit-Position: refs/heads/master@{#5678} |
| 1297 """ |
1294 c_hash2_commit_log = """Revert something. | 1298 c_hash2_commit_log = """Revert something. |
1295 | 1299 |
1296 BUG=12345 | 1300 BUG=12345 |
1297 | 1301 |
1298 Reason: | 1302 Reason: |
1299 > Some reason. | 1303 > Some reason. |
1300 > Cr-Commit-Position: refs/heads/master@{#12345} | 1304 > Cr-Commit-Position: refs/heads/master@{#12345} |
1301 > git-svn-id: svn://svn.chromium.org/chrome/trunk/src@12345 003-1c4 | 1305 > git-svn-id: svn://svn.chromium.org/chrome/trunk/src@12345 003-1c4 |
1302 | 1306 |
1303 Review URL: https://codereview.chromium.org/12345 | 1307 Review URL: https://codereview.chromium.org/12345 |
(...skipping 16 matching lines...) Expand all Loading... |
1320 Cr-Commit-Position: refs/heads/candidates@{#234} | 1324 Cr-Commit-Position: refs/heads/candidates@{#234} |
1321 """ | 1325 """ |
1322 c_hash_123_commit_log = """Version 3.3.1.0 | 1326 c_hash_123_commit_log = """Version 3.3.1.0 |
1323 | 1327 |
1324 git-svn-id: googlecode@123 0039-1c4b | 1328 git-svn-id: googlecode@123 0039-1c4b |
1325 """ | 1329 """ |
1326 c_hash_345_commit_log = """Version 3.4.0. | 1330 c_hash_345_commit_log = """Version 3.4.0. |
1327 | 1331 |
1328 Cr-Commit-Position: refs/heads/candidates@{#345} | 1332 Cr-Commit-Position: refs/heads/candidates@{#345} |
1329 """ | 1333 """ |
| 1334 c_hash_456_commit_log = """Version 4.2.71. |
| 1335 |
| 1336 Cr-Commit-Position: refs/heads/4.2.71@{#1} |
| 1337 """ |
1330 | 1338 |
1331 json_output = self.MakeEmptyTempFile() | 1339 json_output = self.MakeEmptyTempFile() |
1332 csv_output = self.MakeEmptyTempFile() | 1340 csv_output = self.MakeEmptyTempFile() |
1333 self.WriteFakeVersionFile() | 1341 self.WriteFakeVersionFile() |
1334 | 1342 |
1335 TEST_CONFIG["CHROMIUM"] = self.MakeEmptyTempDirectory() | 1343 TEST_CONFIG["CHROMIUM"] = self.MakeEmptyTempDirectory() |
1336 chrome_dir = TEST_CONFIG["CHROMIUM"] | 1344 chrome_dir = TEST_CONFIG["CHROMIUM"] |
1337 chrome_v8_dir = os.path.join(chrome_dir, "v8") | 1345 chrome_v8_dir = os.path.join(chrome_dir, "v8") |
1338 os.makedirs(chrome_v8_dir) | 1346 os.makedirs(chrome_v8_dir) |
1339 def WriteDEPS(revision): | 1347 def WriteDEPS(revision): |
1340 TextToFile("Line\n \"v8_revision\": \"%s\",\n line\n" % revision, | 1348 TextToFile("Line\n \"v8_revision\": \"%s\",\n line\n" % revision, |
1341 os.path.join(chrome_dir, "DEPS")) | 1349 os.path.join(chrome_dir, "DEPS")) |
1342 WriteDEPS(567) | 1350 WriteDEPS(567) |
1343 | 1351 |
1344 def ResetVersion(minor, build, patch=0): | 1352 def ResetVersion(major, minor, build, patch=0): |
1345 return lambda: self.WriteFakeVersionFile(minor=minor, | 1353 return lambda: self.WriteFakeVersionFile(major=major, |
| 1354 minor=minor, |
1346 build=build, | 1355 build=build, |
1347 patch=patch) | 1356 patch=patch) |
1348 | 1357 |
1349 def ResetDEPS(revision): | 1358 def ResetDEPS(revision): |
1350 return lambda: WriteDEPS(revision) | 1359 return lambda: WriteDEPS(revision) |
1351 | 1360 |
1352 self.Expect([ | 1361 self.Expect([ |
1353 Cmd("git status -s -uno", ""), | 1362 Cmd("git status -s -uno", ""), |
1354 Cmd("git status -s -b -uno", "## some_branch\n"), | 1363 Cmd("git status -s -b -uno", "## some_branch\n"), |
1355 Cmd("git fetch", ""), | 1364 Cmd("git fetch", ""), |
1356 Cmd("git branch", " branch1\n* branch2\n"), | 1365 Cmd("git branch", " branch1\n* branch2\n"), |
1357 Cmd("git new-branch %s" % TEST_CONFIG["BRANCHNAME"], ""), | 1366 Cmd("git new-branch %s" % TEST_CONFIG["BRANCHNAME"], ""), |
1358 Cmd("git fetch origin +refs/tags/*:refs/tags/*", ""), | 1367 Cmd("git fetch origin +refs/tags/*:refs/tags/*", ""), |
1359 Cmd("git rev-list --max-age=395200 --tags", | 1368 Cmd("git rev-list --max-age=395200 --tags", |
1360 "bad_tag\nhash_234\nhash_123\nhash_345\n"), | 1369 "bad_tag\nhash_234\nhash_123\nhash_345\nhash_456\n"), |
1361 Cmd("git describe --tags bad_tag", "3.23.42-1-deadbeef"), | 1370 Cmd("git describe --tags bad_tag", "3.23.42-1-deadbeef"), |
1362 Cmd("git describe --tags hash_234", "3.3.1.1"), | 1371 Cmd("git describe --tags hash_234", "3.3.1.1"), |
1363 Cmd("git describe --tags hash_123", "3.21.2"), | 1372 Cmd("git describe --tags hash_123", "3.21.2"), |
1364 Cmd("git describe --tags hash_345", "3.22.3"), | 1373 Cmd("git describe --tags hash_345", "3.22.3"), |
| 1374 Cmd("git describe --tags hash_456", "4.2.71"), |
1365 Cmd("git diff --name-only hash_234 hash_234^", VERSION_FILE), | 1375 Cmd("git diff --name-only hash_234 hash_234^", VERSION_FILE), |
1366 Cmd("git checkout -f hash_234 -- %s" % VERSION_FILE, "", | 1376 Cmd("git checkout -f hash_234 -- %s" % VERSION_FILE, "", |
1367 cb=ResetVersion(3, 1, 1)), | 1377 cb=ResetVersion(3, 3, 1, 1)), |
1368 Cmd("git branch -r --contains hash_234", " branch-heads/3.3\n"), | 1378 Cmd("git branch -r --contains hash_234", " branch-heads/3.3\n"), |
1369 Cmd("git log -1 --format=%B hash_234", c_hash_234_commit_log), | 1379 Cmd("git log -1 --format=%B hash_234", c_hash_234_commit_log), |
1370 Cmd("git log -1 --format=%s hash_234", ""), | 1380 Cmd("git log -1 --format=%s hash_234", ""), |
1371 Cmd("git log -1 --format=%B hash_234", c_hash_234_commit_log), | 1381 Cmd("git log -1 --format=%B hash_234", c_hash_234_commit_log), |
1372 Cmd("git log -1 --format=%ci hash_234", "18:15"), | 1382 Cmd("git log -1 --format=%ci hash_234", "18:15"), |
1373 Cmd("git checkout -f HEAD -- %s" % VERSION_FILE, "", | 1383 Cmd("git checkout -f HEAD -- %s" % VERSION_FILE, "", |
1374 cb=ResetVersion(22, 5)), | 1384 cb=ResetVersion(3, 22, 5)), |
1375 | |
1376 Cmd("git diff --name-only hash_123 hash_123^", VERSION_FILE), | 1385 Cmd("git diff --name-only hash_123 hash_123^", VERSION_FILE), |
1377 Cmd("git checkout -f hash_123 -- %s" % VERSION_FILE, "", | 1386 Cmd("git checkout -f hash_123 -- %s" % VERSION_FILE, "", |
1378 cb=ResetVersion(21, 2)), | 1387 cb=ResetVersion(3, 21, 2)), |
1379 Cmd("git branch -r --contains hash_123", " branch-heads/3.21\n"), | 1388 Cmd("git branch -r --contains hash_123", " branch-heads/3.21\n"), |
1380 Cmd("git log -1 --format=%B hash_123", c_hash_123_commit_log), | 1389 Cmd("git log -1 --format=%B hash_123", c_hash_123_commit_log), |
1381 Cmd("git log -1 --format=%s hash_123", ""), | 1390 Cmd("git log -1 --format=%s hash_123", ""), |
1382 Cmd("git log -1 --format=%B hash_123", c_hash_123_commit_log), | 1391 Cmd("git log -1 --format=%B hash_123", c_hash_123_commit_log), |
1383 Cmd("git log -1 --format=%ci hash_123", "03:15"), | 1392 Cmd("git log -1 --format=%ci hash_123", "03:15"), |
1384 Cmd("git checkout -f HEAD -- %s" % VERSION_FILE, "", | 1393 Cmd("git checkout -f HEAD -- %s" % VERSION_FILE, "", |
1385 cb=ResetVersion(22, 5)), | 1394 cb=ResetVersion(3, 22, 5)), |
1386 | |
1387 Cmd("git diff --name-only hash_345 hash_345^", VERSION_FILE), | 1395 Cmd("git diff --name-only hash_345 hash_345^", VERSION_FILE), |
1388 Cmd("git checkout -f hash_345 -- %s" % VERSION_FILE, "", | 1396 Cmd("git checkout -f hash_345 -- %s" % VERSION_FILE, "", |
1389 cb=ResetVersion(22, 3)), | 1397 cb=ResetVersion(3, 22, 3)), |
1390 Cmd("git branch -r --contains hash_345", " origin/candidates\n"), | 1398 Cmd("git branch -r --contains hash_345", " origin/candidates\n"), |
1391 Cmd("git log -1 --format=%B hash_345", c_hash_345_commit_log), | 1399 Cmd("git log -1 --format=%B hash_345", c_hash_345_commit_log), |
1392 Cmd("git log -1 --format=%s hash_345", ""), | 1400 Cmd("git log -1 --format=%s hash_345", ""), |
1393 Cmd("git log -1 --format=%B hash_345", c_hash_345_commit_log), | 1401 Cmd("git log -1 --format=%B hash_345", c_hash_345_commit_log), |
1394 Cmd("git log -1 --format=%ci hash_345", ""), | 1402 Cmd("git log -1 --format=%ci hash_345", ""), |
1395 Cmd("git checkout -f HEAD -- %s" % VERSION_FILE, "", | 1403 Cmd("git checkout -f HEAD -- %s" % VERSION_FILE, "", |
1396 cb=ResetVersion(22, 5)), | 1404 cb=ResetVersion(3, 22, 5)), |
| 1405 Cmd("git diff --name-only hash_456 hash_456^", VERSION_FILE), |
| 1406 Cmd("git checkout -f hash_456 -- %s" % VERSION_FILE, "", |
| 1407 cb=ResetVersion(4, 2, 71)), |
| 1408 Cmd("git branch -r --contains hash_456", " origin/4.2.71\n"), |
| 1409 Cmd("git log -1 --format=%B hash_456", c_hash_456_commit_log), |
| 1410 Cmd("git log -1 --format=%H 4.2.71", "hash_456"), |
| 1411 Cmd("git log -1 --format=%s hash_456", "Version 4.2.71"), |
| 1412 Cmd("git log -1 --format=%H hash_456^", "master_456"), |
| 1413 Cmd("git log -1 --format=%B master_456", |
| 1414 "Cr-Commit-Position: refs/heads/master@{#456}"), |
| 1415 Cmd("git log -1 --format=%B hash_456", c_hash_456_commit_log), |
| 1416 Cmd("git log -1 --format=%ci hash_456", "02:15"), |
| 1417 Cmd("git checkout -f HEAD -- %s" % VERSION_FILE, "", |
| 1418 cb=ResetVersion(3, 22, 5)), |
1397 Cmd("git status -s -uno", "", cwd=chrome_dir), | 1419 Cmd("git status -s -uno", "", cwd=chrome_dir), |
1398 Cmd("git checkout -f master", "", cwd=chrome_dir), | 1420 Cmd("git checkout -f master", "", cwd=chrome_dir), |
1399 Cmd("git pull", "", cwd=chrome_dir), | 1421 Cmd("git pull", "", cwd=chrome_dir), |
1400 Cmd("git new-branch %s" % TEST_CONFIG["BRANCHNAME"], "", | 1422 Cmd("git new-branch %s" % TEST_CONFIG["BRANCHNAME"], "", |
1401 cwd=chrome_dir), | 1423 cwd=chrome_dir), |
1402 Cmd("git fetch origin", "", cwd=chrome_v8_dir), | 1424 Cmd("git fetch origin", "", cwd=chrome_v8_dir), |
1403 Cmd("git log --format=%H --grep=\"V8\"", "c_hash1\nc_hash2\nc_hash3\n", | 1425 Cmd("git log --format=%H --grep=\"V8\"", |
| 1426 "c_hash0\nc_hash1\nc_hash2\nc_hash3\n", |
1404 cwd=chrome_dir), | 1427 cwd=chrome_dir), |
1405 Cmd("git diff --name-only c_hash1 c_hash1^", "", cwd=chrome_dir), | 1428 Cmd("git diff --name-only c_hash0 c_hash0^", "", cwd=chrome_dir), |
| 1429 Cmd("git diff --name-only c_hash1 c_hash1^", "DEPS", cwd=chrome_dir), |
| 1430 Cmd("git checkout -f c_hash1 -- DEPS", "", |
| 1431 cb=ResetDEPS("hash_456"), |
| 1432 cwd=chrome_dir), |
| 1433 Cmd("git log -1 --format=%B c_hash1", c_hash1_commit_log, |
| 1434 cwd=chrome_dir), |
1406 Cmd("git diff --name-only c_hash2 c_hash2^", "DEPS", cwd=chrome_dir), | 1435 Cmd("git diff --name-only c_hash2 c_hash2^", "DEPS", cwd=chrome_dir), |
1407 Cmd("git checkout -f c_hash2 -- DEPS", "", | 1436 Cmd("git checkout -f c_hash2 -- DEPS", "", |
1408 cb=ResetDEPS("0123456789012345678901234567890123456789"), | 1437 cb=ResetDEPS("hash_345"), |
1409 cwd=chrome_dir), | 1438 cwd=chrome_dir), |
1410 Cmd("git log -1 --format=%B c_hash2", c_hash2_commit_log, | 1439 Cmd("git log -1 --format=%B c_hash2", c_hash2_commit_log, |
1411 cwd=chrome_dir), | 1440 cwd=chrome_dir), |
1412 Cmd("git log -1 --format=%B 0123456789012345678901234567890123456789", | |
1413 self.C_V8_22624_LOG, cwd=chrome_v8_dir), | |
1414 Cmd("git diff --name-only c_hash3 c_hash3^", "DEPS", cwd=chrome_dir), | 1441 Cmd("git diff --name-only c_hash3 c_hash3^", "DEPS", cwd=chrome_dir), |
1415 Cmd("git checkout -f c_hash3 -- DEPS", "", cb=ResetDEPS(345), | 1442 Cmd("git checkout -f c_hash3 -- DEPS", "", cb=ResetDEPS("deadbeef"), |
1416 cwd=chrome_dir), | 1443 cwd=chrome_dir), |
1417 Cmd("git log -1 --format=%B c_hash3", c_hash3_commit_log, | 1444 Cmd("git log -1 --format=%B c_hash3", c_hash3_commit_log, |
1418 cwd=chrome_dir), | 1445 cwd=chrome_dir), |
1419 Cmd("git checkout -f HEAD -- DEPS", "", cb=ResetDEPS(567), | 1446 Cmd("git checkout -f HEAD -- DEPS", "", cb=ResetDEPS("hash_567"), |
1420 cwd=chrome_dir), | 1447 cwd=chrome_dir), |
1421 Cmd("git branch -r", " weird/123\n branch-heads/7\n", cwd=chrome_dir), | 1448 Cmd("git branch -r", " weird/123\n branch-heads/7\n", cwd=chrome_dir), |
1422 Cmd("git checkout -f branch-heads/7 -- DEPS", "", cb=ResetDEPS(345), | 1449 Cmd("git checkout -f branch-heads/7 -- DEPS", "", |
| 1450 cb=ResetDEPS("hash_345"), |
1423 cwd=chrome_dir), | 1451 cwd=chrome_dir), |
1424 Cmd("git checkout -f HEAD -- DEPS", "", cb=ResetDEPS(567), | 1452 Cmd("git checkout -f HEAD -- DEPS", "", cb=ResetDEPS("hash_567"), |
1425 cwd=chrome_dir), | 1453 cwd=chrome_dir), |
1426 Cmd("git checkout -f master", "", cwd=chrome_dir), | 1454 Cmd("git checkout -f master", "", cwd=chrome_dir), |
1427 Cmd("git branch -D %s" % TEST_CONFIG["BRANCHNAME"], "", cwd=chrome_dir), | 1455 Cmd("git branch -D %s" % TEST_CONFIG["BRANCHNAME"], "", cwd=chrome_dir), |
1428 Cmd("git checkout -f some_branch", ""), | 1456 Cmd("git checkout -f some_branch", ""), |
1429 Cmd("git branch -D %s" % TEST_CONFIG["BRANCHNAME"], ""), | 1457 Cmd("git branch -D %s" % TEST_CONFIG["BRANCHNAME"], ""), |
1430 ]) | 1458 ]) |
1431 | 1459 |
1432 args = ["-c", TEST_CONFIG["CHROMIUM"], | 1460 args = ["-c", TEST_CONFIG["CHROMIUM"], |
1433 "--json", json_output, | 1461 "--json", json_output, |
1434 "--csv", csv_output, | 1462 "--csv", csv_output, |
1435 "--max-releases", "1"] | 1463 "--max-releases", "1"] |
1436 Releases(TEST_CONFIG, self).Run(args) | 1464 Releases(TEST_CONFIG, self).Run(args) |
1437 | 1465 |
1438 # Check expected output. | 1466 # Check expected output. |
1439 csv = ("3.22.3,candidates,345,3456:4566,\r\n" | 1467 csv = ("4.2.71,4.2.71,1,5678,\r\n" |
| 1468 "3.22.3,candidates,345,4567:5677,\r\n" |
1440 "3.21.2,3.21,123,,\r\n" | 1469 "3.21.2,3.21,123,,\r\n" |
1441 "3.3.1.1,3.3,234,,abc12\r\n") | 1470 "3.3.1.1,3.3,234,,abc12\r\n") |
1442 self.assertEquals(csv, FileToText(csv_output)) | 1471 self.assertEquals(csv, FileToText(csv_output)) |
1443 | 1472 |
1444 expected_json = [ | 1473 expected_json = [ |
1445 { | 1474 { |
| 1475 "revision": "1", |
| 1476 "revision_git": "hash_456", |
| 1477 "master_position": "456", |
| 1478 "master_hash": "master_456", |
| 1479 "patches_merged": "", |
| 1480 "version": "4.2.71", |
| 1481 "chromium_revision": "5678", |
| 1482 "branch": "4.2.71", |
| 1483 "review_link": "", |
| 1484 "date": "02:15", |
| 1485 "chromium_branch": "", |
| 1486 # FIXME(machenbach): Fix revisions link for git. |
| 1487 "revision_link": "https://code.google.com/p/v8/source/detail?r=1", |
| 1488 }, |
| 1489 { |
1446 "revision": "345", | 1490 "revision": "345", |
1447 "revision_git": "hash_345", | 1491 "revision_git": "hash_345", |
1448 "master_position": "", | 1492 "master_position": "", |
1449 "master_hash": "", | 1493 "master_hash": "", |
1450 "patches_merged": "", | 1494 "patches_merged": "", |
1451 "version": "3.22.3", | 1495 "version": "3.22.3", |
1452 "chromium_revision": "3456:4566", | 1496 "chromium_revision": "4567:5677", |
1453 "branch": "candidates", | 1497 "branch": "candidates", |
1454 "review_link": "", | 1498 "review_link": "", |
1455 "date": "", | 1499 "date": "", |
1456 "chromium_branch": "7", | 1500 "chromium_branch": "7", |
1457 "revision_link": "https://code.google.com/p/v8/source/detail?r=345", | 1501 "revision_link": "https://code.google.com/p/v8/source/detail?r=345", |
1458 }, | 1502 }, |
1459 { | 1503 { |
1460 "revision": "123", | 1504 "revision": "123", |
1461 "revision_git": "hash_123", | 1505 "revision_git": "hash_123", |
1462 "patches_merged": "", | 1506 "patches_merged": "", |
(...skipping 42 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
1505 | 1549 |
1506 Review URL: https://codereview.chromium.org/83173002 | 1550 Review URL: https://codereview.chromium.org/83173002 |
1507 | 1551 |
1508 ------------------------------------------------------------------------""") | 1552 ------------------------------------------------------------------------""") |
1509 self.assertEquals( | 1553 self.assertEquals( |
1510 """Prepare push to trunk. Now working on version 3.23.11. | 1554 """Prepare push to trunk. Now working on version 3.23.11. |
1511 | 1555 |
1512 R=danno@chromium.org | 1556 R=danno@chromium.org |
1513 | 1557 |
1514 Committed: https://code.google.com/p/v8/source/detail?r=17997""", body) | 1558 Committed: https://code.google.com/p/v8/source/detail?r=17997""", body) |
OLD | NEW |