Changeset 284791 in webkit
- Timestamp:
- Oct 25, 2021, 10:40:11 AM (5 years ago)
- Location:
- trunk/Tools
- Files:
-
- 3 edited
-
ChangeLog (modified) (1 diff)
-
Scripts/libraries/webkitscmpy/webkitscmpy/test/git_unittest.py (modified) (7 diffs)
-
Scripts/libraries/webkitscmpy/webkitscmpy/test/log_unittest.py (modified) (16 diffs)
Legend:
- Unmodified
- Added
- Removed
-
trunk/Tools/ChangeLog
r284786 r284791 1 2021-10-25 Jonathan Bedard <jbedard@apple.com> 2 3 [webkitscmpy] Log based tests fail in different timezones 4 https://bugs.webkit.org/show_bug.cgi?id=232197 5 <rdar://problem/84615646> 6 7 Reviewed by Dewei Zhu. 8 9 Tests based on `git log` need to be timezone aware. 10 11 * Scripts/libraries/webkitscmpy/webkitscmpy/test/git_unittest.py: 12 * Scripts/libraries/webkitscmpy/webkitscmpy/test/log_unittest.py: 13 1 14 2021-10-25 Wenson Hsieh <wenson_hsieh@apple.com> 2 15 -
trunk/Tools/Scripts/libraries/webkitscmpy/webkitscmpy/test/git_unittest.py
r281412 r284791 22 22 23 23 import os 24 import time 24 25 25 26 from datetime import datetime … … 318 319 '''commit d8bce26fa65c6fc8f39c17927abb77f69fab82fc 319 320 Author: Jonathan Bedard <jbedard@apple.com> 320 AuthorDate: Sat Oct 03 03:46:40 2020 +0000321 AuthorDate: {time_a} 321 322 Commit: Jonathan Bedard <jbedard@apple.com> 322 CommitDate: Sat Oct 03 03:46:40 2020 +0000323 CommitDate: {time_a} 323 324 324 325 Patch Series … … 327 328 commit bae5d1e90999d4f916a8a15810ccfa43f37a2fd6 328 329 Author: Jonathan Bedard <jbedard@apple.com> 329 AuthorDate: Sat Oct 03 03:46:40 2020 +0000330 AuthorDate: {time_a} 330 331 Commit: Jonathan Bedard <jbedard@apple.com> 331 CommitDate: Sat Oct 03 03:46:40 2020 +0000332 CommitDate: {time_a} 332 333 333 334 8th commit … … 336 337 commit 1abe25b443e985f93b90d830e4a7e3731336af4d 337 338 Author: Jonathan Bedard <jbedard@apple.com> 338 AuthorDate: Sat Oct 03 02:23:20 2020 +0000339 AuthorDate: {time_b} 339 340 Commit: Jonathan Bedard <jbedard@apple.com> 340 CommitDate: Sat Oct 03 02:23:20 2020 +0000341 CommitDate: {time_b} 341 342 342 343 4th commit 343 344 git-svn-id: https://svn.example.org/repository/repository/trunk@4 268f45cc-cd09-0410-ab3c-d52691b4dbfc 344 ''' 345 ) 345 '''.format( 346 time_a=datetime.utcfromtimestamp(1601668000 + time.timezone).strftime('%a %b %d %H:%M:%S %Y +0000'), 347 time_b=datetime.utcfromtimestamp(1601663000 + time.timezone).strftime('%a %b %d %H:%M:%S %Y +0000'), 348 )) 346 349 347 350 def test_branch_log(self): … … 353 356 '''commit 790725a6d79e28db2ecdde29548d2262c0bd059d 354 357 Author: Jonathan Bedard <jbedard@apple.com> 355 AuthorDate: Sat Oct 03 03:30:00 2020 +0000358 AuthorDate: {time_a} 356 359 Commit: Jonathan Bedard <jbedard@apple.com> 357 CommitDate: Sat Oct 03 03:30:00 2020 +0000360 CommitDate: {time_a} 358 361 359 362 7th commit … … 362 365 commit 3cd32e352410565bb543821fbf856a6d3caad1c4 363 366 Author: Jonathan Bedard <jbedard@apple.com> 364 AuthorDate: Sat Oct 03 02:40:00 2020 +0000367 AuthorDate: {time_b} 365 368 Commit: Jonathan Bedard <jbedard@apple.com> 366 CommitDate: Sat Oct 03 02:40:00 2020 +0000369 CommitDate: {time_b} 367 370 368 371 5th commit … … 373 376 commit a30ce8494bf1ac2807a69844f726be4a9843ca55 374 377 Author: Jonathan Bedard <jbedard@apple.com> 375 AuthorDate: Sat Oct 03 02:06:40 2020 +0000378 AuthorDate: {time_c} 376 379 Commit: Jonathan Bedard <jbedard@apple.com> 377 CommitDate: Sat Oct 03 02:06:40 2020 +0000380 CommitDate: {time_c} 378 381 379 382 3rd commit 380 383 git-svn-id: https://svn.example.org/repository/repository/trunk@3 268f45cc-cd09-0410-ab3c-d52691b4dbfc 381 ''' 382 ) 384 '''.format( 385 time_a=datetime.utcfromtimestamp(1601667000 + time.timezone).strftime('%a %b %d %H:%M:%S %Y +0000'), 386 time_b=datetime.utcfromtimestamp(1601664000 + time.timezone).strftime('%a %b %d %H:%M:%S %Y +0000'), 387 time_c=datetime.utcfromtimestamp(1601662000 + time.timezone).strftime('%a %b %d %H:%M:%S %Y +0000'), 388 )) 383 389 384 390 def test_cache(self): -
trunk/Tools/Scripts/libraries/webkitscmpy/webkitscmpy/test/log_unittest.py
r280864 r284791 22 22 23 23 import os 24 import time 24 25 import sys 26 27 from datetime import datetime 25 28 26 29 from webkitcorepy import OutputCapture, Terminal, testing … … 48 51 '''commit 5@main (d8bce26fa65c6fc8f39c17927abb77f69fab82fc) 49 52 Author: Jonathan Bedard <jbedard@apple.com> 50 Date: Sat Oct 03 03:46:40 2020 +000053 Date: {} 51 54 52 55 Patch Series … … 54 57 commit 4@main (bae5d1e90999d4f916a8a15810ccfa43f37a2fd6) 55 58 Author: Jonathan Bedard <jbedard@apple.com> 56 Date: Sat Oct 03 03:46:40 2020 +000059 Date: {} 57 60 58 61 8th commit … … 60 63 commit 3@main (1abe25b443e985f93b90d830e4a7e3731336af4d) 61 64 Author: Jonathan Bedard <jbedard@apple.com> 62 Date: Sat Oct 03 02:23:20 2020 +000065 Date: {} 63 66 64 67 4th commit … … 66 69 commit 2@main (fff83bb2d9171b4d9196e977eb0508fd57e7a08d) 67 70 Author: Jonathan Bedard <jbedard@apple.com> 68 Date: Sat Oct 03 01:50:00 2020 +000071 Date: {} 69 72 70 73 2nd commit … … 72 75 commit 1@main (9b8311f25a77ba14923d9d5a6532103f54abefcb) 73 76 Author: Jonathan Bedard <jbedard@apple.com> 74 Date: Sat Oct 03 01:33:20 2020 +000077 Date: {} 75 78 76 79 1st commit 77 ''', 80 '''.format(*reversed([ 81 datetime.utcfromtimestamp(commit.timestamp + time.timezone).strftime('%a %b %d %H:%M:%S %Y +0000') 82 for commit in mocks.local.Git(self.path).commits['main'] 83 ])), 78 84 ) 79 85 … … 89 95 '''commit 5@main (d8bce26fa65c6fc8f39c17927abb77f69fab82fc, r9) 90 96 Author: Jonathan Bedard <jbedard@apple.com> 91 Date: Sat Oct 03 03:46:40 2020 +000097 Date: {} 92 98 93 99 Patch Series … … 96 102 commit 4@main (bae5d1e90999d4f916a8a15810ccfa43f37a2fd6, r8) 97 103 Author: Jonathan Bedard <jbedard@apple.com> 98 Date: Sat Oct 03 03:46:40 2020 +0000104 Date: {} 99 105 100 106 8th commit … … 103 109 commit 3@main (1abe25b443e985f93b90d830e4a7e3731336af4d, r4) 104 110 Author: Jonathan Bedard <jbedard@apple.com> 105 Date: Sat Oct 03 02:23:20 2020 +0000111 Date: {} 106 112 107 113 4th commit … … 110 116 commit 2@main (fff83bb2d9171b4d9196e977eb0508fd57e7a08d, r2) 111 117 Author: Jonathan Bedard <jbedard@apple.com> 112 Date: Sat Oct 03 01:50:00 2020 +0000118 Date: {} 113 119 114 120 2nd commit … … 117 123 commit 1@main (9b8311f25a77ba14923d9d5a6532103f54abefcb, r1) 118 124 Author: Jonathan Bedard <jbedard@apple.com> 119 Date: Sat Oct 03 01:33:20 2020 +0000125 Date: {} 120 126 121 127 1st commit 122 128 git-svn-id: https://svn.example.org/repository/repository/trunk@1 268f45cc-cd09-0410-ab3c-d52691b4dbfc 123 ''', 129 '''.format(*reversed([ 130 datetime.utcfromtimestamp(commit.timestamp + time.timezone).strftime('%a %b %d %H:%M:%S %Y +0000') 131 for commit in mocks.local.Git(self.path).commits['main'] 132 ])), 124 133 ) 125 134 … … 131 140 )) 132 141 133 self.maxDiff = None134 142 self.assertEqual( 135 143 captured.stdout.getvalue(), 136 144 '''commit r9 (d8bce26fa65c6fc8f39c17927abb77f69fab82fc, 5@main) 137 145 Author: Jonathan Bedard <jbedard@apple.com> 138 Date: Sat Oct 03 03:46:40 2020 +0000146 Date: {} 139 147 140 148 Patch Series … … 143 151 commit r8 (bae5d1e90999d4f916a8a15810ccfa43f37a2fd6, 4@main) 144 152 Author: Jonathan Bedard <jbedard@apple.com> 145 Date: Sat Oct 03 03:46:40 2020 +0000153 Date: {} 146 154 147 155 8th commit … … 150 158 commit r4 (1abe25b443e985f93b90d830e4a7e3731336af4d, 3@main) 151 159 Author: Jonathan Bedard <jbedard@apple.com> 152 Date: Sat Oct 03 02:23:20 2020 +0000160 Date: {} 153 161 154 162 4th commit … … 157 165 commit r2 (fff83bb2d9171b4d9196e977eb0508fd57e7a08d, 2@main) 158 166 Author: Jonathan Bedard <jbedard@apple.com> 159 Date: Sat Oct 03 01:50:00 2020 +0000167 Date: {} 160 168 161 169 2nd commit … … 164 172 commit r1 (9b8311f25a77ba14923d9d5a6532103f54abefcb, 1@main) 165 173 Author: Jonathan Bedard <jbedard@apple.com> 166 Date: Sat Oct 03 01:33:20 2020 +0000174 Date: {} 167 175 168 176 1st commit 169 177 git-svn-id: https://svn.example.org/repository/repository/trunk@1 268f45cc-cd09-0410-ab3c-d52691b4dbfc 170 ''', 178 '''.format(*reversed([ 179 datetime.utcfromtimestamp(commit.timestamp + time.timezone).strftime('%a %b %d %H:%M:%S %Y +0000') 180 for commit in mocks.local.Git(self.path).commits['main'] 181 ])), 171 182 ) 172 183
Note:
See TracChangeset
for help on using the changeset viewer.