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

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

Issue 1186393007: [release-tools] Fix possible race condition in retrieval of latest rolled version (Closed) Base URL: https://chromium.googlesource.com/v8/v8.git@master
Patch Set: Fixed nit Created 5 years, 6 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/auto_roll.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 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 1094 matching lines...) Expand 10 before | Expand all | Expand 10 after
1105 self.Expect([ 1105 self.Expect([
1106 URL("https://codereview.chromium.org/search", 1106 URL("https://codereview.chromium.org/search",
1107 "owner=author%40chromium.org&limit=30&closed=3&format=json", 1107 "owner=author%40chromium.org&limit=30&closed=3&format=json",
1108 ("{\"results\": [{\"subject\": \"different\"}]}")), 1108 ("{\"results\": [{\"subject\": \"different\"}]}")),
1109 Cmd("git fetch origin +refs/tags/*:refs/tags/*", ""), 1109 Cmd("git fetch origin +refs/tags/*:refs/tags/*", ""),
1110 Cmd("git rev-list --max-age=740800 --tags", 1110 Cmd("git rev-list --max-age=740800 --tags",
1111 "bad_tag\nhash_234\nhash_123"), 1111 "bad_tag\nhash_234\nhash_123"),
1112 Cmd("git describe --tags bad_tag", ""), 1112 Cmd("git describe --tags bad_tag", ""),
1113 Cmd("git describe --tags hash_234", "3.22.4"), 1113 Cmd("git describe --tags hash_234", "3.22.4"),
1114 Cmd("git describe --tags hash_123", "3.22.3"), 1114 Cmd("git describe --tags hash_123", "3.22.3"),
1115 Cmd("git pull", "", cwd=TEST_CONFIG["CHROMIUM"]),
1115 Cmd("git describe --tags abcd123455", "3.22.4"), 1116 Cmd("git describe --tags abcd123455", "3.22.4"),
1116 Cmd("git describe --tags hash_234", "3.22.4"), 1117 Cmd("git describe --tags hash_234", "3.22.4"),
1117 Cmd("git describe --tags hash_123", "3.22.3"), 1118 Cmd("git describe --tags hash_123", "3.22.3"),
1118 ]) 1119 ])
1119 1120
1120 result = auto_roll.AutoRoll(TEST_CONFIG, self).Run( 1121 result = auto_roll.AutoRoll(TEST_CONFIG, self).Run(
1121 AUTO_PUSH_ARGS + ["-c", TEST_CONFIG["CHROMIUM"]]) 1122 AUTO_PUSH_ARGS + ["-c", TEST_CONFIG["CHROMIUM"]])
1122 self.assertEquals(0, result) 1123 self.assertEquals(0, result)
1123 1124
1124 def testAutoRoll(self): 1125 def testAutoRoll(self):
1125 TEST_CONFIG["CHROMIUM"] = self.MakeEmptyTempDirectory() 1126 TEST_CONFIG["CHROMIUM"] = self.MakeEmptyTempDirectory()
1126 TextToFile(self.FAKE_DEPS, os.path.join(TEST_CONFIG["CHROMIUM"], "DEPS")) 1127 TextToFile(self.FAKE_DEPS, os.path.join(TEST_CONFIG["CHROMIUM"], "DEPS"))
1127 1128
1128 self.Expect([ 1129 self.Expect([
1129 URL("https://codereview.chromium.org/search", 1130 URL("https://codereview.chromium.org/search",
1130 "owner=author%40chromium.org&limit=30&closed=3&format=json", 1131 "owner=author%40chromium.org&limit=30&closed=3&format=json",
1131 ("{\"results\": [{\"subject\": \"different\"}]}")), 1132 ("{\"results\": [{\"subject\": \"different\"}]}")),
1132 Cmd("git fetch origin +refs/tags/*:refs/tags/*", ""), 1133 Cmd("git fetch origin +refs/tags/*:refs/tags/*", ""),
1133 Cmd("git rev-list --max-age=740800 --tags", 1134 Cmd("git rev-list --max-age=740800 --tags",
1134 "bad_tag\nhash_234\nhash_123"), 1135 "bad_tag\nhash_234\nhash_123"),
1135 Cmd("git describe --tags bad_tag", ""), 1136 Cmd("git describe --tags bad_tag", ""),
1136 Cmd("git describe --tags hash_234", "3.22.4"), 1137 Cmd("git describe --tags hash_234", "3.22.4"),
1137 Cmd("git describe --tags hash_123", "3.22.3"), 1138 Cmd("git describe --tags hash_123", "3.22.3"),
1139 Cmd("git pull", "", cwd=TEST_CONFIG["CHROMIUM"]),
1138 Cmd("git describe --tags abcd123455", "3.22.3.1"), 1140 Cmd("git describe --tags abcd123455", "3.22.3.1"),
1139 Cmd("git describe --tags hash_234", "3.22.4"), 1141 Cmd("git describe --tags hash_234", "3.22.4"),
1140 ]) 1142 ])
1141 1143
1142 result = auto_roll.AutoRoll(TEST_CONFIG, self).Run( 1144 result = auto_roll.AutoRoll(TEST_CONFIG, self).Run(
1143 AUTO_PUSH_ARGS + ["-c", TEST_CONFIG["CHROMIUM"], "--roll"]) 1145 AUTO_PUSH_ARGS + ["-c", TEST_CONFIG["CHROMIUM"], "--roll"])
1144 self.assertEquals(0, result) 1146 self.assertEquals(0, result)
1145 1147
1146 def testMergeToBranch(self): 1148 def testMergeToBranch(self):
1147 TEST_CONFIG["ALREADY_MERGING_SENTINEL_FILE"] = self.MakeEmptyTempFile() 1149 TEST_CONFIG["ALREADY_MERGING_SENTINEL_FILE"] = self.MakeEmptyTempFile()
(...skipping 395 matching lines...) Expand 10 before | Expand all | Expand 10 after
1543 1545
1544 Review URL: https://codereview.chromium.org/83173002 1546 Review URL: https://codereview.chromium.org/83173002
1545 1547
1546 ------------------------------------------------------------------------""") 1548 ------------------------------------------------------------------------""")
1547 self.assertEquals( 1549 self.assertEquals(
1548 """Prepare push to trunk. Now working on version 3.23.11. 1550 """Prepare push to trunk. Now working on version 3.23.11.
1549 1551
1550 R=danno@chromium.org 1552 R=danno@chromium.org
1551 1553
1552 Committed: https://code.google.com/p/v8/source/detail?r=17997""", body) 1554 Committed: https://code.google.com/p/v8/source/detail?r=17997""", body)
OLDNEW
« no previous file with comments | « tools/release/auto_roll.py ('k') | no next file » | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698