Bug 232197 - [webkitscmpy] Log based tests fail in different timezones
Summary: [webkitscmpy] Log based tests fail in different timezones
Status: RESOLVED FIXED
Alias: None
Product: WebKit
Classification: Unclassified
Component: Tools / Tests (show other bugs)
Version: Other
Hardware: Unspecified Unspecified
: P2 Normal
Assignee: Jonathan Bedard
URL:
Keywords: InRadar
Depends on:
Blocks:
 
Reported: 2021-10-23 06:56 PDT by Aakash Jain
Modified: 2021-10-25 10:40 PDT (History)
5 users (show)

See Also:


Attachments
Patch (10.94 KB, patch)
2021-10-25 08:44 PDT, Jonathan Bedard
no flags Details | Formatted Diff | Diff
Patch (10.64 KB, patch)
2021-10-25 08:46 PDT, Jonathan Bedard
no flags Details | Formatted Diff | Diff

Note You need to log in before you can comment on or make changes to this bug.
Description Aakash Jain 2021-10-23 06:56:24 PDT
Few webkitpy unit-tests fail when run in different time zone. e.g.:

[1466/2023] webkitscmpy.test.log_unittest.TestLog.test_git_svn_revision failed:                                                           
  Traceback (most recent call last):
    File "Tools/Scripts/libraries/webkitscmpy/webkitscmpy/test/log_unittest.py", line 134, in test_git_svn_revision
      self.assertEqual(
  AssertionError: 'comm[118 chars] 03 00:46:40 2020 +0000\n\n    Patch Series\n [1203 chars]fc\n' != 'comm[118 chars] 03 03:46:40 2020 +0000\n\n    Patch Series\n [1203 chars]fc\n'
    commit r9 (d8bce26fa65c6fc8f39c17927abb77f69fab82fc, 5@main)
    Author: Jonathan Bedard <jbedard@apple.com>
  - Date:   Sat Oct 03 00:46:40 2020 +0000
  ?                     ^
  + Date:   Sat Oct 03 03:46:40 2020 +0000
  ?                     ^
    
        Patch Series
        git-svn-id: https://svn.example.org/repository/repository/trunk@9 268f45cc-cd09-0410-ab3c-d52691b4dbfc
    
    commit r8 (bae5d1e90999d4f916a8a15810ccfa43f37a2fd6, 4@main)
    Author: Jonathan Bedard <jbedard@apple.com>
  - Date:   Sat Oct 03 00:46:40 2020 +0000
  ?                     ^
  + Date:   Sat Oct 03 03:46:40 2020 +0000
  ?                     ^
  AssertionError: 'comm[118 chars] 03 00:46:40 2020 +0000\n\n    Patch Series\n [1203 chars]fc\n' != 'comm[118 chars] 03 03:46:40 2020 +0000\n\n    Patch Series\n [1203 chars]fc\n'
    commit r9 (d8bce26fa65c6fc8f39c17927abb77f69fab82fc, 5@main)
    Author: Jonathan Bedard <jbedard@apple.com>
  - Date:   Sat Oct 03 00:46:40 2020 +0000
  ?                     ^
  + Date:   Sat Oct 03 03:46:40 2020 +0000
  ?                     ^
    
        Patch Series
        git-svn-id: https://svn.example.org/repository/repository/trunk@9 268f45cc-cd09-0410-ab3c-d52691b4dbfc
    
    commit r8 (bae5d1e90999d4f916a8a15810ccfa43f37a2fd6, 4@main)
    Author: Jonathan Bedard <jbedard@apple.com>
  - Date:   Sat Oct 03 00:46:40 2020 +0000
  ?                     ^
  + Date:   Sat Oct 03 03:46:40 2020 +0000
  ?                     ^
        8th commit
        git-svn-id: https://svn.example.org/repository/repository/trunk@8 268f45cc-cd09-0410-ab3c-d52691b4dbfc
    
    commit r4 (1abe25b443e985f93b90d830e4a7e3731336af4d, 3@main)
    Author: Jonathan Bedard <jbedard@apple.com>
  - Date:   Fri Oct 02 23:23:20 2020 +0000
  ?         ^^^       ---
  + Date:   Sat Oct 03 02:23:20 2020 +0000
  ?         ^^^     +++
    
        4th commit
        git-svn-id: https://svn.example.org/repository/repository/trunk@4 268f45cc-cd09-0410-ab3c-d52691b4dbfc
    
    commit r2 (fff83bb2d9171b4d9196e977eb0508fd57e7a08d, 2@main)
    Author: Jonathan Bedard <jbedard@apple.com>
  - Date:   Fri Oct 02 22:50:00 2020 +0000
  ?         ^^^      ^^^^
  + Date:   Sat Oct 03 01:50:00 2020 +0000
  ?         ^^^      ^^^^
    
        2nd commit
        git-svn-id: https://svn.example.org/repository/repository/trunk@2 268f45cc-cd09-0410-ab3c-d52691b4dbfc
    
    commit r1 (9b8311f25a77ba14923d9d5a6532103f54abefcb, 1@main)
    Author: Jonathan Bedard <jbedard@apple.com>
  - Date:   Fri Oct 02 22:33:20 2020 +0000
  ?         ^^^      ^^^^
  + Date:   Sat Oct 03 01:33:20 2020 +0000
  ?         ^^^      ^^^^
    
        1st commit
        git-svn-id: https://svn.example.org/repository/repository/trunk@1 268f45cc-cd09-0410-ab3c-d52691b4dbfc
  
  
[1657/2023] webkitscmpy.test.log_unittest.TestLog.test_git_svn failed:                                        
  Traceback (most recent call last):
    File "Tools/Scripts/libraries/webkitscmpy/webkitscmpy/test/log_unittest.py", line 87, in test_git_svn
      self.assertEqual(
  AssertionError: 'comm[118 chars] 03 00:46:40 2020 +0000\n\n    Patch Series\n [1203 chars]fc\n' != 'comm[118 chars] 03 03:46:40 2020 +0000\n\n    Patch Series\n [1203 chars]fc\n'
  Diff is 1853 characters long. Set self.maxDiff to None to see it.
Comment 1 Radar WebKit Bug Importer 2021-10-25 08:43:38 PDT
<rdar://problem/84615646>
Comment 2 Jonathan Bedard 2021-10-25 08:44:53 PDT
Created attachment 442374 [details]
Patch
Comment 3 Jonathan Bedard 2021-10-25 08:46:54 PDT
Created attachment 442375 [details]
Patch
Comment 4 Jonathan Bedard 2021-10-25 08:47:43 PDT
All of these are basically the exact same problem: When we match `git log` output in unit tests, we need to be timezone-aware.
Comment 5 dewei_zhu 2021-10-25 10:09:10 PDT
Comment on attachment 442375 [details]
Patch

r=me
Comment 6 EWS 2021-10-25 10:40:19 PDT
Committed r284791 (243500@main): <https://commits.webkit.org/243500@main>

All reviewed patches have been landed. Closing bug and clearing flags on attachment 442375 [details].