| 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 87 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
| 98 B = releases.BuildRevisionRanges | 98 B = releases.BuildRevisionRanges |
| 99 self.assertEquals({}, B([])) | 99 self.assertEquals({}, B([])) |
| 100 self.assertEquals({"10": "100"}, B([["100", "10"]])) | 100 self.assertEquals({"10": "100"}, B([["100", "10"]])) |
| 101 self.assertEquals({"10": "100", "9": "99:99"}, | 101 self.assertEquals({"10": "100", "9": "99:99"}, |
| 102 B([["100", "10"], ["99", "9"]])) | 102 B([["100", "10"], ["99", "9"]])) |
| 103 self.assertEquals({"10": "100", "9": "97:99"}, | 103 self.assertEquals({"10": "100", "9": "97:99"}, |
| 104 B([["100", "10"], ["98", "9"], ["97", "9"]])) | 104 B([["100", "10"], ["98", "9"], ["97", "9"]])) |
| 105 self.assertEquals({"10": "100", "9": "99:99", "3": "91:98"}, | 105 self.assertEquals({"10": "100", "9": "99:99", "3": "91:98"}, |
| 106 B([["100", "10"], ["99", "9"], ["91", "3"]])) | 106 B([["100", "10"], ["99", "9"], ["91", "3"]])) |
| 107 self.assertEquals({"13": "101", "12": "100:100", "9": "94:97", | 107 self.assertEquals({"13": "101", "12": "100:100", "9": "94:97", |
| 108 "3": "91:93,98:99"}, | 108 "3": "91:93, 98:99"}, |
| 109 B([["101", "13"], ["100", "12"], ["98", "3"], | 109 B([["101", "13"], ["100", "12"], ["98", "3"], |
| 110 ["94", "9"], ["91", "3"]])) | 110 ["94", "9"], ["91", "3"]])) |
| 111 | 111 |
| 112 def testMakeComment(self): | 112 def testMakeComment(self): |
| 113 self.assertEquals("# Line 1\n# Line 2\n#", | 113 self.assertEquals("# Line 1\n# Line 2\n#", |
| 114 MakeComment(" Line 1\n Line 2\n")) | 114 MakeComment(" Line 1\n Line 2\n")) |
| 115 self.assertEquals("#Line 1\n#Line 2", | 115 self.assertEquals("#Line 1\n#Line 2", |
| 116 MakeComment("Line 1\n Line 2")) | 116 MakeComment("Line 1\n Line 2")) |
| 117 | 117 |
| 118 def testStripComments(self): | 118 def testStripComments(self): |
| (...skipping 1119 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
| 1238 # Check expected output. | 1238 # Check expected output. |
| 1239 csv = ("3.22.3,trunk,345,4567,\r\n" | 1239 csv = ("3.22.3,trunk,345,4567,\r\n" |
| 1240 "3.21.2,3.21,123,,\r\n" | 1240 "3.21.2,3.21,123,,\r\n" |
| 1241 "3.3.1.1,3.3,234,,12\r\n") | 1241 "3.3.1.1,3.3,234,,12\r\n") |
| 1242 self.assertEquals(csv, FileToText(csv_output)) | 1242 self.assertEquals(csv, FileToText(csv_output)) |
| 1243 | 1243 |
| 1244 expected_json = [ | 1244 expected_json = [ |
| 1245 {"bleeding_edge": "", "patches_merged": "", "version": "3.22.3", | 1245 {"bleeding_edge": "", "patches_merged": "", "version": "3.22.3", |
| 1246 "chromium_revision": "4567", "branch": "trunk", "revision": "345"}, | 1246 "chromium_revision": "4567", "branch": "trunk", "revision": "345"}, |
| 1247 {"patches_merged": "", "bleeding_edge": "", "version": "3.21.2", | 1247 {"patches_merged": "", "bleeding_edge": "", "version": "3.21.2", |
| 1248 "branch": "3.21", "revision": "123"}, | 1248 "chromium_revision": "", "branch": "3.21", "revision": "123"}, |
| 1249 {"patches_merged": "12", "bleeding_edge": "", "version": "3.3.1.1", | 1249 {"patches_merged": "12", "bleeding_edge": "", "version": "3.3.1.1", |
| 1250 "branch": "3.3", "revision": "234"} | 1250 "chromium_revision": "", "branch": "3.3", "revision": "234"} |
| 1251 ] | 1251 ] |
| 1252 self.assertEquals(expected_json, json.loads(FileToText(json_output))) | 1252 self.assertEquals(expected_json, json.loads(FileToText(json_output))) |
| 1253 | 1253 |
| 1254 | 1254 |
| 1255 class SystemTest(unittest.TestCase): | 1255 class SystemTest(unittest.TestCase): |
| 1256 def testReload(self): | 1256 def testReload(self): |
| 1257 step = MakeStep(step_class=PrepareChangeLog, number=0, state={}, config={}, | 1257 step = MakeStep(step_class=PrepareChangeLog, number=0, state={}, config={}, |
| 1258 side_effect_handler=DEFAULT_SIDE_EFFECT_HANDLER) | 1258 side_effect_handler=DEFAULT_SIDE_EFFECT_HANDLER) |
| 1259 body = step.Reload( | 1259 body = step.Reload( |
| 1260 """------------------------------------------------------------------------ | 1260 """------------------------------------------------------------------------ |
| 1261 r17997 | machenbach@chromium.org | 2013-11-22 11:04:04 +0100 (...) | 6 lines | 1261 r17997 | machenbach@chromium.org | 2013-11-22 11:04:04 +0100 (...) | 6 lines |
| 1262 | 1262 |
| 1263 Prepare push to trunk. Now working on version 3.23.11. | 1263 Prepare push to trunk. Now working on version 3.23.11. |
| 1264 | 1264 |
| 1265 R=danno@chromium.org | 1265 R=danno@chromium.org |
| 1266 | 1266 |
| 1267 Review URL: https://codereview.chromium.org/83173002 | 1267 Review URL: https://codereview.chromium.org/83173002 |
| 1268 | 1268 |
| 1269 ------------------------------------------------------------------------""") | 1269 ------------------------------------------------------------------------""") |
| 1270 self.assertEquals( | 1270 self.assertEquals( |
| 1271 """Prepare push to trunk. Now working on version 3.23.11. | 1271 """Prepare push to trunk. Now working on version 3.23.11. |
| 1272 | 1272 |
| 1273 R=danno@chromium.org | 1273 R=danno@chromium.org |
| 1274 | 1274 |
| 1275 Committed: https://code.google.com/p/v8/source/detail?r=17997""", body) | 1275 Committed: https://code.google.com/p/v8/source/detail?r=17997""", body) |
| OLD | NEW |