[webkit-changes] [281581] trunk/Tools

2021-08-25 Thread jbedard
Title: [281581] trunk/Tools








Revision 281581
Author jbed...@apple.com
Date 2021-08-25 14:06:36 -0700 (Wed, 25 Aug 2021)


Log Message
[resultsdbpy] Handle E configuration comparisons
https://bugs.webkit.org/show_bug.cgi?id=229477


Reviewed by Stephanie Lewis.

* Scripts/libraries/resultsdbpy/resultsdbpy/__init__.py: Bump version.
* Scripts/libraries/resultsdbpy/resultsdbpy/view/static/js/configuration.js:
(Configuration.prototype.compare): Ignore "E" version names in both directions.
* Scripts/libraries/resultsdbpy/setup.py: Bump version.

Modified Paths

trunk/Tools/ChangeLog
trunk/Tools/Scripts/libraries/resultsdbpy/resultsdbpy/__init__.py
trunk/Tools/Scripts/libraries/resultsdbpy/resultsdbpy/view/static/js/configuration.js
trunk/Tools/Scripts/libraries/resultsdbpy/setup.py




Diff

Modified: trunk/Tools/ChangeLog (281580 => 281581)

--- trunk/Tools/ChangeLog	2021-08-25 21:06:09 UTC (rev 281580)
+++ trunk/Tools/ChangeLog	2021-08-25 21:06:36 UTC (rev 281581)
@@ -1,3 +1,16 @@
+2021-08-25  Jonathan Bedard  
+
+[resultsdbpy] Handle E configuration comparisons
+https://bugs.webkit.org/show_bug.cgi?id=229477
+
+
+Reviewed by Stephanie Lewis.
+
+* Scripts/libraries/resultsdbpy/resultsdbpy/__init__.py: Bump version.
+* Scripts/libraries/resultsdbpy/resultsdbpy/view/static/js/configuration.js:
+(Configuration.prototype.compare): Ignore "E" version names in both directions.
+* Scripts/libraries/resultsdbpy/setup.py: Bump version.
+
 2021-08-25  Wenson Hsieh  
 
 [iOS 15] editing/input/cocoa/autocorrect-on.html times out when run after editing/input/cocoa/autocorrect-off.html


Modified: trunk/Tools/Scripts/libraries/resultsdbpy/resultsdbpy/__init__.py (281580 => 281581)

--- trunk/Tools/Scripts/libraries/resultsdbpy/resultsdbpy/__init__.py	2021-08-25 21:06:09 UTC (rev 281580)
+++ trunk/Tools/Scripts/libraries/resultsdbpy/resultsdbpy/__init__.py	2021-08-25 21:06:36 UTC (rev 281581)
@@ -44,7 +44,7 @@
 "Please install webkitcorepy with `pip install webkitcorepy --extra-index-url `"
 )
 
-version = Version(3, 1, 0)
+version = Version(3, 1, 1)
 
 import webkitflaskpy
 


Modified: trunk/Tools/Scripts/libraries/resultsdbpy/resultsdbpy/view/static/js/configuration.js (281580 => 281581)

--- trunk/Tools/Scripts/libraries/resultsdbpy/resultsdbpy/view/static/js/configuration.js	2021-08-25 21:06:09 UTC (rev 281580)
+++ trunk/Tools/Scripts/libraries/resultsdbpy/resultsdbpy/view/static/js/configuration.js	2021-08-25 21:06:36 UTC (rev 281581)
@@ -1,4 +1,4 @@
-// Copyright (C) 2019 Apple Inc. All rights reserved.
+// Copyright (C) 2019-2021 Apple Inc. All rights reserved.
 //
 // Redistribution and use in source and binary forms, with or without
 // modification, are permitted provided that the following conditions
@@ -207,7 +207,7 @@
 
 if (this[key] !== null && configuration[key] !== null) {
 if (typeof this[key] === 'string') {
-if (key === 'version_name' && this[key].startsWith(configuration[key]))
+if (key === 'version_name' && (this[key].startsWith(configuration[key]) || configuration[key].startsWith(this[key])))
 result = 0;
 else
 result = this[key].localeCompare(configuration[key]);


Modified: trunk/Tools/Scripts/libraries/resultsdbpy/setup.py (281580 => 281581)

--- trunk/Tools/Scripts/libraries/resultsdbpy/setup.py	2021-08-25 21:06:09 UTC (rev 281580)
+++ trunk/Tools/Scripts/libraries/resultsdbpy/setup.py	2021-08-25 21:06:36 UTC (rev 281581)
@@ -30,7 +30,7 @@
 
 setup(
 name='resultsdbpy',
-version='3.1.0',
+version='3.1.1',
 description='Library for visualizing, processing and storing test results.',
 long_description=readme(),
 classifiers=[






___
webkit-changes mailing list
webkit-changes@lists.webkit.org
https://lists.webkit.org/mailman/listinfo/webkit-changes


[webkit-changes] [281528] trunk/Tools

2021-08-24 Thread jbedard
Title: [281528] trunk/Tools








Revision 281528
Author jbed...@apple.com
Date 2021-08-24 16:39:14 -0700 (Tue, 24 Aug 2021)


Log Message
[run-webkit-tests] Use Python 3 (Part 1)
https://bugs.webkit.org/show_bug.cgi?id=226658


Reviewed by Dewei Zhu.

* Scripts/run-webkit-tests: Change shebang to Python 3.

Modified Paths

trunk/Tools/ChangeLog
trunk/Tools/Scripts/run-webkit-tests




Diff

Modified: trunk/Tools/ChangeLog (281527 => 281528)

--- trunk/Tools/ChangeLog	2021-08-24 23:31:56 UTC (rev 281527)
+++ trunk/Tools/ChangeLog	2021-08-24 23:39:14 UTC (rev 281528)
@@ -1,3 +1,13 @@
+2021-08-24  Jonathan Bedard  
+
+[run-webkit-tests] Use Python 3 (Part 1)
+https://bugs.webkit.org/show_bug.cgi?id=226658
+
+
+Reviewed by Dewei Zhu.
+
+* Scripts/run-webkit-tests: Change shebang to Python 3.
+
 2021-08-24  Chris Dumez  
 
 [WK2] Implement process-swapping based on Cross-Origin-Opener-Policy HTTP header


Modified: trunk/Tools/Scripts/run-webkit-tests (281527 => 281528)

--- trunk/Tools/Scripts/run-webkit-tests	2021-08-24 23:31:56 UTC (rev 281527)
+++ trunk/Tools/Scripts/run-webkit-tests	2021-08-24 23:39:14 UTC (rev 281528)
@@ -1,4 +1,4 @@
-#!/usr/bin/env python
+#!/usr/bin/env python3
 
 # Copyright (C) 2011 Google Inc. All rights reserved.
 # Copyright (C) 2020 Apple Inc. All rights reserved.






___
webkit-changes mailing list
webkit-changes@lists.webkit.org
https://lists.webkit.org/mailman/listinfo/webkit-changes


[webkit-changes] [281515] trunk/Tools

2021-08-24 Thread jbedard
Title: [281515] trunk/Tools








Revision 281515
Author jbed...@apple.com
Date 2021-08-24 14:04:08 -0700 (Tue, 24 Aug 2021)


Log Message
[kill-old-processes] Hardcode directory for stale simulator files
https://bugs.webkit.org/show_bug.cgi?id=229464


Reviewed by Stephanie Lewis.

* CISupport/kill-old-processes:
(main):

Modified Paths

trunk/Tools/CISupport/kill-old-processes
trunk/Tools/ChangeLog




Diff

Modified: trunk/Tools/CISupport/kill-old-processes (281514 => 281515)

--- trunk/Tools/CISupport/kill-old-processes	2021-08-24 20:36:58 UTC (rev 281514)
+++ trunk/Tools/CISupport/kill-old-processes	2021-08-24 21:04:08 UTC (rev 281515)
@@ -28,7 +28,6 @@
 import getpass
 import re
 import subprocess
-import tempfile
 
 def listAllWebKitPrograms(builddir_bin):
 foundWebKitPrograms = []
@@ -174,7 +173,8 @@
 # Kill all instances of python executing run-webkit-tests
 os.system("ps aux | grep -E '.+/Python .+(run_webkit_tests|run-webkit-tests|mod_pywebsocket)' | grep -v grep | awk '{print $2}' | xargs kill")
 # FIXME:  Remove stale simulator temp files
-os.system('find {} -name "Deleting-*" -maxdepth 1 -exec sudo rm -rf {{}} +'.format(tempfile.gettempdir()))
+# Hard-code path because when run with 'sudo,' this script doesn't get the right tempfile location
+os.system('find /var/folders -name "Deleting-*" -maxdepth 4 -exec sudo rm -rf {} +')
 elif sys.platform == 'cygwin' or sys.platform == 'win32':
 for task in tasksToKill + tasksToKillWin:
 os.system("taskkill /t /f /im " + task)


Modified: trunk/Tools/ChangeLog (281514 => 281515)

--- trunk/Tools/ChangeLog	2021-08-24 20:36:58 UTC (rev 281514)
+++ trunk/Tools/ChangeLog	2021-08-24 21:04:08 UTC (rev 281515)
@@ -1,3 +1,14 @@
+2021-08-24  Jonathan Bedard  
+
+[kill-old-processes] Hardcode directory for stale simulator files
+https://bugs.webkit.org/show_bug.cgi?id=229464
+
+
+Reviewed by Stephanie Lewis.
+
+* CISupport/kill-old-processes:
+(main):
+
 2021-08-24  Alex Christensen  
 
 REGRESSION (r281473): [ iOS & MacOS ] TestWebKitAPI.ProcessSwap.NavigateToInvalidURL is timing out






___
webkit-changes mailing list
webkit-changes@lists.webkit.org
https://lists.webkit.org/mailman/listinfo/webkit-changes


[webkit-changes] [281448] trunk/Tools

2021-08-23 Thread jbedard
Title: [281448] trunk/Tools








Revision 281448
Author jbed...@apple.com
Date 2021-08-23 09:33:58 -0700 (Mon, 23 Aug 2021)


Log Message
[Cygwin] Support Python 3 in run-webkit-tests
https://bugs.webkit.org/show_bug.cgi?id=229360


Reviewed by Dewei Zhu.

* Scripts/libraries/webkitcorepy/setup.py: Bump version.
* Scripts/libraries/webkitcorepy/webkitcorepy/__init__.py: Ditto.
* Scripts/libraries/webkitcorepy/webkitcorepy/tests/task_pool_unittest.py:
(TaskPoolUnittest): Skip some tests on cygwin.
* Scripts/webkitpy/common/system/abstractexecutive.py:
(AbstractExecutive.command_for_printing): Strings might be bytes on some platforms.
* Scripts/webkitpy/common/system/path.py:
(_CygPath.convert): Cygwin path process is not unicode.
* Scripts/webkitpy/common/system/platforminfo.py:
(PlatformInfo._win_version_str): Return Windows version string as unicode string.

Modified Paths

trunk/Tools/ChangeLog
trunk/Tools/Scripts/libraries/webkitcorepy/setup.py
trunk/Tools/Scripts/libraries/webkitcorepy/webkitcorepy/__init__.py
trunk/Tools/Scripts/libraries/webkitcorepy/webkitcorepy/tests/task_pool_unittest.py
trunk/Tools/Scripts/webkitpy/common/system/abstractexecutive.py
trunk/Tools/Scripts/webkitpy/common/system/path.py
trunk/Tools/Scripts/webkitpy/common/system/platforminfo.py




Diff

Modified: trunk/Tools/ChangeLog (281447 => 281448)

--- trunk/Tools/ChangeLog	2021-08-23 16:01:29 UTC (rev 281447)
+++ trunk/Tools/ChangeLog	2021-08-23 16:33:58 UTC (rev 281448)
@@ -1,3 +1,22 @@
+2021-08-23  Jonathan Bedard  
+
+[Cygwin] Support Python 3 in run-webkit-tests
+https://bugs.webkit.org/show_bug.cgi?id=229360
+
+
+Reviewed by Dewei Zhu.
+
+* Scripts/libraries/webkitcorepy/setup.py: Bump version.
+* Scripts/libraries/webkitcorepy/webkitcorepy/__init__.py: Ditto.
+* Scripts/libraries/webkitcorepy/webkitcorepy/tests/task_pool_unittest.py:
+(TaskPoolUnittest): Skip some tests on cygwin.
+* Scripts/webkitpy/common/system/abstractexecutive.py:
+(AbstractExecutive.command_for_printing): Strings might be bytes on some platforms.
+* Scripts/webkitpy/common/system/path.py:
+(_CygPath.convert): Cygwin path process is not unicode.
+* Scripts/webkitpy/common/system/platforminfo.py:
+(PlatformInfo._win_version_str): Return Windows version string as unicode string.
+
 2021-08-22  Yusuke Suzuki  
 
 [JSC] Remove already-shipped wasm option flags


Modified: trunk/Tools/Scripts/libraries/webkitcorepy/setup.py (281447 => 281448)

--- trunk/Tools/Scripts/libraries/webkitcorepy/setup.py	2021-08-23 16:01:29 UTC (rev 281447)
+++ trunk/Tools/Scripts/libraries/webkitcorepy/setup.py	2021-08-23 16:33:58 UTC (rev 281448)
@@ -30,7 +30,7 @@
 
 setup(
 name='webkitcorepy',
-version='0.9.0',
+version='0.9.1',
 description='Library containing various Python support classes and functions.',
 long_description=readme(),
 classifiers=[


Modified: trunk/Tools/Scripts/libraries/webkitcorepy/webkitcorepy/__init__.py (281447 => 281448)

--- trunk/Tools/Scripts/libraries/webkitcorepy/webkitcorepy/__init__.py	2021-08-23 16:01:29 UTC (rev 281447)
+++ trunk/Tools/Scripts/libraries/webkitcorepy/webkitcorepy/__init__.py	2021-08-23 16:33:58 UTC (rev 281448)
@@ -41,7 +41,7 @@
 from webkitcorepy.nested_fuzzy_dict import NestedFuzzyDict
 from webkitcorepy.call_by_need import CallByNeed
 
-version = Version(0, 9, 0)
+version = Version(0, 9, 1)
 
 from webkitcorepy.autoinstall import Package, AutoInstall
 if sys.version_info > (3, 0):


Modified: trunk/Tools/Scripts/libraries/webkitcorepy/webkitcorepy/tests/task_pool_unittest.py (281447 => 281448)

--- trunk/Tools/Scripts/libraries/webkitcorepy/webkitcorepy/tests/task_pool_unittest.py	2021-08-23 16:01:29 UTC (rev 281447)
+++ trunk/Tools/Scripts/libraries/webkitcorepy/webkitcorepy/tests/task_pool_unittest.py	2021-08-23 16:33:58 UTC (rev 281448)
@@ -22,6 +22,7 @@
 
 import logging
 import time
+import sys
 import unittest
 
 from webkitcorepy import OutputCapture, TaskPool, log as logger
@@ -59,16 +60,6 @@
 class TaskPoolUnittest(unittest.TestCase):
 alphabet = 'abcdefghijklmnopqrstuvwxyz'
 
-def test_single(self):
-with OutputCapture(level=logging.WARNING) as captured:
-with TaskPool(workers=1, force_fork=True) as pool:
-pool.do(action, 'a')
-pool.do(log, logging.WARNING, '1')
-pool.wait()
-
-self.assertEqual(captured.stdout.getvalue(), 'action(a)\n')
-self.assertEqual(captured.webkitcorepy.log.getvalue(), 'worker/0 1\n')
-
 def test_single_no_fork(self):
 with OutputCapture(level=logging.WARNING) as captured:
 with TaskPool(workers=1, force_fork=False) as pool:
@@ -79,20 +70,6 @@
 self.assertEqual(captured.stdout.getvalue(), 'action(a)\n')
 self.assertEqual(captured.webkitcorepy.log.getvalue(), '1\n')
 
-def test_multiple(self):
-with 

[webkit-changes] [281412] trunk/Tools

2021-08-22 Thread jbedard
Title: [281412] trunk/Tools








Revision 281412
Author jbed...@apple.com
Date 2021-08-22 13:11:45 -0700 (Sun, 22 Aug 2021)


Log Message
[git-webkit] Add pull-request command (Part 5)
https://bugs.webkit.org/show_bug.cgi?id=229089


Reviewed by Dewei Zhu.

* Scripts/libraries/webkitscmpy/setup.py: Bump version.
* Scripts/libraries/webkitscmpy/webkitscmpy/__init__.py: Ditto.
* Scripts/libraries/webkitscmpy/webkitscmpy/local/git.py:
(Git.modified): Return a list of modified files in the current checkout.
* Scripts/libraries/webkitscmpy/webkitscmpy/mocks/local/git.py:
(Git.__init__): Add 'git diff' mock commands.
* Scripts/libraries/webkitscmpy/webkitscmpy/test/git_unittest.py:
(TestGit.test_modified):
(TestGit.test_modified_no_staged):
(TestGit.test_modified_staged):

Modified Paths

trunk/Tools/ChangeLog
trunk/Tools/Scripts/libraries/webkitscmpy/setup.py
trunk/Tools/Scripts/libraries/webkitscmpy/webkitscmpy/__init__.py
trunk/Tools/Scripts/libraries/webkitscmpy/webkitscmpy/local/git.py
trunk/Tools/Scripts/libraries/webkitscmpy/webkitscmpy/mocks/local/git.py
trunk/Tools/Scripts/libraries/webkitscmpy/webkitscmpy/test/git_unittest.py




Diff

Modified: trunk/Tools/ChangeLog (281411 => 281412)

--- trunk/Tools/ChangeLog	2021-08-22 19:50:21 UTC (rev 281411)
+++ trunk/Tools/ChangeLog	2021-08-22 20:11:45 UTC (rev 281412)
@@ -1,5 +1,24 @@
 2021-08-22  Jonathan Bedard  
 
+[git-webkit] Add pull-request command (Part 5)
+https://bugs.webkit.org/show_bug.cgi?id=229089
+
+
+Reviewed by Dewei Zhu.
+
+* Scripts/libraries/webkitscmpy/setup.py: Bump version.
+* Scripts/libraries/webkitscmpy/webkitscmpy/__init__.py: Ditto.
+* Scripts/libraries/webkitscmpy/webkitscmpy/local/git.py:
+(Git.modified): Return a list of modified files in the current checkout.
+* Scripts/libraries/webkitscmpy/webkitscmpy/mocks/local/git.py:
+(Git.__init__): Add 'git diff' mock commands.
+* Scripts/libraries/webkitscmpy/webkitscmpy/test/git_unittest.py:
+(TestGit.test_modified):
+(TestGit.test_modified_no_staged):
+(TestGit.test_modified_staged):
+
+2021-08-22  Jonathan Bedard  
+
 [git-webkit] Add pull-request command (Part 4)
 https://bugs.webkit.org/show_bug.cgi?id=229089
 


Modified: trunk/Tools/Scripts/libraries/webkitscmpy/setup.py (281411 => 281412)

--- trunk/Tools/Scripts/libraries/webkitscmpy/setup.py	2021-08-22 19:50:21 UTC (rev 281411)
+++ trunk/Tools/Scripts/libraries/webkitscmpy/setup.py	2021-08-22 20:11:45 UTC (rev 281412)
@@ -29,7 +29,7 @@
 
 setup(
 name='webkitscmpy',
-version='1.1.8',
+version='1.1.9',
 description='Library designed to interact with git and svn repositories.',
 long_description=readme(),
 classifiers=[


Modified: trunk/Tools/Scripts/libraries/webkitscmpy/webkitscmpy/__init__.py (281411 => 281412)

--- trunk/Tools/Scripts/libraries/webkitscmpy/webkitscmpy/__init__.py	2021-08-22 19:50:21 UTC (rev 281411)
+++ trunk/Tools/Scripts/libraries/webkitscmpy/webkitscmpy/__init__.py	2021-08-22 20:11:45 UTC (rev 281412)
@@ -46,7 +46,7 @@
 "Please install webkitcorepy with `pip install webkitcorepy --extra-index-url `"
 )
 
-version = Version(1, 1, 8)
+version = Version(1, 1, 9)
 
 AutoInstall.register(Package('fasteners', Version(0, 15, 0)))
 AutoInstall.register(Package('monotonic', Version(1, 5)))


Modified: trunk/Tools/Scripts/libraries/webkitscmpy/webkitscmpy/local/git.py (281411 => 281412)

--- trunk/Tools/Scripts/libraries/webkitscmpy/webkitscmpy/local/git.py	2021-08-22 19:50:21 UTC (rev 281411)
+++ trunk/Tools/Scripts/libraries/webkitscmpy/webkitscmpy/local/git.py	2021-08-22 20:11:45 UTC (rev 281412)
@@ -784,3 +784,32 @@
 return run([
 self.executable(), 'reset', 'HEAD', '--hard',
 ], cwd=self.root_path).returncode
+
+def modified(self, staged=None):
+if staged in [True, False]:
+command = run(
+[self.executable(), 'diff', '--name-only'] + (['--staged'] if staged else []),
+capture_output=True, encoding='utf-8', cwd=self.root_path,
+)
+if command.returncode:
+return []
+return command.stdout.splitlines()
+
+# When the user hasn't specified what they're looking for, we need to make some assumptions.
+# If all staged files are added, the user probably wants to include non-staged files too
+command = run(
+[self.executable(), 'diff', '--name-status', '--staged'],
+capture_output=True, encoding='utf-8', cwd=self.root_path,
+)
+if command.returncode:
+return []
+added = set()
+for line in command.stdout.splitlines():
+state, file = line.split(None, 1)
+if state == 'A':
+added.add(file)
+
+staged = self.modified(staged=True)
+if set(staged) - added:
+return 

[webkit-changes] [281399] trunk/Tools

2021-08-22 Thread jbedard
Title: [281399] trunk/Tools








Revision 281399
Author jbed...@apple.com
Date 2021-08-22 09:29:28 -0700 (Sun, 22 Aug 2021)


Log Message
[git-webkit] Add pull-request command (Part 4)
https://bugs.webkit.org/show_bug.cgi?id=229089


Reviewed by Dewei Zhu.

* Scripts/libraries/webkitscmpy/setup.py: Bump version.
* Scripts/libraries/webkitscmpy/webkitscmpy/__init__.py: Ditto.
* Scripts/libraries/webkitscmpy/webkitscmpy/local/git.py:
(Git): Match BitBucket ssh urls when constructing remotes.

Modified Paths

trunk/Tools/ChangeLog
trunk/Tools/Scripts/libraries/webkitscmpy/setup.py
trunk/Tools/Scripts/libraries/webkitscmpy/webkitscmpy/__init__.py
trunk/Tools/Scripts/libraries/webkitscmpy/webkitscmpy/local/git.py




Diff

Modified: trunk/Tools/ChangeLog (281398 => 281399)

--- trunk/Tools/ChangeLog	2021-08-22 15:35:52 UTC (rev 281398)
+++ trunk/Tools/ChangeLog	2021-08-22 16:29:28 UTC (rev 281399)
@@ -1,3 +1,16 @@
+2021-08-22  Jonathan Bedard  
+
+[git-webkit] Add pull-request command (Part 4)
+https://bugs.webkit.org/show_bug.cgi?id=229089
+
+
+Reviewed by Dewei Zhu.
+
+* Scripts/libraries/webkitscmpy/setup.py: Bump version.
+* Scripts/libraries/webkitscmpy/webkitscmpy/__init__.py: Ditto.
+* Scripts/libraries/webkitscmpy/webkitscmpy/local/git.py:
+(Git): Match BitBucket ssh urls when constructing remotes.
+
 2021-08-21  Jonathan Bedard  
 
 [git-webkit] Add pull-request command (Part 3)


Modified: trunk/Tools/Scripts/libraries/webkitscmpy/setup.py (281398 => 281399)

--- trunk/Tools/Scripts/libraries/webkitscmpy/setup.py	2021-08-22 15:35:52 UTC (rev 281398)
+++ trunk/Tools/Scripts/libraries/webkitscmpy/setup.py	2021-08-22 16:29:28 UTC (rev 281399)
@@ -29,7 +29,7 @@
 
 setup(
 name='webkitscmpy',
-version='1.1.7',
+version='1.1.8',
 description='Library designed to interact with git and svn repositories.',
 long_description=readme(),
 classifiers=[


Modified: trunk/Tools/Scripts/libraries/webkitscmpy/webkitscmpy/__init__.py (281398 => 281399)

--- trunk/Tools/Scripts/libraries/webkitscmpy/webkitscmpy/__init__.py	2021-08-22 15:35:52 UTC (rev 281398)
+++ trunk/Tools/Scripts/libraries/webkitscmpy/webkitscmpy/__init__.py	2021-08-22 16:29:28 UTC (rev 281399)
@@ -46,7 +46,7 @@
 "Please install webkitcorepy with `pip install webkitcorepy --extra-index-url `"
 )
 
-version = Version(1, 1, 7)
+version = Version(1, 1, 8)
 
 AutoInstall.register(Package('fasteners', Version(0, 15, 0)))
 AutoInstall.register(Package('monotonic', Version(1, 5)))


Modified: trunk/Tools/Scripts/libraries/webkitscmpy/webkitscmpy/local/git.py (281398 => 281399)

--- trunk/Tools/Scripts/libraries/webkitscmpy/webkitscmpy/local/git.py	2021-08-22 15:35:52 UTC (rev 281398)
+++ trunk/Tools/Scripts/libraries/webkitscmpy/webkitscmpy/local/git.py	2021-08-22 16:29:28 UTC (rev 281399)
@@ -254,7 +254,7 @@
 
 
 GIT_COMMIT = re.compile(r'commit (?P[0-9a-f]+)')
-SSH_REMOTE = re.compile('(ssh://)?git@(?P.+):(?P.+).git')
+SSH_REMOTE = re.compile('(ssh://)?git@(?P[^:/]+)[:/](?P.+).git')
 HTTP_REMOTE = re.compile('(?Phttps?)://(?P.+)/(?P.+).git')
 
 @classmethod






___
webkit-changes mailing list
webkit-changes@lists.webkit.org
https://lists.webkit.org/mailman/listinfo/webkit-changes


[webkit-changes] [281379] trunk/Tools

2021-08-21 Thread jbedard
Title: [281379] trunk/Tools








Revision 281379
Author jbed...@apple.com
Date 2021-08-21 12:19:56 -0700 (Sat, 21 Aug 2021)


Log Message
[git-webkit] Add pull-request command (Part 3)
https://bugs.webkit.org/show_bug.cgi?id=229089


Reviewed by Dewei Zhu.

* Scripts/libraries/webkitscmpy/setup.py: Bump version.
* Scripts/libraries/webkitscmpy/webkitscmpy/__init__.py: Bump version, export pull-request.
* Scripts/libraries/webkitscmpy/webkitscmpy/pull_request.py:
(PullRequest.State):
(PullRequest.create_body): Create pull-request body from commits and comment.
(PullRequest.parse_body): Turn a body from a pull-request into a comment string and partial commits.
(PullRequest.__init__):
(PullRequest.__repr__):
* Scripts/libraries/webkitscmpy/webkitscmpy/test/pull_request_unittest.py:
(TestPullRequest):
(TestPullRequest.test_representation):
(TestPullRequest.test_create_body_single):
(TestPullRequest.test_parse_body_single):
(TestPullRequest.test_create_body_multiple):
(TestPullRequest.test_parse_body_multiple):
(TestPullRequest.test_create_body_empty):
(TestPullRequest.test_parse_body_empty):
(TestPullRequest.test_create_body_comment):
(TestPullRequest.test_parse_body_single):

Modified Paths

trunk/Tools/ChangeLog
trunk/Tools/Scripts/libraries/webkitscmpy/setup.py
trunk/Tools/Scripts/libraries/webkitscmpy/webkitscmpy/__init__.py


Added Paths

trunk/Tools/Scripts/libraries/webkitscmpy/webkitscmpy/pull_request.py
trunk/Tools/Scripts/libraries/webkitscmpy/webkitscmpy/test/pull_request_unittest.py




Diff

Modified: trunk/Tools/ChangeLog (281378 => 281379)

--- trunk/Tools/ChangeLog	2021-08-21 19:18:51 UTC (rev 281378)
+++ trunk/Tools/ChangeLog	2021-08-21 19:19:56 UTC (rev 281379)
@@ -1,3 +1,31 @@
+2021-08-21  Jonathan Bedard  
+
+[git-webkit] Add pull-request command (Part 3)
+https://bugs.webkit.org/show_bug.cgi?id=229089
+
+
+Reviewed by Dewei Zhu.
+
+* Scripts/libraries/webkitscmpy/setup.py: Bump version.
+* Scripts/libraries/webkitscmpy/webkitscmpy/__init__.py: Bump version, export pull-request.
+* Scripts/libraries/webkitscmpy/webkitscmpy/pull_request.py:
+(PullRequest.State):
+(PullRequest.create_body): Create pull-request body from commits and comment.
+(PullRequest.parse_body): Turn a body from a pull-request into a comment string and partial commits.
+(PullRequest.__init__):
+(PullRequest.__repr__):
+* Scripts/libraries/webkitscmpy/webkitscmpy/test/pull_request_unittest.py:
+(TestPullRequest):
+(TestPullRequest.test_representation):
+(TestPullRequest.test_create_body_single):
+(TestPullRequest.test_parse_body_single):
+(TestPullRequest.test_create_body_multiple):
+(TestPullRequest.test_parse_body_multiple):
+(TestPullRequest.test_create_body_empty):
+(TestPullRequest.test_parse_body_empty):
+(TestPullRequest.test_create_body_comment):
+(TestPullRequest.test_parse_body_single):
+
 2021-08-21  Myles C. Maxfield  
 
 [Cocoa] Single characters don't get shaped in the fast text codepath


Modified: trunk/Tools/Scripts/libraries/webkitscmpy/setup.py (281378 => 281379)

--- trunk/Tools/Scripts/libraries/webkitscmpy/setup.py	2021-08-21 19:18:51 UTC (rev 281378)
+++ trunk/Tools/Scripts/libraries/webkitscmpy/setup.py	2021-08-21 19:19:56 UTC (rev 281379)
@@ -29,7 +29,7 @@
 
 setup(
 name='webkitscmpy',
-version='1.1.6',
+version='1.1.7',
 description='Library designed to interact with git and svn repositories.',
 long_description=readme(),
 classifiers=[


Modified: trunk/Tools/Scripts/libraries/webkitscmpy/webkitscmpy/__init__.py (281378 => 281379)

--- trunk/Tools/Scripts/libraries/webkitscmpy/webkitscmpy/__init__.py	2021-08-21 19:18:51 UTC (rev 281378)
+++ trunk/Tools/Scripts/libraries/webkitscmpy/webkitscmpy/__init__.py	2021-08-21 19:19:56 UTC (rev 281379)
@@ -46,7 +46,7 @@
 "Please install webkitcorepy with `pip install webkitcorepy --extra-index-url `"
 )
 
-version = Version(1, 1, 6)
+version = Version(1, 1, 7)
 
 AutoInstall.register(Package('fasteners', Version(0, 15, 0)))
 AutoInstall.register(Package('monotonic', Version(1, 5)))
@@ -55,6 +55,7 @@
 
 from webkitscmpy.contributor import Contributor
 from webkitscmpy.commit import Commit
+from webkitscmpy.pull_request import PullRequest
 from webkitscmpy.scm_base import ScmBase
 
 from webkitscmpy import local


Added: trunk/Tools/Scripts/libraries/webkitscmpy/webkitscmpy/pull_request.py (0 => 281379)

--- trunk/Tools/Scripts/libraries/webkitscmpy/webkitscmpy/pull_request.py	(rev 0)
+++ trunk/Tools/Scripts/libraries/webkitscmpy/webkitscmpy/pull_request.py	2021-08-21 19:19:56 UTC (rev 281379)
@@ -0,0 +1,77 @@
+# Copyright (C) 2021 Apple Inc. All rights reserved.
+#
+# Redistribution and use in source and binary forms, with or without
+# modification, are permitted provided that the following conditions
+# 

[webkit-changes] [281363] trunk/Tools

2021-08-20 Thread jbedard
Title: [281363] trunk/Tools








Revision 281363
Author jbed...@apple.com
Date 2021-08-20 22:25:07 -0700 (Fri, 20 Aug 2021)


Log Message
[git-webkit] Add pull-request command (Part 2)
https://bugs.webkit.org/show_bug.cgi?id=229089


Reviewed by Dewei Zhu.

* Scripts/libraries/webkitscmpy/setup.py: Bump version.
* Scripts/libraries/webkitscmpy/webkitscmpy/__init__.py: Ditto.
* Scripts/libraries/webkitscmpy/webkitscmpy/mocks/local/git.py:
(Git.__init__): Add 'check-ref-format' and 'checkout -b'.
(Git.checkout): Add ability to create branch.
* Scripts/libraries/webkitscmpy/webkitscmpy/program/__init__.py:
(main): Add Branch command.
* Scripts/libraries/webkitscmpy/webkitscmpy/program/branch.py:
(Branch.parser): Allow user to specify engineering branch name.
(Branch.normalize_issue): Turn provided string into eng branch if it isn't already.
(Branch.main): Create eng branch from current checkout state.
* Scripts/libraries/webkitscmpy/webkitscmpy/test/branch_unittest.py:
(TestBranch):
(TestBranch.setUp):
(TestBranch.test_basic_svn):
(TestBranch.test_basic_git):
(TestBranch.test_prompt_git):
(TestBranch.test_invalid_branch):

Modified Paths

trunk/Tools/ChangeLog
trunk/Tools/Scripts/libraries/webkitscmpy/setup.py
trunk/Tools/Scripts/libraries/webkitscmpy/webkitscmpy/__init__.py
trunk/Tools/Scripts/libraries/webkitscmpy/webkitscmpy/mocks/local/git.py
trunk/Tools/Scripts/libraries/webkitscmpy/webkitscmpy/program/__init__.py


Added Paths

trunk/Tools/Scripts/libraries/webkitscmpy/webkitscmpy/program/branch.py
trunk/Tools/Scripts/libraries/webkitscmpy/webkitscmpy/test/branch_unittest.py




Diff

Modified: trunk/Tools/ChangeLog (281362 => 281363)

--- trunk/Tools/ChangeLog	2021-08-21 03:20:23 UTC (rev 281362)
+++ trunk/Tools/ChangeLog	2021-08-21 05:25:07 UTC (rev 281363)
@@ -1,3 +1,30 @@
+2021-08-20  Jonathan Bedard  
+
+[git-webkit] Add pull-request command (Part 2)
+https://bugs.webkit.org/show_bug.cgi?id=229089
+
+
+Reviewed by Dewei Zhu.
+
+* Scripts/libraries/webkitscmpy/setup.py: Bump version.
+* Scripts/libraries/webkitscmpy/webkitscmpy/__init__.py: Ditto.
+* Scripts/libraries/webkitscmpy/webkitscmpy/mocks/local/git.py:
+(Git.__init__): Add 'check-ref-format' and 'checkout -b'.
+(Git.checkout): Add ability to create branch.
+* Scripts/libraries/webkitscmpy/webkitscmpy/program/__init__.py:
+(main): Add Branch command.
+* Scripts/libraries/webkitscmpy/webkitscmpy/program/branch.py:
+(Branch.parser): Allow user to specify engineering branch name.
+(Branch.normalize_issue): Turn provided string into eng branch if it isn't already.
+(Branch.main): Create eng branch from current checkout state.
+* Scripts/libraries/webkitscmpy/webkitscmpy/test/branch_unittest.py:
+(TestBranch):
+(TestBranch.setUp):
+(TestBranch.test_basic_svn):
+(TestBranch.test_basic_git):
+(TestBranch.test_prompt_git):
+(TestBranch.test_invalid_branch):
+
 2021-08-20  Alex Christensen  
 
 Make UIEventAttribution tests less platform dependent


Modified: trunk/Tools/Scripts/libraries/webkitscmpy/setup.py (281362 => 281363)

--- trunk/Tools/Scripts/libraries/webkitscmpy/setup.py	2021-08-21 03:20:23 UTC (rev 281362)
+++ trunk/Tools/Scripts/libraries/webkitscmpy/setup.py	2021-08-21 05:25:07 UTC (rev 281363)
@@ -29,7 +29,7 @@
 
 setup(
 name='webkitscmpy',
-version='1.1.5',
+version='1.1.6',
 description='Library designed to interact with git and svn repositories.',
 long_description=readme(),
 classifiers=[


Modified: trunk/Tools/Scripts/libraries/webkitscmpy/webkitscmpy/__init__.py (281362 => 281363)

--- trunk/Tools/Scripts/libraries/webkitscmpy/webkitscmpy/__init__.py	2021-08-21 03:20:23 UTC (rev 281362)
+++ trunk/Tools/Scripts/libraries/webkitscmpy/webkitscmpy/__init__.py	2021-08-21 05:25:07 UTC (rev 281363)
@@ -46,7 +46,7 @@
 "Please install webkitcorepy with `pip install webkitcorepy --extra-index-url `"
 )
 
-version = Version(1, 1, 5)
+version = Version(1, 1, 6)
 
 AutoInstall.register(Package('fasteners', Version(0, 15, 0)))
 AutoInstall.register(Package('monotonic', Version(1, 5)))


Modified: trunk/Tools/Scripts/libraries/webkitscmpy/webkitscmpy/mocks/local/git.py (281362 => 281363)

--- trunk/Tools/Scripts/libraries/webkitscmpy/webkitscmpy/mocks/local/git.py	2021-08-21 03:20:23 UTC (rev 281362)
+++ trunk/Tools/Scripts/libraries/webkitscmpy/webkitscmpy/mocks/local/git.py	2021-08-21 05:25:07 UTC (rev 281363)
@@ -333,10 +333,15 @@
 stdout='\n'.join(sorted(self.branches_on(args[4]))) + '\n',
 ) if self.find(args[4]) else mocks.ProcessCompletion(returncode=128),
 ), mocks.Subprocess.Route(
+self.executable, 'checkout', '-b', re.compile(r'.+'),
+cwd=self.path,
+generator=lambda *args, **kwargs:
+

[webkit-changes] [281346] trunk/Tools

2021-08-20 Thread jbedard
Title: [281346] trunk/Tools








Revision 281346
Author jbed...@apple.com
Date 2021-08-20 15:52:18 -0700 (Fri, 20 Aug 2021)


Log Message
[git-webkit] Add pull-request command (Part 1)
https://bugs.webkit.org/show_bug.cgi?id=229089


Reviewed by Dewei Zhu.

* Scripts/libraries/webkitscmpy/setup.py: Bump version.
* Scripts/libraries/webkitscmpy/webkitscmpy/__init__.py: Ditto.
* Scripts/libraries/webkitscmpy/webkitscmpy/program/__init__.py:
(main): Sort programs, add aliases.
* Scripts/libraries/webkitscmpy/webkitscmpy/program/command.py:
(Command): Add alias
(FilteredCommand): Inherit from Command.

Modified Paths

trunk/Tools/ChangeLog
trunk/Tools/Scripts/libraries/webkitscmpy/setup.py
trunk/Tools/Scripts/libraries/webkitscmpy/webkitscmpy/__init__.py
trunk/Tools/Scripts/libraries/webkitscmpy/webkitscmpy/program/__init__.py
trunk/Tools/Scripts/libraries/webkitscmpy/webkitscmpy/program/command.py




Diff

Modified: trunk/Tools/ChangeLog (281345 => 281346)

--- trunk/Tools/ChangeLog	2021-08-20 22:43:21 UTC (rev 281345)
+++ trunk/Tools/ChangeLog	2021-08-20 22:52:18 UTC (rev 281346)
@@ -1,3 +1,19 @@
+2021-08-20  Jonathan Bedard  
+
+[git-webkit] Add pull-request command (Part 1)
+https://bugs.webkit.org/show_bug.cgi?id=229089
+
+
+Reviewed by Dewei Zhu.
+
+* Scripts/libraries/webkitscmpy/setup.py: Bump version.
+* Scripts/libraries/webkitscmpy/webkitscmpy/__init__.py: Ditto.
+* Scripts/libraries/webkitscmpy/webkitscmpy/program/__init__.py:
+(main): Sort programs, add aliases.
+* Scripts/libraries/webkitscmpy/webkitscmpy/program/command.py:
+(Command): Add alias
+(FilteredCommand): Inherit from Command.
+
 2021-08-20  Jon Lee  
 
 Teach run-webkit-tests to print a summary of test status


Modified: trunk/Tools/Scripts/libraries/webkitscmpy/setup.py (281345 => 281346)

--- trunk/Tools/Scripts/libraries/webkitscmpy/setup.py	2021-08-20 22:43:21 UTC (rev 281345)
+++ trunk/Tools/Scripts/libraries/webkitscmpy/setup.py	2021-08-20 22:52:18 UTC (rev 281346)
@@ -29,7 +29,7 @@
 
 setup(
 name='webkitscmpy',
-version='1.1.4',
+version='1.1.5',
 description='Library designed to interact with git and svn repositories.',
 long_description=readme(),
 classifiers=[


Modified: trunk/Tools/Scripts/libraries/webkitscmpy/webkitscmpy/__init__.py (281345 => 281346)

--- trunk/Tools/Scripts/libraries/webkitscmpy/webkitscmpy/__init__.py	2021-08-20 22:43:21 UTC (rev 281345)
+++ trunk/Tools/Scripts/libraries/webkitscmpy/webkitscmpy/__init__.py	2021-08-20 22:52:18 UTC (rev 281346)
@@ -46,7 +46,7 @@
 "Please install webkitcorepy with `pip install webkitcorepy --extra-index-url `"
 )
 
-version = Version(1, 1, 4)
+version = Version(1, 1, 5)
 
 AutoInstall.register(Package('fasteners', Version(0, 15, 0)))
 AutoInstall.register(Package('monotonic', Version(1, 5)))


Modified: trunk/Tools/Scripts/libraries/webkitscmpy/webkitscmpy/program/__init__.py (281345 => 281346)

--- trunk/Tools/Scripts/libraries/webkitscmpy/webkitscmpy/program/__init__.py	2021-08-20 22:43:21 UTC (rev 281345)
+++ trunk/Tools/Scripts/libraries/webkitscmpy/webkitscmpy/program/__init__.py	2021-08-20 22:52:18 UTC (rev 281346)
@@ -65,14 +65,18 @@
 
 subparsers = parser.add_subparsers(help='sub-command help')
 
-programs = [Find, Info, Checkout, Canonicalize, Pull, Clean, Log, Blame, Setup]
+programs = [Blame, Canonicalize, Checkout, Clean, Find, Info, Log, Pull, Setup]
 if subversion:
 programs.append(SetupGitSvn)
 
 for program in programs:
-subparser = subparsers.add_parser(program.name, help=program.help)
+kwargs = dict(help=program.help)
+if sys.version_info > (3, 0):
+kwargs['aliases'] = program.aliases
+subparser = subparsers.add_parser(program.name, **kwargs)
 subparser.set_defaults(main=program.main)
 subparser.set_defaults(program=program.name)
+subparser.set_defaults(aliases=program.aliases)
 arguments.LoggingGroup(
 subparser,
 loggers=loggers,
@@ -83,7 +87,11 @@
 args = args or sys.argv[1:]
 parsed, unknown = parser.parse_known_args(args=args)
 if unknown:
-program_index = args.index(parsed.program)
+program_index = 0
+for candidate in [parsed.program] + parsed.aliases:
+if candidate in args:
+program_index = args.index(candidate)
+break
 if getattr(parsed, 'args', None):
 parsed.args = [arg for arg in args[program_index:] if arg in parsed.args or arg in unknown]
 if any([option not in getattr(parsed, 'args', []) for option in unknown]):


Modified: trunk/Tools/Scripts/libraries/webkitscmpy/webkitscmpy/program/command.py (281345 => 281346)

--- trunk/Tools/Scripts/libraries/webkitscmpy/webkitscmpy/program/command.py	2021-08-20 22:43:21 UTC (rev 281345)
+++ 

[webkit-changes] [281339] trunk/Tools

2021-08-20 Thread jbedard
Title: [281339] trunk/Tools








Revision 281339
Author jbed...@apple.com
Date 2021-08-20 14:56:59 -0700 (Fri, 20 Aug 2021)


Log Message
[git-webkit] Forward unknown args to log and blame
https://bugs.webkit.org/show_bug.cgi?id=229342


Rubber-stamped by Aakash Jain.

* Scripts/libraries/webkitscmpy/setup.py: Bump version.
* Scripts/libraries/webkitscmpy/webkitscmpy/__init__.py: Ditto.
* Scripts/libraries/webkitscmpy/webkitscmpy/program/__init__.py:
(main): Both log and blame might be passed options that need to be forwarded to git/svn.

Modified Paths

trunk/Tools/ChangeLog
trunk/Tools/Scripts/libraries/webkitscmpy/setup.py
trunk/Tools/Scripts/libraries/webkitscmpy/webkitscmpy/__init__.py
trunk/Tools/Scripts/libraries/webkitscmpy/webkitscmpy/program/__init__.py




Diff

Modified: trunk/Tools/ChangeLog (281338 => 281339)

--- trunk/Tools/ChangeLog	2021-08-20 21:28:00 UTC (rev 281338)
+++ trunk/Tools/ChangeLog	2021-08-20 21:56:59 UTC (rev 281339)
@@ -1,3 +1,16 @@
+2021-08-20  Jonathan Bedard  
+
+[git-webkit] Forward unknown args to log and blame
+https://bugs.webkit.org/show_bug.cgi?id=229342
+
+
+Rubber-stamped by Aakash Jain.
+
+* Scripts/libraries/webkitscmpy/setup.py: Bump version.
+* Scripts/libraries/webkitscmpy/webkitscmpy/__init__.py: Ditto.
+* Scripts/libraries/webkitscmpy/webkitscmpy/program/__init__.py:
+(main): Both log and blame might be passed options that need to be forwarded to git/svn.
+
 2021-08-20  Carlos Alberto Lopez Perez  
 
 REGRESSION(r274166): [GTK] It broke run-_javascript_core-tests causing all tests to use lot of memory


Modified: trunk/Tools/Scripts/libraries/webkitscmpy/setup.py (281338 => 281339)

--- trunk/Tools/Scripts/libraries/webkitscmpy/setup.py	2021-08-20 21:28:00 UTC (rev 281338)
+++ trunk/Tools/Scripts/libraries/webkitscmpy/setup.py	2021-08-20 21:56:59 UTC (rev 281339)
@@ -29,7 +29,7 @@
 
 setup(
 name='webkitscmpy',
-version='1.1.3',
+version='1.1.4',
 description='Library designed to interact with git and svn repositories.',
 long_description=readme(),
 classifiers=[


Modified: trunk/Tools/Scripts/libraries/webkitscmpy/webkitscmpy/__init__.py (281338 => 281339)

--- trunk/Tools/Scripts/libraries/webkitscmpy/webkitscmpy/__init__.py	2021-08-20 21:28:00 UTC (rev 281338)
+++ trunk/Tools/Scripts/libraries/webkitscmpy/webkitscmpy/__init__.py	2021-08-20 21:56:59 UTC (rev 281339)
@@ -46,7 +46,7 @@
 "Please install webkitcorepy with `pip install webkitcorepy --extra-index-url `"
 )
 
-version = Version(1, 1, 3)
+version = Version(1, 1, 4)
 
 AutoInstall.register(Package('fasteners', Version(0, 15, 0)))
 AutoInstall.register(Package('monotonic', Version(1, 5)))


Modified: trunk/Tools/Scripts/libraries/webkitscmpy/webkitscmpy/program/__init__.py (281338 => 281339)

--- trunk/Tools/Scripts/libraries/webkitscmpy/webkitscmpy/program/__init__.py	2021-08-20 21:28:00 UTC (rev 281338)
+++ trunk/Tools/Scripts/libraries/webkitscmpy/webkitscmpy/program/__init__.py	2021-08-20 21:56:59 UTC (rev 281339)
@@ -23,6 +23,7 @@
 import argparse
 import logging
 import os
+import sys
 
 from .blame import Blame
 from .canonicalize import Canonicalize
@@ -71,6 +72,7 @@
 for program in programs:
 subparser = subparsers.add_parser(program.name, help=program.help)
 subparser.set_defaults(main=program.main)
+subparser.set_defaults(program=program.name)
 arguments.LoggingGroup(
 subparser,
 loggers=loggers,
@@ -78,7 +80,14 @@
 )
 program.parser(subparser, loggers=loggers)
 
-parsed = parser.parse_args(args=args)
+args = args or sys.argv[1:]
+parsed, unknown = parser.parse_known_args(args=args)
+if unknown:
+program_index = args.index(parsed.program)
+if getattr(parsed, 'args', None):
+parsed.args = [arg for arg in args[program_index:] if arg in parsed.args or arg in unknown]
+if any([option not in getattr(parsed, 'args', []) for option in unknown]):
+parsed = parser.parse_args(args=args)
 
 if parsed.repository.startswith(('https://', 'http://')):
 repository = remote.Scm.from_url(parsed.repository, contributors=contributors)






___
webkit-changes mailing list
webkit-changes@lists.webkit.org
https://lists.webkit.org/mailman/listinfo/webkit-changes


[webkit-changes] [281257] trunk/Tools

2021-08-19 Thread jbedard
Title: [281257] trunk/Tools








Revision 281257
Author jbed...@apple.com
Date 2021-08-19 12:46:00 -0700 (Thu, 19 Aug 2021)


Log Message
[run-webkit-tests] Handle json crash logs (Part 1)
https://bugs.webkit.org/show_bug.cgi?id=229288


Reviewed by Alexey Proskuryakov.

* Scripts/webkitpy/common/system/crashlogs.py:
(CrashLogs._parse_darwin_crash_log): Attempt to parse crash logs as json, since Monterey .ips
(CrashLogs._find_newest_log_darwin.is_crash_log):
* Scripts/webkitpy/common/system/crashlogs_unittest.py:

Modified Paths

trunk/Tools/ChangeLog
trunk/Tools/Scripts/webkitpy/common/system/crashlogs.py
trunk/Tools/Scripts/webkitpy/common/system/crashlogs_unittest.py




Diff

Modified: trunk/Tools/ChangeLog (281256 => 281257)

--- trunk/Tools/ChangeLog	2021-08-19 19:44:56 UTC (rev 281256)
+++ trunk/Tools/ChangeLog	2021-08-19 19:46:00 UTC (rev 281257)
@@ -1,3 +1,16 @@
+2021-08-19  Jonathan Bedard  
+
+[run-webkit-tests] Handle json crash logs (Part 1)
+https://bugs.webkit.org/show_bug.cgi?id=229288
+
+
+Reviewed by Alexey Proskuryakov.
+
+* Scripts/webkitpy/common/system/crashlogs.py:
+(CrashLogs._parse_darwin_crash_log): Attempt to parse crash logs as json, since Monterey .ips
+(CrashLogs._find_newest_log_darwin.is_crash_log):
+* Scripts/webkitpy/common/system/crashlogs_unittest.py:
+
 2021-08-19  Carlos Garcia Campos  
 
 document.hasFocus() returns true for unfocused pages


Modified: trunk/Tools/Scripts/webkitpy/common/system/crashlogs.py (281256 => 281257)

--- trunk/Tools/Scripts/webkitpy/common/system/crashlogs.py	2021-08-19 19:44:56 UTC (rev 281256)
+++ trunk/Tools/Scripts/webkitpy/common/system/crashlogs.py	2021-08-19 19:46:00 UTC (rev 281257)
@@ -1,5 +1,5 @@
 # Copyright (c) 2011, Google Inc. All rights reserved.
-# Copyright (c) 2015, Apple Inc. All rights reserved.
+# Copyright (c) 2015, 2021 Apple Inc. All rights reserved.
 #
 # Redistribution and use in source and binary forms, with or without
 # modification, are permitted provided that the following conditions are
@@ -28,6 +28,7 @@
 # OF THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE.
 
 import datetime
+import json
 import logging
 import re
 
@@ -65,8 +66,21 @@
 contents = self._host.symbolicate_crash_log_if_needed(path)
 if not contents:
 return (None, None, None)
+
+lines = contents.splitlines()
+if len(lines) >= 2 and lines[0].startswith('{') and lines[1].startswith('{'):
+try:
+json.loads(lines[0])
+decoded = json.loads('\n'.join(lines[1:]))
+name = decoded.get('procName')
+pid = decoded.get('pid')
+if name and pid:
+return (name, pid, contents)
+except ValueError:
+pass
+
 is_sandbox_violation = False
-for line in contents.splitlines():
+for line in lines:
 if line.startswith('Sandbox Violation:'):
 is_sandbox_violation = True
 match = CrashLogs.DARWIN_PROCESS_REGEX.match(line)
@@ -79,7 +93,7 @@
 if self._crash_logs_to_skip and fs.join(dirpath, basename) in self._crash_logs_to_skip:
 return False
 return (basename.startswith(process_name + '_') and (basename.endswith('.crash')) or
-(process_name in basename  and basename.endswith('.ips')))
+(process_name in basename and basename.endswith('.ips')))
 
 logs = self._host.filesystem.files_under(self._crash_log_directory, file_filter=is_crash_log)
 errors = ''


Modified: trunk/Tools/Scripts/webkitpy/common/system/crashlogs_unittest.py (281256 => 281257)

--- trunk/Tools/Scripts/webkitpy/common/system/crashlogs_unittest.py	2021-08-19 19:44:56 UTC (rev 281256)
+++ trunk/Tools/Scripts/webkitpy/common/system/crashlogs_unittest.py	2021-08-19 19:46:00 UTC (rev 281257)
@@ -1,4 +1,5 @@
 # Copyright (C) 2011 Google Inc. All rights reserved.
+# Copyright (c) 2021, Apple Inc. All rights reserved.
 #
 # Redistribution and use in source and binary forms, with or without
 # modification, are permitted provided that the following conditions
@@ -74,6 +75,24 @@
 """.format(process_name=process_name, pid=pid)
 
 
+def make_mock_ips_crash_report_darwin(process_name, pid):
+return """{{"app_name":"{name}","timestamp":"2011-12-07 13:27:34.816 -0800","name":"{name}"}}
+{{
+  "uptime" : 6900,
+  "procRole" : "Non UI",
+  "version" : 2,
+  "userID" : 501,
+  "deployVersion" : 209,
+  "modelCode" : "MacBookPro16,4",
+  "coalitionID" : 512,
+  "captureTime" : "2011-12-07 13:27:34.816 -0800",
+  "incident" : "----",
+  "bug_type" : "309",
+  "pid" : {pid},
+  "procName" : "{name}"
+}}""".format(name=process_name, pid=pid)
+
+
 def make_mock_sandbox_report_darwin(process_name, pid):
 return """Incident Identifier: 

[webkit-changes] [281216] trunk/Tools

2021-08-18 Thread jbedard
Title: [281216] trunk/Tools








Revision 281216
Author jbed...@apple.com
Date 2021-08-18 17:20:00 -0700 (Wed, 18 Aug 2021)


Log Message
[run-webkit-tests] Remember failures when repeating test
https://bugs.webkit.org/show_bug.cgi?id=229217


Reviewed by Ryan Haddad.

* Scripts/webkitpy/layout_tests/controllers/layout_test_runner.py:
(LayoutTestRunner.update_summary_with_result): Replace existing result with unexpected result so
that unexpected results always take precedence over expected ones.
* Scripts/webkitpy/layout_tests/models/test_run_results.py:
(TestRunResults.add): Do not replace existing result.

Modified Paths

trunk/Tools/ChangeLog
trunk/Tools/Scripts/webkitpy/layout_tests/controllers/layout_test_runner.py
trunk/Tools/Scripts/webkitpy/layout_tests/models/test_run_results.py




Diff

Modified: trunk/Tools/ChangeLog (281215 => 281216)

--- trunk/Tools/ChangeLog	2021-08-18 23:14:15 UTC (rev 281215)
+++ trunk/Tools/ChangeLog	2021-08-19 00:20:00 UTC (rev 281216)
@@ -1,3 +1,17 @@
+2021-08-18  Jonathan Bedard  
+
+[run-webkit-tests] Remember failures when repeating test
+https://bugs.webkit.org/show_bug.cgi?id=229217
+
+
+Reviewed by Ryan Haddad.
+
+* Scripts/webkitpy/layout_tests/controllers/layout_test_runner.py:
+(LayoutTestRunner.update_summary_with_result): Replace existing result with unexpected result so
+that unexpected results always take precedence over expected ones.
+* Scripts/webkitpy/layout_tests/models/test_run_results.py:
+(TestRunResults.add): Do not replace existing result.
+
 2021-08-18  Lauro Moura  
 
 REGRESSION(r279169) [WebDriver] WPT Tools now requires python3 to launch the server


Modified: trunk/Tools/Scripts/webkitpy/layout_tests/controllers/layout_test_runner.py (281215 => 281216)

--- trunk/Tools/Scripts/webkitpy/layout_tests/controllers/layout_test_runner.py	2021-08-18 23:14:15 UTC (rev 281215)
+++ trunk/Tools/Scripts/webkitpy/layout_tests/controllers/layout_test_runner.py	2021-08-19 00:20:00 UTC (rev 281216)
@@ -227,6 +227,7 @@
 if result.type == test_expectations.SKIP:
 exp_str = got_str = 'SKIP'
 expected = True
+expectations = None
 else:
 expectations = self._expectations.filtered_expectations_for_test(result.test_name, self._options.pixel_tests or bool(result.reftest_type), self._options.world_leaks)
 expected = self._expectations.matches_an_expected_result(result.test_name, result.type, expectations)
@@ -233,7 +234,11 @@
 exp_str = self._expectations.model().expectations_to_string(expectations)
 got_str = self._expectations.model().expectation_to_string(result.type)
 
+existing = self._current_run_results.results_by_name.get(result.test_name)
 self._current_run_results.add(result, expected)
+if existing and not expected:
+existing_expectation = self._expectations.matches_an_expected_result(result.test_name, existing.type, expectations)
+self._current_run_results.change_result_to_failure(existing, result, existing_expectation, expected)
 
 self.printer.print_finished_test(result, expected, exp_str, got_str)
 


Modified: trunk/Tools/Scripts/webkitpy/layout_tests/models/test_run_results.py (281215 => 281216)

--- trunk/Tools/Scripts/webkitpy/layout_tests/models/test_run_results.py	2021-08-18 23:14:15 UTC (rev 281215)
+++ trunk/Tools/Scripts/webkitpy/layout_tests/models/test_run_results.py	2021-08-19 00:20:00 UTC (rev 281216)
@@ -69,7 +69,7 @@
 
 def add(self, test_result, expected):
 self.tests_by_expectation[test_result.type].add(test_result.test_name)
-self.results_by_name[test_result.test_name] = test_result
+self.results_by_name[test_result.test_name] = self.results_by_name.get(test_result.test_name, test_result)
 if test_result.is_other_crash:
 return
 if test_result.type != test_expectations.SKIP:






___
webkit-changes mailing list
webkit-changes@lists.webkit.org
https://lists.webkit.org/mailman/listinfo/webkit-changes


[webkit-changes] [281197] trunk/Tools

2021-08-18 Thread jbedard
Title: [281197] trunk/Tools








Revision 281197
Author jbed...@apple.com
Date 2021-08-18 10:19:25 -0700 (Wed, 18 Aug 2021)


Log Message
[git-webkit] "IndexError: list index out of range" using log
https://bugs.webkit.org/show_bug.cgi?id=229232

Reviewed by Ryan Haddad.

* Scripts/libraries/webkitscmpy/setup.py: Bump version.
* Scripts/libraries/webkitscmpy/webkitscmpy/__init__.py: Ditto.
* Scripts/libraries/webkitscmpy/webkitscmpy/program/command.py:
(FilteredCommand.pager):

Modified Paths

trunk/Tools/ChangeLog
trunk/Tools/Scripts/libraries/webkitscmpy/setup.py
trunk/Tools/Scripts/libraries/webkitscmpy/webkitscmpy/__init__.py
trunk/Tools/Scripts/libraries/webkitscmpy/webkitscmpy/program/command.py




Diff

Modified: trunk/Tools/ChangeLog (281196 => 281197)

--- trunk/Tools/ChangeLog	2021-08-18 17:16:10 UTC (rev 281196)
+++ trunk/Tools/ChangeLog	2021-08-18 17:19:25 UTC (rev 281197)
@@ -1,3 +1,15 @@
+2021-08-18  Jonathan Bedard  
+
+[git-webkit] "IndexError: list index out of range" using log
+https://bugs.webkit.org/show_bug.cgi?id=229232
+
+Reviewed by Ryan Haddad.
+
+* Scripts/libraries/webkitscmpy/setup.py: Bump version.
+* Scripts/libraries/webkitscmpy/webkitscmpy/__init__.py: Ditto.
+* Scripts/libraries/webkitscmpy/webkitscmpy/program/command.py:
+(FilteredCommand.pager):
+
 2021-08-18  Michael Catanzaro  
 
 REGRESSION(r280382): [GTK] 2.33.3 does not build with gtk-doc enabled, installs broken pkg-config files


Modified: trunk/Tools/Scripts/libraries/webkitscmpy/setup.py (281196 => 281197)

--- trunk/Tools/Scripts/libraries/webkitscmpy/setup.py	2021-08-18 17:16:10 UTC (rev 281196)
+++ trunk/Tools/Scripts/libraries/webkitscmpy/setup.py	2021-08-18 17:19:25 UTC (rev 281197)
@@ -29,7 +29,7 @@
 
 setup(
 name='webkitscmpy',
-version='1.1.2',
+version='1.1.3',
 description='Library designed to interact with git and svn repositories.',
 long_description=readme(),
 classifiers=[


Modified: trunk/Tools/Scripts/libraries/webkitscmpy/webkitscmpy/__init__.py (281196 => 281197)

--- trunk/Tools/Scripts/libraries/webkitscmpy/webkitscmpy/__init__.py	2021-08-18 17:16:10 UTC (rev 281196)
+++ trunk/Tools/Scripts/libraries/webkitscmpy/webkitscmpy/__init__.py	2021-08-18 17:19:25 UTC (rev 281197)
@@ -46,7 +46,7 @@
 "Please install webkitcorepy with `pip install webkitcorepy --extra-index-url `"
 )
 
-version = Version(1, 1, 2)
+version = Version(1, 1, 3)
 
 AutoInstall.register(Package('fasteners', Version(0, 15, 0)))
 AutoInstall.register(Package('monotonic', Version(1, 5)))


Modified: trunk/Tools/Scripts/libraries/webkitscmpy/webkitscmpy/program/command.py (281196 => 281197)

--- trunk/Tools/Scripts/libraries/webkitscmpy/webkitscmpy/program/command.py	2021-08-18 17:16:10 UTC (rev 281196)
+++ trunk/Tools/Scripts/libraries/webkitscmpy/webkitscmpy/program/command.py	2021-08-18 17:19:25 UTC (rev 281197)
@@ -122,7 +122,7 @@
 stdout=subprocess.PIPE,
 stderr=subprocess.PIPE,
 )
-more = subprocess.Popen([which('more')] + ['-F', '-R'] if platform.system() == 'Darwin' else [], stdin=child.stdout)
+more = subprocess.Popen([which('more')] + (['-F', '-R'] if platform.system() == 'Darwin' else []), stdin=child.stdout)
 
 try:
 while more.poll() is None and not child.poll():






___
webkit-changes mailing list
webkit-changes@lists.webkit.org
https://lists.webkit.org/mailman/listinfo/webkit-changes


[webkit-changes] [281191] trunk/Tools

2021-08-18 Thread jbedard
Title: [281191] trunk/Tools








Revision 281191
Author jbed...@apple.com
Date 2021-08-18 09:34:05 -0700 (Wed, 18 Aug 2021)


Log Message
[webkitcorepy] Add CallByNeed object
https://bugs.webkit.org/show_bug.cgi?id=229148


Reviewed by Dewei Zhu.

* Scripts/libraries/webkitcorepy/setup.py: Bump version.
* Scripts/libraries/webkitcorepy/webkitcorepy/__init__.py: Bump version, export Defer object.
* Scripts/libraries/webkitcorepy/webkitcorepy/call_by_need.py: Added.
(CallByNeed):
(CallByNeed.__init__):
(CallByNeed.__getattribute__): Depending on the request attribute, either return it or attempt to
resolve the underlying value before returning the attribute of the resolved value.
(CallByNeed.value): Resolve and return underlying object.
(CallByNeed.__call__): Ditto.
(CallByNeed.__repr__): Resolve object and return representation.
(CallByNeed.__str__): Resolve object and return string conversion.
* Scripts/libraries/webkitcorepy/webkitcorepy/tests/call_by_need_unittest.py: Added.
(TestCallByNeed):
(TestCallByNeed.test_basic):
(TestCallByNeed.test_string_conversion):
(TestCallByNeed.test_attribute_forwarding):
(TestCallByNeed.test_failed_attribute_forwarding):

Modified Paths

trunk/Tools/ChangeLog
trunk/Tools/Scripts/libraries/webkitcorepy/setup.py
trunk/Tools/Scripts/libraries/webkitcorepy/webkitcorepy/__init__.py


Added Paths

trunk/Tools/Scripts/libraries/webkitcorepy/webkitcorepy/call_by_need.py
trunk/Tools/Scripts/libraries/webkitcorepy/webkitcorepy/tests/call_by_need_unittest.py




Diff

Modified: trunk/Tools/ChangeLog (281190 => 281191)

--- trunk/Tools/ChangeLog	2021-08-18 16:22:18 UTC (rev 281190)
+++ trunk/Tools/ChangeLog	2021-08-18 16:34:05 UTC (rev 281191)
@@ -1,3 +1,29 @@
+2021-08-18  Jonathan Bedard  
+
+[webkitcorepy] Add CallByNeed object
+https://bugs.webkit.org/show_bug.cgi?id=229148
+
+
+Reviewed by Dewei Zhu.
+
+* Scripts/libraries/webkitcorepy/setup.py: Bump version.
+* Scripts/libraries/webkitcorepy/webkitcorepy/__init__.py: Bump version, export Defer object.
+* Scripts/libraries/webkitcorepy/webkitcorepy/call_by_need.py: Added.
+(CallByNeed):
+(CallByNeed.__init__):
+(CallByNeed.__getattribute__): Depending on the request attribute, either return it or attempt to
+resolve the underlying value before returning the attribute of the resolved value.
+(CallByNeed.value): Resolve and return underlying object.
+(CallByNeed.__call__): Ditto.
+(CallByNeed.__repr__): Resolve object and return representation.
+(CallByNeed.__str__): Resolve object and return string conversion.
+* Scripts/libraries/webkitcorepy/webkitcorepy/tests/call_by_need_unittest.py: Added.
+(TestCallByNeed):
+(TestCallByNeed.test_basic):
+(TestCallByNeed.test_string_conversion):
+(TestCallByNeed.test_attribute_forwarding):
+(TestCallByNeed.test_failed_attribute_forwarding):
+
 2021-08-18  Martin Robinson  
 
 [Flatpak SDK] Increase the startup performance of webkit-flatpak


Modified: trunk/Tools/Scripts/libraries/webkitcorepy/setup.py (281190 => 281191)

--- trunk/Tools/Scripts/libraries/webkitcorepy/setup.py	2021-08-18 16:22:18 UTC (rev 281190)
+++ trunk/Tools/Scripts/libraries/webkitcorepy/setup.py	2021-08-18 16:34:05 UTC (rev 281191)
@@ -1,4 +1,4 @@
-# Copyright (C) 2020 Apple Inc. All rights reserved.
+# Copyright (C) 2020-2021 Apple Inc. All rights reserved.
 #
 # Redistribution and use in source and binary forms, with or without
 # modification, are permitted provided that the following conditions
@@ -30,7 +30,7 @@
 
 setup(
 name='webkitcorepy',
-version='0.8.3',
+version='0.9.0',
 description='Library containing various Python support classes and functions.',
 long_description=readme(),
 classifiers=[


Modified: trunk/Tools/Scripts/libraries/webkitcorepy/webkitcorepy/__init__.py (281190 => 281191)

--- trunk/Tools/Scripts/libraries/webkitcorepy/webkitcorepy/__init__.py	2021-08-18 16:22:18 UTC (rev 281190)
+++ trunk/Tools/Scripts/libraries/webkitcorepy/webkitcorepy/__init__.py	2021-08-18 16:34:05 UTC (rev 281191)
@@ -39,8 +39,9 @@
 from webkitcorepy.credentials import credentials
 from webkitcorepy.measure_time import MeasureTime
 from webkitcorepy.nested_fuzzy_dict import NestedFuzzyDict
+from webkitcorepy.call_by_need import CallByNeed
 
-version = Version(0, 8, 3)
+version = Version(0, 9, 0)
 
 from webkitcorepy.autoinstall import Package, AutoInstall
 if sys.version_info > (3, 0):


Added: trunk/Tools/Scripts/libraries/webkitcorepy/webkitcorepy/call_by_need.py (0 => 281191)

--- trunk/Tools/Scripts/libraries/webkitcorepy/webkitcorepy/call_by_need.py	(rev 0)
+++ trunk/Tools/Scripts/libraries/webkitcorepy/webkitcorepy/call_by_need.py	2021-08-18 16:34:05 UTC (rev 281191)
@@ -0,0 +1,56 @@
+# Copyright (C) 2021 Apple Inc. All rights reserved.
+#
+# Redistribution and use in source and binary 

[webkit-changes] [281167] trunk/Tools

2021-08-17 Thread jbedard
Title: [281167] trunk/Tools








Revision 281167
Author jbed...@apple.com
Date 2021-08-17 15:16:18 -0700 (Tue, 17 Aug 2021)


Log Message
[webkitcorepy] Return SourceFileLoader in find_module
https://bugs.webkit.org/show_bug.cgi?id=229172


Reviewed by Stephanie Lewis.

* Scripts/libraries/webkitcorepy/webkitcorepy/autoinstall.py:
(AutoInstall.find_module): Return SourceFileLoader object in Python 3.

Modified Paths

trunk/Tools/ChangeLog
trunk/Tools/Scripts/libraries/webkitcorepy/setup.py
trunk/Tools/Scripts/libraries/webkitcorepy/webkitcorepy/__init__.py
trunk/Tools/Scripts/libraries/webkitcorepy/webkitcorepy/autoinstall.py




Diff

Modified: trunk/Tools/ChangeLog (281166 => 281167)

--- trunk/Tools/ChangeLog	2021-08-17 21:42:58 UTC (rev 281166)
+++ trunk/Tools/ChangeLog	2021-08-17 22:16:18 UTC (rev 281167)
@@ -1,3 +1,14 @@
+2021-08-17  Jonathan Bedard  
+
+[webkitcorepy] Return SourceFileLoader in find_module
+https://bugs.webkit.org/show_bug.cgi?id=229172
+
+
+Reviewed by Stephanie Lewis.
+
+* Scripts/libraries/webkitcorepy/webkitcorepy/autoinstall.py:
+(AutoInstall.find_module): Return SourceFileLoader object in Python 3.
+
 2021-08-17  Lauro Moura  
 
 [GLIB] Avoid getting stuck searching for revision in some cases


Modified: trunk/Tools/Scripts/libraries/webkitcorepy/setup.py (281166 => 281167)

--- trunk/Tools/Scripts/libraries/webkitcorepy/setup.py	2021-08-17 21:42:58 UTC (rev 281166)
+++ trunk/Tools/Scripts/libraries/webkitcorepy/setup.py	2021-08-17 22:16:18 UTC (rev 281167)
@@ -30,7 +30,7 @@
 
 setup(
 name='webkitcorepy',
-version='0.8.2',
+version='0.8.3',
 description='Library containing various Python support classes and functions.',
 long_description=readme(),
 classifiers=[


Modified: trunk/Tools/Scripts/libraries/webkitcorepy/webkitcorepy/__init__.py (281166 => 281167)

--- trunk/Tools/Scripts/libraries/webkitcorepy/webkitcorepy/__init__.py	2021-08-17 21:42:58 UTC (rev 281166)
+++ trunk/Tools/Scripts/libraries/webkitcorepy/webkitcorepy/__init__.py	2021-08-17 22:16:18 UTC (rev 281167)
@@ -40,7 +40,7 @@
 from webkitcorepy.measure_time import MeasureTime
 from webkitcorepy.nested_fuzzy_dict import NestedFuzzyDict
 
-version = Version(0, 8, 2)
+version = Version(0, 8, 3)
 
 from webkitcorepy.autoinstall import Package, AutoInstall
 if sys.version_info > (3, 0):


Modified: trunk/Tools/Scripts/libraries/webkitcorepy/webkitcorepy/autoinstall.py (281166 => 281167)

--- trunk/Tools/Scripts/libraries/webkitcorepy/webkitcorepy/autoinstall.py	2021-08-17 21:42:58 UTC (rev 281166)
+++ trunk/Tools/Scripts/libraries/webkitcorepy/webkitcorepy/autoinstall.py	2021-08-17 22:16:18 UTC (rev 281167)
@@ -40,9 +40,10 @@
 from webkitcorepy.version import Version
 
 if sys.version_info > (3, 0):
+from html.parser import HTMLParser
+from importlib import machinery as importmachinery
 from urllib.request import urlopen
 from urllib.error import URLError
-from html.parser import HTMLParser
 else:
 from urllib2 import urlopen, URLError
 from HTMLParser import HTMLParser
@@ -591,12 +592,32 @@
 @classmethod
 def find_module(cls, fullname, path=None):
 if not cls.enabled() or path is not None:
-return
+return None
 
 name = fullname.split('.')[0]
-if cls.packages.get(name):
-cls.install(name)
+if not cls.packages.get(name) or not cls.directory:
+return None
 
+cls.install(name)
+if sys.version_info < (3, 0):
+# Python 2 works fine with the default module finder, once we've installed the module in question
+return None
+
+path = cls.directory
+for part in fullname.split('.'):
+path = os.path.join(path, part)
+for ext in ('', '.py', '.pyc', '.py3', '.pyo'):
+candidate = '{}{}'.format(path, ext)
+if os.path.exists(candidate):
+path = candidate
+break
+if not os.path.isdir(path):
+break
+if os.path.isdir(path):
+path = os.path.join(path, '__init__.py')
+
+return importmachinery.SourceFileLoader(name, path)
+
 @classmethod
 def tags(cls):
 from packaging import tags






___
webkit-changes mailing list
webkit-changes@lists.webkit.org
https://lists.webkit.org/mailman/listinfo/webkit-changes


[webkit-changes] [281023] trunk/Tools

2021-08-13 Thread jbedard
Title: [281023] trunk/Tools








Revision 281023
Author jbed...@apple.com
Date 2021-08-13 10:24:16 -0700 (Fri, 13 Aug 2021)


Log Message
[webkitscmpy] Fix SVN relative URL parsing
https://bugs.webkit.org/show_bug.cgi?id=229075


Reviewed by Aakash Jain.

* Scripts/libraries/webkitscmpy/setup.py: Bump version.
* Scripts/libraries/webkitscmpy/webkitscmpy/__init__.py: Ditto.
* Scripts/libraries/webkitscmpy/webkitscmpy/local/svn.py:
(Svn.branch): Check if relative URL path contains local path before stripping local path.

Modified Paths

trunk/Tools/ChangeLog
trunk/Tools/Scripts/libraries/webkitscmpy/setup.py
trunk/Tools/Scripts/libraries/webkitscmpy/webkitscmpy/__init__.py
trunk/Tools/Scripts/libraries/webkitscmpy/webkitscmpy/local/svn.py




Diff

Modified: trunk/Tools/ChangeLog (281022 => 281023)

--- trunk/Tools/ChangeLog	2021-08-13 16:50:38 UTC (rev 281022)
+++ trunk/Tools/ChangeLog	2021-08-13 17:24:16 UTC (rev 281023)
@@ -1,3 +1,16 @@
+2021-08-13  Jonathan Bedard  
+
+[webkitscmpy] Fix SVN relative URL parsing
+https://bugs.webkit.org/show_bug.cgi?id=229075
+
+
+Reviewed by Aakash Jain.
+
+* Scripts/libraries/webkitscmpy/setup.py: Bump version.
+* Scripts/libraries/webkitscmpy/webkitscmpy/__init__.py: Ditto.
+* Scripts/libraries/webkitscmpy/webkitscmpy/local/svn.py:
+(Svn.branch): Check if relative URL path contains local path before stripping local path. 
+
 2021-08-13  Lauro Moura  
 
 [WPE] WebExtension API test /webkit/WebKitWebView/web-process-crashed is flaky failing


Modified: trunk/Tools/Scripts/libraries/webkitscmpy/setup.py (281022 => 281023)

--- trunk/Tools/Scripts/libraries/webkitscmpy/setup.py	2021-08-13 16:50:38 UTC (rev 281022)
+++ trunk/Tools/Scripts/libraries/webkitscmpy/setup.py	2021-08-13 17:24:16 UTC (rev 281023)
@@ -29,7 +29,7 @@
 
 setup(
 name='webkitscmpy',
-version='1.1.1',
+version='1.1.2',
 description='Library designed to interact with git and svn repositories.',
 long_description=readme(),
 classifiers=[


Modified: trunk/Tools/Scripts/libraries/webkitscmpy/webkitscmpy/__init__.py (281022 => 281023)

--- trunk/Tools/Scripts/libraries/webkitscmpy/webkitscmpy/__init__.py	2021-08-13 16:50:38 UTC (rev 281022)
+++ trunk/Tools/Scripts/libraries/webkitscmpy/webkitscmpy/__init__.py	2021-08-13 17:24:16 UTC (rev 281023)
@@ -46,7 +46,7 @@
 "Please install webkitcorepy with `pip install webkitcorepy --extra-index-url `"
 )
 
-version = Version(1, 1, 1)
+version = Version(1, 1, 2)
 
 AutoInstall.register(Package('fasteners', Version(0, 15, 0)))
 AutoInstall.register(Package('monotonic', Version(1, 5)))


Modified: trunk/Tools/Scripts/libraries/webkitscmpy/webkitscmpy/local/svn.py (281022 => 281023)

--- trunk/Tools/Scripts/libraries/webkitscmpy/webkitscmpy/local/svn.py	2021-08-13 16:50:38 UTC (rev 281022)
+++ trunk/Tools/Scripts/libraries/webkitscmpy/webkitscmpy/local/svn.py	2021-08-13 17:24:16 UTC (rev 281023)
@@ -264,9 +264,10 @@
 @property
 def branch(self):
 local_path = self.path[len(self.root_path):]
-if local_path:
-return self.info()['Relative URL'][2:-len(local_path)]
-return self.info()['Relative URL'][2:]
+relative_url = self.info()['Relative URL']
+if local_path and relative_url.endswith(local_path):
+return relative_url[2:-len(local_path)]
+return relative_url[2:]
 
 def list(self, category):
 list_result = run([self.executable(), 'list', '^/{}'.format(category)], cwd=self.root_path, capture_output=True, encoding='utf-8')






___
webkit-changes mailing list
webkit-changes@lists.webkit.org
https://lists.webkit.org/mailman/listinfo/webkit-changes


[webkit-changes] [280967] trunk/Tools

2021-08-12 Thread jbedard
Title: [280967] trunk/Tools








Revision 280967
Author jbed...@apple.com
Date 2021-08-12 08:23:37 -0700 (Thu, 12 Aug 2021)


Log Message
[check-github-mirror-integrity] Differentiate between slow sync and collapsed commits
https://bugs.webkit.org/show_bug.cgi?id=229004


Reviewed by Aakash Jain.

* Scripts/check-github-mirror-integrity: Use commit timestamps to differentiate between a slow sync between svn.webkit.org
and GitHub and git-svn combining commits

Modified Paths

trunk/Tools/ChangeLog
trunk/Tools/Scripts/check-github-mirror-integrity




Diff

Modified: trunk/Tools/ChangeLog (280966 => 280967)

--- trunk/Tools/ChangeLog	2021-08-12 13:53:44 UTC (rev 280966)
+++ trunk/Tools/ChangeLog	2021-08-12 15:23:37 UTC (rev 280967)
@@ -1,3 +1,14 @@
+2021-08-12  Jonathan Bedard  
+
+[check-github-mirror-integrity] Differentiate between slow sync and collapsed commits
+https://bugs.webkit.org/show_bug.cgi?id=229004
+
+
+Reviewed by Aakash Jain.
+
+* Scripts/check-github-mirror-integrity: Use commit timestamps to differentiate between a slow sync between svn.webkit.org
+and GitHub and git-svn combining commits
+
 2021-08-12  Carlos Garcia Campos  
 
 [GTK] Simplify TestWebKitAccessibility


Modified: trunk/Tools/Scripts/check-github-mirror-integrity (280966 => 280967)

--- trunk/Tools/Scripts/check-github-mirror-integrity	2021-08-12 13:53:44 UTC (rev 280966)
+++ trunk/Tools/Scripts/check-github-mirror-integrity	2021-08-12 15:23:37 UTC (rev 280967)
@@ -27,9 +27,13 @@
 import time
 
 from webkitpy import webkitscmpy
+from webkitcorepy.string_utils import pluralize
 from webkitscmpy import local, remote
 
 
+SYNC_TIME_LIMIT = 5 * 60  # 5 minutes
+
+
 def main():
 cache_path = None
 try:
@@ -44,19 +48,26 @@
 mirror_tip = mirror.commit(branch='main')
 canonical_tip = repository.commit(branch='trunk')
 
-if mirror_tip.identifier == canonical_tip.identifier:
+timestamps_equal = mirror_tip.timestamp == canonical_tip.timestamp
+
+if timestamps_equal and mirror_tip.identifier == canonical_tip.identifier:
 print('GitHub and svn.webkit.org are in sync')
 print(f'HEAD commit on GitHub {mirror_tip} matches HEAD commit on svn.webkit.org {canonical_tip}')
 return 0
 
-if time.time() >= canonical_tip.timestamp - 5 * 60 and mirror_tip.identifier == canonical_tip.identifier - 1:
-print('GitHub is 1 commit behind svn.webkit.org. This is ok.')
+if timestamps_equal and mirror_tip.identifier != canonical_tip.identifier:
+print('ERROR: GitHub and svn.webkit.org are out of sync')
+print(f'HEAD commit on GitHub {mirror_tip} out of sync with HEAD commit on svn.webkit.org {canonical_tip}')
+return 1
+
+difference = canonical_tip.identifier - mirror_tip.identifier
+if time.time() < canonical_tip.timestamp + SYNC_TIME_LIMIT:
+print('GitHub is {} behind svn.webkit.org, but might be updating, This is ok.'.format(pluralize(difference, 'commit')))
 print(f'HEAD commit on GitHub {mirror_tip} slightly behind HEAD commit on svn.webkit.org {canonical_tip}')
 return 0
 
-print('ERROR: GitHub and svn.webkit.org are out of sync')
+print('ERROR: GitHub is not syncing from svn.webkit.org and is {} behind'.format(pluralize(difference, 'commit')))
 print(f'HEAD commit on GitHub {mirror_tip} out of sync with HEAD commit on svn.webkit.org {canonical_tip}')
-print('This indicates a serious error with the repository, please inform ad...@webkit.org urgently')
 return 1
 
 






___
webkit-changes mailing list
webkit-changes@lists.webkit.org
https://lists.webkit.org/mailman/listinfo/webkit-changes


[webkit-changes] [280882] trunk/Tools

2021-08-10 Thread jbedard
Title: [280882] trunk/Tools








Revision 280882
Author jbed...@apple.com
Date 2021-08-10 21:09:33 -0700 (Tue, 10 Aug 2021)


Log Message
[webkitpy] Stop relying on device.plist for simulated device state
https://bugs.webkit.org/show_bug.cgi?id=228974


Reviewed by Stephanie Lewis.

* Scripts/webkitpy/xcode/simulated_device.py:
(SimulatedDeviceManager):
(SimulatedDeviceManager.populate_available_devices): Device state check is now shared between simulators.
(SimulatedDeviceManager._disambiguate_device_type): Only extract hardware family and type from candidate.
(SimulatedDevice.__init__): Device state check is now shared between simulators.
(SimulatedDevice.state): Use 'xcrun simctl list' instead of device.plist.
* Scripts/webkitpy/xcode/simulated_device_unittest.py:
(SimulatedDeviceTest.change_state_to): Deleted.
(SimulatedDeviceTest.test_swapping_devices): Deleted.

Modified Paths

trunk/Tools/ChangeLog
trunk/Tools/Scripts/webkitpy/xcode/simulated_device.py
trunk/Tools/Scripts/webkitpy/xcode/simulated_device_unittest.py




Diff

Modified: trunk/Tools/ChangeLog (280881 => 280882)

--- trunk/Tools/ChangeLog	2021-08-11 02:58:01 UTC (rev 280881)
+++ trunk/Tools/ChangeLog	2021-08-11 04:09:33 UTC (rev 280882)
@@ -1,3 +1,21 @@
+2021-08-10  Jonathan Bedard  
+
+[webkitpy] Stop relying on device.plist for simulated device state
+https://bugs.webkit.org/show_bug.cgi?id=228974
+
+
+Reviewed by Stephanie Lewis.
+
+* Scripts/webkitpy/xcode/simulated_device.py:
+(SimulatedDeviceManager):
+(SimulatedDeviceManager.populate_available_devices): Device state check is now shared between simulators.
+(SimulatedDeviceManager._disambiguate_device_type): Only extract hardware family and type from candidate.
+(SimulatedDevice.__init__): Device state check is now shared between simulators.
+(SimulatedDevice.state): Use 'xcrun simctl list' instead of device.plist.
+* Scripts/webkitpy/xcode/simulated_device_unittest.py:
+(SimulatedDeviceTest.change_state_to): Deleted.
+(SimulatedDeviceTest.test_swapping_devices): Deleted.
+
 2021-08-10  Cameron McCormack  
 
 Restore color profiles correctly on displays with multiple named modes


Modified: trunk/Tools/Scripts/webkitpy/xcode/simulated_device.py (280881 => 280882)

--- trunk/Tools/Scripts/webkitpy/xcode/simulated_device.py	2021-08-11 02:58:01 UTC (rev 280881)
+++ trunk/Tools/Scripts/webkitpy/xcode/simulated_device.py	2021-08-11 04:09:33 UTC (rev 280882)
@@ -80,6 +80,7 @@
 simulator_bundle_id = 'com.apple.iphonesimulator'
 _device_identifier_to_name = {}
 _managing_simulator_app = False
+_last_updated_state = 0
 
 @staticmethod
 def _create_runtimes(runtimes):
@@ -141,6 +142,7 @@
 SimulatedDeviceManager._device_identifier_to_name = {device['identifier']: device['name'] for device in simctl_json['devicetypes']}
 SimulatedDeviceManager.AVAILABLE_RUNTIMES = SimulatedDeviceManager._create_runtimes(simctl_json['runtimes'])
 
+SimulatedDeviceManager._last_updated_state = time.time()
 for runtime in SimulatedDeviceManager.AVAILABLE_RUNTIMES:
 # Needed for 
 devices = []
@@ -159,7 +161,6 @@
 
 # Update device state from simctl output.
 device.platform_device._state = SimulatedDevice.NAME_FOR_STATE.index(device_json['state'].upper())
-device.platform_device._last_updated_state = time.time()
 return
 
 @staticmethod
@@ -253,7 +254,8 @@
 for _, type_name in reversed(SimulatedDeviceManager._device_identifier_to_name.items()):
 candidate = DeviceType.from_string(type_name)
 if candidate == full_device_type:
-full_device_type = candidate
+full_device_type.hardware_family = candidate.hardware_family
+full_device_type.hardware_type = candidate.hardware_type
 break
 
 full_device_type.check_consistency()
@@ -550,7 +552,6 @@
 self.device_type = device_type
 self.build_version = build_version
 self._state = SimulatedDevice.DeviceState.SHUTTING_DOWN
-self._last_updated_state = time.time()
 
 self.executive = host.executive
 self.filesystem = host.filesystem
@@ -562,16 +563,23 @@
 
 def state(self, force_update=False):
 # Don't allow state to get stale
-if not force_update and time.time() < self._last_updated_state + 1:
+if not force_update and time.time() < SimulatedDeviceManager._last_updated_state + 10:
 return self._state
 
-device_plist = self.filesystem.expanduser(self.filesystem.join(SimulatedDeviceManager.simulator_device_path, self.udid, 'device.plist'))
 try:
-self._state = int(readPlist(self.filesystem.open_binary_file_for_reading(device_plist))['state'])
-except IOError:
+

[webkit-changes] [280869] trunk/Tools

2021-08-10 Thread jbedard
Title: [280869] trunk/Tools








Revision 280869
Author jbed...@apple.com
Date 2021-08-10 15:41:13 -0700 (Tue, 10 Aug 2021)


Log Message
[resultsdbpy] Add results-summary API
https://bugs.webkit.org/show_bug.cgi?id=226894


Reviewed by Aakash Jain.

* Scripts/libraries/resultsdbpy/resultsdbpy/__init__.py: Bump version.
* Scripts/libraries/resultsdbpy/resultsdbpy/controller/api_routes.py:
(APIRoutes.__init__): Add aggregate-results endpoint.
* Scripts/libraries/resultsdbpy/resultsdbpy/controller/commit_controller.py:
(commit_for_query): Add decorator which converts a set of arguments into a single commit.
* Scripts/libraries/resultsdbpy/resultsdbpy/controller/test_controller.py:
(TestController):
(TestController.summarize_test_results): Given a single commit and suite/test combination, compute
the liklihood of each potential result.
* Scripts/libraries/resultsdbpy/resultsdbpy/controller/test_controller_unittest.py:
(TestControllerTest.test_summarize_general): Added.
(TestControllerTest.test_summarize_specific): Added.
(TestControllerTest.test_summarize_expectations): Added.
* Scripts/libraries/resultsdbpy/resultsdbpy/model/commit_context.py:
(CommitContext.find_commits_in_range): Use ascended table if user only provides lower bound.
* Scripts/libraries/resultsdbpy/resultsdbpy/model/commit_context_unittest.py:
(CommitContextTest.test_stash_commits_before): Verify upper bound.
(CommitContextTest.test_svn_commits_before): Ditto.
(CommitContextTest.test_stash_commits_after): Verify lower bound.
(CommitContextTest.test_svn_commits_after): Ditto.
* Scripts/libraries/resultsdbpy/resultsdbpy/view/templates/documentation.html: Add aggregate-results
documentation.
* Scripts/libraries/resultsdbpy/setup.py: Bump version.

Modified Paths

trunk/Tools/ChangeLog
trunk/Tools/Scripts/libraries/resultsdbpy/resultsdbpy/__init__.py
trunk/Tools/Scripts/libraries/resultsdbpy/resultsdbpy/controller/api_routes.py
trunk/Tools/Scripts/libraries/resultsdbpy/resultsdbpy/controller/commit_controller.py
trunk/Tools/Scripts/libraries/resultsdbpy/resultsdbpy/controller/test_controller.py
trunk/Tools/Scripts/libraries/resultsdbpy/resultsdbpy/controller/test_controller_unittest.py
trunk/Tools/Scripts/libraries/resultsdbpy/resultsdbpy/model/commit_context.py
trunk/Tools/Scripts/libraries/resultsdbpy/resultsdbpy/model/commit_context_unittest.py
trunk/Tools/Scripts/libraries/resultsdbpy/resultsdbpy/view/templates/documentation.html
trunk/Tools/Scripts/libraries/resultsdbpy/setup.py




Diff

Modified: trunk/Tools/ChangeLog (280868 => 280869)

--- trunk/Tools/ChangeLog	2021-08-10 22:23:17 UTC (rev 280868)
+++ trunk/Tools/ChangeLog	2021-08-10 22:41:13 UTC (rev 280869)
@@ -1,3 +1,35 @@
+2021-08-09  Jonathan Bedard  
+
+[resultsdbpy] Add results-summary API
+https://bugs.webkit.org/show_bug.cgi?id=226894
+
+
+Reviewed by Aakash Jain.
+
+* Scripts/libraries/resultsdbpy/resultsdbpy/__init__.py: Bump version.
+* Scripts/libraries/resultsdbpy/resultsdbpy/controller/api_routes.py:
+(APIRoutes.__init__): Add aggregate-results endpoint.
+* Scripts/libraries/resultsdbpy/resultsdbpy/controller/commit_controller.py:
+(commit_for_query): Add decorator which converts a set of arguments into a single commit.
+* Scripts/libraries/resultsdbpy/resultsdbpy/controller/test_controller.py:
+(TestController):
+(TestController.summarize_test_results): Given a single commit and suite/test combination, compute
+the liklihood of each potential result.
+* Scripts/libraries/resultsdbpy/resultsdbpy/controller/test_controller_unittest.py:
+(TestControllerTest.test_summarize_general): Added.
+(TestControllerTest.test_summarize_specific): Added.
+(TestControllerTest.test_summarize_expectations): Added.
+* Scripts/libraries/resultsdbpy/resultsdbpy/model/commit_context.py:
+(CommitContext.find_commits_in_range): Use ascended table if user only provides lower bound.
+* Scripts/libraries/resultsdbpy/resultsdbpy/model/commit_context_unittest.py:
+(CommitContextTest.test_stash_commits_before): Verify upper bound.
+(CommitContextTest.test_svn_commits_before): Ditto.
+(CommitContextTest.test_stash_commits_after): Verify lower bound.
+(CommitContextTest.test_svn_commits_after): Ditto.
+* Scripts/libraries/resultsdbpy/resultsdbpy/view/templates/documentation.html: Add aggregate-results
+documentation.
+* Scripts/libraries/resultsdbpy/setup.py: Bump version.
+
 2021-08-10  Tim Horton  
 
 macCatalyst: Flexible viewport tests that dump the window size fail because it doesn't match iPad


Modified: trunk/Tools/Scripts/libraries/resultsdbpy/resultsdbpy/__init__.py (280868 => 280869)

--- trunk/Tools/Scripts/libraries/resultsdbpy/resultsdbpy/__init__.py	2021-08-10 22:23:17 UTC (rev 280868)
+++ trunk/Tools/Scripts/libraries/resultsdbpy/resultsdbpy/__init__.py	

[webkit-changes] [280864] trunk/Tools

2021-08-10 Thread jbedard
Title: [280864] trunk/Tools








Revision 280864
Author jbed...@apple.com
Date 2021-08-10 14:35:31 -0700 (Tue, 10 Aug 2021)


Log Message
[git-webkit] Color `log` output
https://bugs.webkit.org/show_bug.cgi?id=228662


Reviewed by Dewei Zhu.

* Scripts/libraries/webkitcorepy/setup.py: Bump version.
* Scripts/libraries/webkitcorepy/webkitcorepy/__init__.py: Bump version, export Terminal.
* Scripts/libraries/webkitcorepy/webkitcorepy/terminal.py: Added.
(Terminal):
(Terminal.assert_writeable_stream): Assert that the provided object is a writable stream.
(Terminal.supports_color): Check if the provided file supports colored output.
(Terminal.isatty): Check if a stream is an atty, both according to the stream itself and our override.
(Terminal.override_atty): Allow callers to override and declare explicitly if a stream is an atty.
(Terminal.Text): Group text colors and styles.
(Terminal.Style): Group functions modifying style of a stream.
(Terminal.Style.enabled): Check if styled printing is enabled on a stream.
(Terminal.Style.disable): Disable styled printing on a stream.
(Terminal.Style.enable): Enable styled printing on a stream.
(Terminal.Style.is_styled): Check if a stream is currently styled.
(Terminal.Style.__init__): Construct a text style.
(Terminal.Style.__repr__): Output the terminal characters styling a stream.
(Terminal.Style.set): Apply style to a stream.
(Terminal.Style.apply): Apply style to a stream, unapply when exiting context.
* Scripts/libraries/webkitscmpy/setup.py:
* Scripts/libraries/webkitscmpy/webkitscmpy/__init__.py:
* Scripts/libraries/webkitscmpy/webkitscmpy/program/blame.py: Pass isatty to child process.
* Scripts/libraries/webkitscmpy/webkitscmpy/program/command.py:
(FilteredCommand.pager): Pass isatty to child process, ask 'more' to display colors.
(FilteredCommand.main): Color header and error.
* Scripts/libraries/webkitscmpy/webkitscmpy/program/log.py: Pass isatty to child process.
* Scripts/libraries/webkitscmpy/webkitscmpy/test/log_unittest.py: Override atty behavior.

Modified Paths

trunk/Tools/ChangeLog
trunk/Tools/Scripts/libraries/webkitcorepy/setup.py
trunk/Tools/Scripts/libraries/webkitcorepy/webkitcorepy/__init__.py
trunk/Tools/Scripts/libraries/webkitcorepy/webkitcorepy/terminal.py
trunk/Tools/Scripts/libraries/webkitscmpy/setup.py
trunk/Tools/Scripts/libraries/webkitscmpy/webkitscmpy/__init__.py
trunk/Tools/Scripts/libraries/webkitscmpy/webkitscmpy/program/blame.py
trunk/Tools/Scripts/libraries/webkitscmpy/webkitscmpy/program/command.py
trunk/Tools/Scripts/libraries/webkitscmpy/webkitscmpy/program/log.py
trunk/Tools/Scripts/libraries/webkitscmpy/webkitscmpy/test/log_unittest.py




Diff

Modified: trunk/Tools/ChangeLog (280863 => 280864)

--- trunk/Tools/ChangeLog	2021-08-10 21:28:35 UTC (rev 280863)
+++ trunk/Tools/ChangeLog	2021-08-10 21:35:31 UTC (rev 280864)
@@ -1,3 +1,38 @@
+2021-08-10  Jonathan Bedard  
+
+[git-webkit] Color `log` output
+https://bugs.webkit.org/show_bug.cgi?id=228662
+
+
+Reviewed by Dewei Zhu.
+
+* Scripts/libraries/webkitcorepy/setup.py: Bump version.
+* Scripts/libraries/webkitcorepy/webkitcorepy/__init__.py: Bump version, export Terminal.
+* Scripts/libraries/webkitcorepy/webkitcorepy/terminal.py: Added.
+(Terminal):
+(Terminal.assert_writeable_stream): Assert that the provided object is a writable stream.
+(Terminal.supports_color): Check if the provided file supports colored output.
+(Terminal.isatty): Check if a stream is an atty, both according to the stream itself and our override.
+(Terminal.override_atty): Allow callers to override and declare explicitly if a stream is an atty.
+(Terminal.Text): Group text colors and styles.
+(Terminal.Style): Group functions modifying style of a stream.
+(Terminal.Style.enabled): Check if styled printing is enabled on a stream.
+(Terminal.Style.disable): Disable styled printing on a stream.
+(Terminal.Style.enable): Enable styled printing on a stream.
+(Terminal.Style.is_styled): Check if a stream is currently styled.
+(Terminal.Style.__init__): Construct a text style.
+(Terminal.Style.__repr__): Output the terminal characters styling a stream.
+(Terminal.Style.set): Apply style to a stream.
+(Terminal.Style.apply): Apply style to a stream, unapply when exiting context.
+* Scripts/libraries/webkitscmpy/setup.py:
+* Scripts/libraries/webkitscmpy/webkitscmpy/__init__.py:
+* Scripts/libraries/webkitscmpy/webkitscmpy/program/blame.py: Pass isatty to child process.
+* Scripts/libraries/webkitscmpy/webkitscmpy/program/command.py:
+(FilteredCommand.pager): Pass isatty to child process, ask 'more' to display colors.
+(FilteredCommand.main): Color header and error.
+* Scripts/libraries/webkitscmpy/webkitscmpy/program/log.py: Pass isatty to child process.
+* 

[webkit-changes] [280739] trunk/Tools

2021-08-06 Thread jbedard
Title: [280739] trunk/Tools








Revision 280739
Author jbed...@apple.com
Date 2021-08-06 15:16:34 -0700 (Fri, 06 Aug 2021)


Log Message
[git-webkit] Add setup function
https://bugs.webkit.org/show_bug.cgi?id=225985


Reviewed by Dewei Zhu.

* Scripts/libraries/webkitcorepy/setup.py: Bump version.
* Scripts/libraries/webkitcorepy/webkitcorepy/__init__.py: Ditto.
* Scripts/libraries/webkitcorepy/webkitcorepy/credentials.py:
(credentials): Key should be pulled from environment variable with key_name in it.
* Scripts/libraries/webkitscmpy/setup.py: Bump version.
* Scripts/libraries/webkitscmpy/webkitscmpy/__init__.py: Ditto.
* Scripts/libraries/webkitscmpy/webkitscmpy/mocks/local/git.py:
(Git): Move config regexes.
(Git.__init__): Add `git remote add`, `git config` and `git fetch fork`.
(Git.config): Add user.email to default configuration.
(Git.edit_config): Modify configuration file.
* Scripts/libraries/webkitscmpy/webkitscmpy/mocks/remote/git_hub.py:
(GitHub): Add list of forks.
(GitHub.__enter__): Correctly mock token.
(GitHub.request): Add fork check and fork addition.
* Scripts/libraries/webkitscmpy/webkitscmpy/program/__init__.py:
(main): Add setup function.
* Scripts/libraries/webkitscmpy/webkitscmpy/remote/git_hub.py:
(GitHub.credentials): Strip email domain, guide user on token permissions.
* Scripts/libraries/webkitscmpy/webkitscmpy/program/setup.py: Added.
(Setup.github): Ensure that GitHub credentials are in the keychain.
(Setup.git): Set the user for the repository, along with merge strategy.
(Setup.parser):
(Setup.main):
* Scripts/libraries/webkitscmpy/webkitscmpy/test/git_unittest.py:
(test_config): Change user name.
(test_global_config): Ditto.
* Scripts/libraries/webkitscmpy/webkitscmpy/test/setup_unittest.py: Added.
(TestSetup):
(TestSetup.setUp):
(TestSetup.test_svn):
(TestSetup.test_github):
(TestSetup.test_git):
(TestSetup.test_github_checkout):

Modified Paths

trunk/Tools/ChangeLog
trunk/Tools/Scripts/libraries/webkitcorepy/setup.py
trunk/Tools/Scripts/libraries/webkitcorepy/webkitcorepy/__init__.py
trunk/Tools/Scripts/libraries/webkitcorepy/webkitcorepy/credentials.py
trunk/Tools/Scripts/libraries/webkitscmpy/setup.py
trunk/Tools/Scripts/libraries/webkitscmpy/webkitscmpy/__init__.py
trunk/Tools/Scripts/libraries/webkitscmpy/webkitscmpy/mocks/local/git.py
trunk/Tools/Scripts/libraries/webkitscmpy/webkitscmpy/mocks/remote/git_hub.py
trunk/Tools/Scripts/libraries/webkitscmpy/webkitscmpy/program/__init__.py
trunk/Tools/Scripts/libraries/webkitscmpy/webkitscmpy/remote/git_hub.py
trunk/Tools/Scripts/libraries/webkitscmpy/webkitscmpy/test/git_unittest.py


Added Paths

trunk/Tools/Scripts/libraries/webkitscmpy/webkitscmpy/program/setup.py
trunk/Tools/Scripts/libraries/webkitscmpy/webkitscmpy/test/setup_unittest.py




Diff

Modified: trunk/Tools/ChangeLog (280738 => 280739)

--- trunk/Tools/ChangeLog	2021-08-06 22:13:32 UTC (rev 280738)
+++ trunk/Tools/ChangeLog	2021-08-06 22:16:34 UTC (rev 280739)
@@ -1,3 +1,46 @@
+2021-08-06  Jonathan Bedard  
+
+[git-webkit] Add setup function
+https://bugs.webkit.org/show_bug.cgi?id=225985
+
+
+Reviewed by Dewei Zhu.
+
+* Scripts/libraries/webkitcorepy/setup.py: Bump version.
+* Scripts/libraries/webkitcorepy/webkitcorepy/__init__.py: Ditto.
+* Scripts/libraries/webkitcorepy/webkitcorepy/credentials.py:
+(credentials): Key should be pulled from environment variable with key_name in it.
+* Scripts/libraries/webkitscmpy/setup.py: Bump version.
+* Scripts/libraries/webkitscmpy/webkitscmpy/__init__.py: Ditto.
+* Scripts/libraries/webkitscmpy/webkitscmpy/mocks/local/git.py:
+(Git): Move config regexes.
+(Git.__init__): Add `git remote add`, `git config` and `git fetch fork`.
+(Git.config): Add user.email to default configuration.
+(Git.edit_config): Modify configuration file.
+* Scripts/libraries/webkitscmpy/webkitscmpy/mocks/remote/git_hub.py:
+(GitHub): Add list of forks.
+(GitHub.__enter__): Correctly mock token.
+(GitHub.request): Add fork check and fork addition.
+* Scripts/libraries/webkitscmpy/webkitscmpy/program/__init__.py:
+(main): Add setup function.
+* Scripts/libraries/webkitscmpy/webkitscmpy/remote/git_hub.py:
+(GitHub.credentials): Strip email domain, guide user on token permissions.
+* Scripts/libraries/webkitscmpy/webkitscmpy/program/setup.py: Added.
+(Setup.github): Ensure that GitHub credentials are in the keychain.
+(Setup.git): Set the user for the repository, along with merge strategy.
+(Setup.parser):
+(Setup.main):
+* Scripts/libraries/webkitscmpy/webkitscmpy/test/git_unittest.py:
+(test_config): Change user name.
+(test_global_config): Ditto.
+* Scripts/libraries/webkitscmpy/webkitscmpy/test/setup_unittest.py: Added.
+(TestSetup):
+(TestSetup.setUp):
+

[webkit-changes] [280663] trunk/Tools

2021-08-04 Thread jbedard
Title: [280663] trunk/Tools








Revision 280663
Author jbed...@apple.com
Date 2021-08-04 14:29:09 -0700 (Wed, 04 Aug 2021)


Log Message
[check-github-mirror-integrity] Store remote cache in checkout
https://bugs.webkit.org/show_bug.cgi?id=228792


Reviewed by Aakash Jain.

* Scripts/check-github-mirror-integrity: Use the local checkout to store the svn.webkit.org, if possible.
* Scripts/libraries/webkitscmpy/setup.py: Bump version.
* Scripts/libraries/webkitscmpy/webkitscmpy/__init__.py: Ditto.
* Scripts/libraries/webkitscmpy/webkitscmpy/remote/svn.py:
(Svn.__init__): Allow caller to define cache path.
(Svn._cache_path): Deleted.

Modified Paths

trunk/Tools/ChangeLog
trunk/Tools/Scripts/check-github-mirror-integrity
trunk/Tools/Scripts/libraries/webkitscmpy/setup.py
trunk/Tools/Scripts/libraries/webkitscmpy/webkitscmpy/__init__.py
trunk/Tools/Scripts/libraries/webkitscmpy/webkitscmpy/remote/svn.py




Diff

Modified: trunk/Tools/ChangeLog (280662 => 280663)

--- trunk/Tools/ChangeLog	2021-08-04 21:22:39 UTC (rev 280662)
+++ trunk/Tools/ChangeLog	2021-08-04 21:29:09 UTC (rev 280663)
@@ -1,5 +1,20 @@
 2021-08-04  Jonathan Bedard  
 
+[check-github-mirror-integrity] Store remote cache in checkout
+https://bugs.webkit.org/show_bug.cgi?id=228792
+
+
+Reviewed by Aakash Jain.
+
+* Scripts/check-github-mirror-integrity: Use the local checkout to store the svn.webkit.org, if possible.
+* Scripts/libraries/webkitscmpy/setup.py: Bump version.
+* Scripts/libraries/webkitscmpy/webkitscmpy/__init__.py: Ditto.
+* Scripts/libraries/webkitscmpy/webkitscmpy/remote/svn.py:
+(Svn.__init__): Allow caller to define cache path.
+(Svn._cache_path): Deleted.
+
+2021-08-04  Jonathan Bedard  
+
 [check-github-mirror-integrity] Compare current time to canonical time
 https://bugs.webkit.org/show_bug.cgi?id=228787
 


Modified: trunk/Tools/Scripts/check-github-mirror-integrity (280662 => 280663)

--- trunk/Tools/Scripts/check-github-mirror-integrity	2021-08-04 21:22:39 UTC (rev 280662)
+++ trunk/Tools/Scripts/check-github-mirror-integrity	2021-08-04 21:29:09 UTC (rev 280663)
@@ -27,12 +27,19 @@
 import time
 
 from webkitpy import webkitscmpy
-from webkitscmpy import remote
+from webkitscmpy import local, remote
 
 
 def main():
+cache_path = None
+try:
+repo = local.Scm.from_path(os.path.dirname(__file__))
+cache_path = os.path.join(repo.root_path, '.git' if repo.is_git else '.svn', 'svn-webkit-org-cache.json')
+except OSError:
+pass
+
 mirror = remote.GitHub('https://github.com/WebKit/WebKit')
-repository = remote.Svn('https://svn.webkit.org/repository/webkit')
+repository = remote.Svn('https://svn.webkit.org/repository/webkit', cache_path=cache_path)
 
 mirror_tip = mirror.commit(branch='main')
 canonical_tip = repository.commit(branch='trunk')


Modified: trunk/Tools/Scripts/libraries/webkitscmpy/setup.py (280662 => 280663)

--- trunk/Tools/Scripts/libraries/webkitscmpy/setup.py	2021-08-04 21:22:39 UTC (rev 280662)
+++ trunk/Tools/Scripts/libraries/webkitscmpy/setup.py	2021-08-04 21:29:09 UTC (rev 280663)
@@ -29,7 +29,7 @@
 
 setup(
 name='webkitscmpy',
-version='1.0.5',
+version='1.0.6',
 description='Library designed to interact with git and svn repositories.',
 long_description=readme(),
 classifiers=[


Modified: trunk/Tools/Scripts/libraries/webkitscmpy/webkitscmpy/__init__.py (280662 => 280663)

--- trunk/Tools/Scripts/libraries/webkitscmpy/webkitscmpy/__init__.py	2021-08-04 21:22:39 UTC (rev 280662)
+++ trunk/Tools/Scripts/libraries/webkitscmpy/webkitscmpy/__init__.py	2021-08-04 21:29:09 UTC (rev 280663)
@@ -46,7 +46,7 @@
 "Please install webkitcorepy with `pip install webkitcorepy --extra-index-url `"
 )
 
-version = Version(1, 0, 5)
+version = Version(1, 0, 6)
 
 AutoInstall.register(Package('fasteners', Version(0, 15, 0)))
 AutoInstall.register(Package('monotonic', Version(1, 5)))


Modified: trunk/Tools/Scripts/libraries/webkitscmpy/webkitscmpy/remote/svn.py (280662 => 280663)

--- trunk/Tools/Scripts/libraries/webkitscmpy/webkitscmpy/remote/svn.py	2021-08-04 21:22:39 UTC (rev 280662)
+++ trunk/Tools/Scripts/libraries/webkitscmpy/webkitscmpy/remote/svn.py	2021-08-04 21:29:09 UTC (rev 280663)
@@ -46,7 +46,7 @@
 def is_webserver(cls, url):
 return True if cls.URL_RE.match(url) else False
 
-def __init__(self, url, dev_branches=None, prod_branches=None, contributors=None, id=None):
+def __init__(self, url, dev_branches=None, prod_branches=None, contributors=None, id=None, cache_path=None):
 if url[-1] != '/':
 url += '/'
 if not self.is_webserver(url):
@@ -59,6 +59,14 @@
 id=id or url.split('/')[-2].lower(),
 )
 
+if not cache_path:
+from webkitscmpy.mocks import remote
+host = 

[webkit-changes] [280655] trunk/Tools

2021-08-04 Thread jbedard
Title: [280655] trunk/Tools








Revision 280655
Author jbed...@apple.com
Date 2021-08-04 13:44:38 -0700 (Wed, 04 Aug 2021)


Log Message
[check-github-mirror-integrity] Compare current time to canonical time
https://bugs.webkit.org/show_bug.cgi?id=228787


Reviewed by Aakash Jain.

* Scripts/check-github-mirror-integrity: If the mirror isn't in line with the canonical repository, we should
check against the current time, not the time of last commit on the mirror.

Modified Paths

trunk/Tools/ChangeLog
trunk/Tools/Scripts/check-github-mirror-integrity




Diff

Modified: trunk/Tools/ChangeLog (280654 => 280655)

--- trunk/Tools/ChangeLog	2021-08-04 20:28:16 UTC (rev 280654)
+++ trunk/Tools/ChangeLog	2021-08-04 20:44:38 UTC (rev 280655)
@@ -1,3 +1,14 @@
+2021-08-04  Jonathan Bedard  
+
+[check-github-mirror-integrity] Compare current time to canonical time
+https://bugs.webkit.org/show_bug.cgi?id=228787
+
+
+Reviewed by Aakash Jain.
+
+* Scripts/check-github-mirror-integrity: If the mirror isn't in line with the canonical repository, we should
+check against the current time, not the time of last commit on the mirror.
+
 2021-08-03  Myles C. Maxfield  
 
 [Cocoa] Tweak the formatting for passing NSArrays to TextStreams


Modified: trunk/Tools/Scripts/check-github-mirror-integrity (280654 => 280655)

--- trunk/Tools/Scripts/check-github-mirror-integrity	2021-08-04 20:28:16 UTC (rev 280654)
+++ trunk/Tools/Scripts/check-github-mirror-integrity	2021-08-04 20:44:38 UTC (rev 280655)
@@ -24,6 +24,7 @@
 
 import os
 import sys
+import time
 
 from webkitpy import webkitscmpy
 from webkitscmpy import remote
@@ -41,7 +42,7 @@
 print(f'HEAD commit on GitHub {mirror_tip} matches HEAD commit on svn.webkit.org {canonical_tip}')
 return 0
 
-if mirror_tip.timestamp >= canonical_tip.timestamp - 5 * 60 and mirror_tip.identifier == canonical_tip.identifier - 1:
+if time.time() >= canonical_tip.timestamp - 5 * 60 and mirror_tip.identifier == canonical_tip.identifier - 1:
 print('GitHub is 1 commit behind svn.webkit.org. This is ok.')
 print(f'HEAD commit on GitHub {mirror_tip} slightly behind HEAD commit on svn.webkit.org {canonical_tip}')
 return 0






___
webkit-changes mailing list
webkit-changes@lists.webkit.org
https://lists.webkit.org/mailman/listinfo/webkit-changes


[webkit-changes] [280640] trunk/Tools

2021-08-04 Thread jbedard
Title: [280640] trunk/Tools








Revision 280640
Author jbed...@apple.com
Date 2021-08-04 10:58:51 -0700 (Wed, 04 Aug 2021)


Log Message
[webkitcorepy] Add shared terminal input code
https://bugs.webkit.org/show_bug.cgi?id=226024


Reviewed by Dewei Zhu.

* Scripts/libraries/webkitcorepy/setup.py: Bump version.
* Scripts/libraries/webkitcorepy/webkitcorepy/__init__.py: Export Terminal object, bump version.
* Scripts/libraries/webkitcorepy/webkitcorepy/credentials.py:
(credentials): Use Terminal.input.
* Scripts/libraries/webkitcorepy/webkitcorepy/mocks/__init__.py:
* Scripts/libraries/webkitcorepy/webkitcorepy/mocks/terminal.py: Added.
(Terminal):
(Terminal.input): Mocking input and raw_input requires so specialized knowledge,
so we should generalize it.
* Scripts/libraries/webkitcorepy/webkitcorepy/terminal.py: Added.
(Terminal):
(Terminal.input): Python 2/3 compatible input function.
(Terminal.choose): Generic multiple-choice input prompt.
* Scripts/libraries/webkitcorepy/webkitcorepy/tests/terminal_unittest.py: Added.
(TerminalTests):
(TerminalTests.test_choose_basic):
(TerminalTests.test_choose_strict):
(TerminalTests.test_choose_default):
(TerminalTests.test_choose_triple):
(TerminalTests.test_choose_number):
* Scripts/webkitpy/common/system/user.py:
(User.prompt): Use Terminal.input.
(User.prompt_with_multiple_lists): Ditto.
(User.prompt_with_list): Ditto.
(User.confirm): Ditto.
* Scripts/webkitpy/common/system/user_mock.py:
(MockUser.prompt): Use Terminal.input.
(MockUser.prompt_with_list): Ditto.

Modified Paths

trunk/Tools/ChangeLog
trunk/Tools/Scripts/libraries/webkitcorepy/setup.py
trunk/Tools/Scripts/libraries/webkitcorepy/webkitcorepy/__init__.py
trunk/Tools/Scripts/libraries/webkitcorepy/webkitcorepy/credentials.py
trunk/Tools/Scripts/libraries/webkitcorepy/webkitcorepy/mocks/__init__.py
trunk/Tools/Scripts/webkitpy/common/system/user.py
trunk/Tools/Scripts/webkitpy/common/system/user_mock.py


Added Paths

trunk/Tools/Scripts/libraries/webkitcorepy/webkitcorepy/mocks/terminal.py
trunk/Tools/Scripts/libraries/webkitcorepy/webkitcorepy/terminal.py
trunk/Tools/Scripts/libraries/webkitcorepy/webkitcorepy/tests/terminal_unittest.py




Diff

Modified: trunk/Tools/ChangeLog (280639 => 280640)

--- trunk/Tools/ChangeLog	2021-08-04 17:43:14 UTC (rev 280639)
+++ trunk/Tools/ChangeLog	2021-08-04 17:58:51 UTC (rev 280640)
@@ -1,3 +1,40 @@
+2021-08-04  Jonathan Bedard  
+
+[webkitcorepy] Add shared terminal input code
+https://bugs.webkit.org/show_bug.cgi?id=226024
+
+
+Reviewed by Dewei Zhu.
+
+* Scripts/libraries/webkitcorepy/setup.py: Bump version.
+* Scripts/libraries/webkitcorepy/webkitcorepy/__init__.py: Export Terminal object, bump version.
+* Scripts/libraries/webkitcorepy/webkitcorepy/credentials.py:
+(credentials): Use Terminal.input.
+* Scripts/libraries/webkitcorepy/webkitcorepy/mocks/__init__.py:
+* Scripts/libraries/webkitcorepy/webkitcorepy/mocks/terminal.py: Added.
+(Terminal):
+(Terminal.input): Mocking input and raw_input requires so specialized knowledge,
+so we should generalize it.
+* Scripts/libraries/webkitcorepy/webkitcorepy/terminal.py: Added.
+(Terminal):
+(Terminal.input): Python 2/3 compatible input function.
+(Terminal.choose): Generic multiple-choice input prompt.
+* Scripts/libraries/webkitcorepy/webkitcorepy/tests/terminal_unittest.py: Added.
+(TerminalTests):
+(TerminalTests.test_choose_basic):
+(TerminalTests.test_choose_strict):
+(TerminalTests.test_choose_default):
+(TerminalTests.test_choose_triple):
+(TerminalTests.test_choose_number):
+* Scripts/webkitpy/common/system/user.py:
+(User.prompt): Use Terminal.input.
+(User.prompt_with_multiple_lists): Ditto.
+(User.prompt_with_list): Ditto.
+(User.confirm): Ditto.
+* Scripts/webkitpy/common/system/user_mock.py:
+(MockUser.prompt): Use Terminal.input.
+(MockUser.prompt_with_list): Ditto.
+
 2021-08-04  Andres Gonzalez  
 
 Add contributor to accessibility watchlist.


Modified: trunk/Tools/Scripts/libraries/webkitcorepy/setup.py (280639 => 280640)

--- trunk/Tools/Scripts/libraries/webkitcorepy/setup.py	2021-08-04 17:43:14 UTC (rev 280639)
+++ trunk/Tools/Scripts/libraries/webkitcorepy/setup.py	2021-08-04 17:58:51 UTC (rev 280640)
@@ -30,7 +30,7 @@
 
 setup(
 name='webkitcorepy',
-version='0.7.4',
+version='0.8.0',
 description='Library containing various Python support classes and functions.',
 long_description=readme(),
 classifiers=[


Modified: trunk/Tools/Scripts/libraries/webkitcorepy/webkitcorepy/__init__.py (280639 => 280640)

--- trunk/Tools/Scripts/libraries/webkitcorepy/webkitcorepy/__init__.py	2021-08-04 17:43:14 UTC (rev 280639)
+++ trunk/Tools/Scripts/libraries/webkitcorepy/webkitcorepy/__init__.py	2021-08-04 17:58:51 

[webkit-changes] [280622] trunk/Tools

2021-08-03 Thread jbedard
Title: [280622] trunk/Tools








Revision 280622
Author jbed...@apple.com
Date 2021-08-03 16:40:10 -0700 (Tue, 03 Aug 2021)


Log Message
[webkitpy] Handle case where no existing simulators are defined
https://bugs.webkit.org/show_bug.cgi?id=228758


Reviewed by Ryan Haddad.

* Scripts/webkitpy/xcode/simulated_device.py:
(SimulatedDeviceManager._disambiguate_device_type): If there are no available devices,
find the newest device identifier which matches the requested type.

Modified Paths

trunk/Tools/ChangeLog
trunk/Tools/Scripts/webkitpy/xcode/simulated_device.py




Diff

Modified: trunk/Tools/ChangeLog (280621 => 280622)

--- trunk/Tools/ChangeLog	2021-08-03 23:14:44 UTC (rev 280621)
+++ trunk/Tools/ChangeLog	2021-08-03 23:40:10 UTC (rev 280622)
@@ -1,5 +1,17 @@
 2021-08-03  Jonathan Bedard  
 
+[webkitpy] Handle case where no existing simulators are defined
+https://bugs.webkit.org/show_bug.cgi?id=228758
+
+
+Reviewed by Ryan Haddad.
+
+* Scripts/webkitpy/xcode/simulated_device.py:
+(SimulatedDeviceManager._disambiguate_device_type): If there are no available devices,
+find the newest device identifier which matches the requested type.
+
+2021-08-03  Jonathan Bedard  
+
 [build.webkit.org] Simulator temp files filling up disk (Follow-up fix)
 https://bugs.webkit.org/show_bug.cgi?id=228335
 


Modified: trunk/Tools/Scripts/webkitpy/xcode/simulated_device.py (280621 => 280622)

--- trunk/Tools/Scripts/webkitpy/xcode/simulated_device.py	2021-08-03 23:14:44 UTC (rev 280621)
+++ trunk/Tools/Scripts/webkitpy/xcode/simulated_device.py	2021-08-03 23:40:10 UTC (rev 280622)
@@ -243,12 +243,19 @@
 
 if full_device_type.hardware_type is None:
 # Again, we use the existing devices to determine a legal hardware type
-for name in SimulatedDeviceManager._device_identifier_to_name.values():
-type_from_name = DeviceType.from_string(name)
-if type_from_name == full_device_type:
-full_device_type.hardware_type = type_from_name.hardware_type
+for device in SimulatedDeviceManager.AVAILABLE_DEVICES:
+if device.device_type == full_device_type:
+full_device_type.hardware_type = device.device_type.hardware_type
 break
 
+if not full_device_type.hardware_family or not full_device_type.hardware_type:
+# If we couldn't define a device with existing devices, pick the newest matching device type
+for _, type_name in reversed(SimulatedDeviceManager._device_identifier_to_name.items()):
+candidate = DeviceType.from_string(type_name)
+if candidate == full_device_type:
+full_device_type = candidate
+break
+
 full_device_type.check_consistency()
 return full_device_type
 






___
webkit-changes mailing list
webkit-changes@lists.webkit.org
https://lists.webkit.org/mailman/listinfo/webkit-changes


[webkit-changes] [280621] trunk/Tools

2021-08-03 Thread jbedard
Title: [280621] trunk/Tools








Revision 280621
Author jbed...@apple.com
Date 2021-08-03 16:14:44 -0700 (Tue, 03 Aug 2021)


Log Message
[build.webkit.org] Simulator temp files filling up disk (Follow-up fix)
https://bugs.webkit.org/show_bug.cgi?id=228335


Reviewed by Ryan Haddad.

* CISupport/kill-old-processes:
(main): Use tempdir environment variable, link to underlying bug.

Modified Paths

trunk/Tools/CISupport/kill-old-processes
trunk/Tools/ChangeLog




Diff

Modified: trunk/Tools/CISupport/kill-old-processes (280620 => 280621)

--- trunk/Tools/CISupport/kill-old-processes	2021-08-03 22:52:11 UTC (rev 280620)
+++ trunk/Tools/CISupport/kill-old-processes	2021-08-03 23:14:44 UTC (rev 280621)
@@ -28,6 +28,7 @@
 import getpass
 import re
 import subprocess
+import tempfile
 
 def listAllWebKitPrograms(builddir_bin):
 foundWebKitPrograms = []
@@ -172,8 +173,8 @@
 os.system("xcrun simctl shutdown booted")
 # Kill all instances of python executing run-webkit-tests
 os.system("ps aux | grep -E '.+/Python .+(run_webkit_tests|run-webkit-tests|mod_pywebsocket)' | grep -v grep | awk '{print $2}' | xargs kill")
-# Remove stale simulator temp files
-os.system('find /private/var/folders -name "Deleting-*" -maxdepth 4 -exec sudo rm -rf {} +')
+# FIXME:  Remove stale simulator temp files
+os.system('find {} -name "Deleting-*" -maxdepth 1 -exec sudo rm -rf {{}} +'.format(tempfile.gettempdir()))
 elif sys.platform == 'cygwin' or sys.platform == 'win32':
 for task in tasksToKill + tasksToKillWin:
 os.system("taskkill /t /f /im " + task)


Modified: trunk/Tools/ChangeLog (280620 => 280621)

--- trunk/Tools/ChangeLog	2021-08-03 22:52:11 UTC (rev 280620)
+++ trunk/Tools/ChangeLog	2021-08-03 23:14:44 UTC (rev 280621)
@@ -1,3 +1,14 @@
+2021-08-03  Jonathan Bedard  
+
+[build.webkit.org] Simulator temp files filling up disk (Follow-up fix)
+https://bugs.webkit.org/show_bug.cgi?id=228335
+
+
+Reviewed by Ryan Haddad.
+
+* CISupport/kill-old-processes:
+(main): Use tempdir environment variable, link to underlying bug.
+
 2021-08-03  Jer Noble  
 
 WebKitTestRunner should dump current results in the case of a timeout






___
webkit-changes mailing list
webkit-changes@lists.webkit.org
https://lists.webkit.org/mailman/listinfo/webkit-changes


[webkit-changes] [280618] trunk/Tools

2021-08-03 Thread jbedard
Title: [280618] trunk/Tools








Revision 280618
Author jbed...@apple.com
Date 2021-08-03 15:17:14 -0700 (Tue, 03 Aug 2021)


Log Message
[webkitpy] Narrow set of terminated simulator processes
https://bugs.webkit.org/show_bug.cgi?id=228752


Reviewed by Alexey Proskuryakov.

* Scripts/webkitpy/xcode/simulated_device.py:
(SimulatedDeviceManager.initialize_devices): Only check Simulator.app.
(SimulatedDeviceManager.tear_down): Only kill Simulator.app processes.
(SimulatedDevice._delete): Print error if `simctl delete` fails, but continue.

Modified Paths

trunk/Tools/ChangeLog
trunk/Tools/Scripts/webkitpy/xcode/simulated_device.py




Diff

Modified: trunk/Tools/ChangeLog (280617 => 280618)

--- trunk/Tools/ChangeLog	2021-08-03 22:11:21 UTC (rev 280617)
+++ trunk/Tools/ChangeLog	2021-08-03 22:17:14 UTC (rev 280618)
@@ -1,5 +1,18 @@
 2021-08-03  Jonathan Bedard  
 
+[webkitpy] Narrow set of terminated simulator processes
+https://bugs.webkit.org/show_bug.cgi?id=228752
+
+
+Reviewed by Alexey Proskuryakov.
+
+* Scripts/webkitpy/xcode/simulated_device.py:
+(SimulatedDeviceManager.initialize_devices): Only check Simulator.app.
+(SimulatedDeviceManager.tear_down): Only kill Simulator.app processes.
+(SimulatedDevice._delete): Print error if `simctl delete` fails, but continue.
+
+2021-08-03  Jonathan Bedard  
+
 [webkitscmpy] Add access to `git config`
 https://bugs.webkit.org/show_bug.cgi?id=228597
 


Modified: trunk/Tools/Scripts/webkitpy/xcode/simulated_device.py (280617 => 280618)

--- trunk/Tools/Scripts/webkitpy/xcode/simulated_device.py	2021-08-03 22:11:21 UTC (rev 280617)
+++ trunk/Tools/Scripts/webkitpy/xcode/simulated_device.py	2021-08-03 22:17:14 UTC (rev 280618)
@@ -422,7 +422,7 @@
 
 SimulatedDeviceManager._boot_device(device, host)
 
-if simulator_ui and host.executive.run_command(['killall', '-0', 'Simulator'], return_exit_code=True) != 0:
+if simulator_ui and host.executive.run_command(['killall', '-0', 'Simulator.app'], return_exit_code=True) != 0:
 SimulatedDeviceManager._managing_simulator_app = not host.executive.run_command(['open', '-g', '-b', SimulatedDeviceManager.simulator_bundle_id, '--args', '-PasteboardAutomaticSync', '0'], return_exit_code=True)
 
 deadline = time.time() + timeout
@@ -489,7 +489,7 @@
 def tear_down(host=None, timeout=SIMULATOR_BOOT_TIMEOUT):
 host = host or SystemHost()
 if SimulatedDeviceManager._managing_simulator_app:
-host.executive.run_command(['killall', '-9', 'Simulator'], return_exit_code=True)
+host.executive.run_command(['killall', '-9', 'Simulator.app'], return_exit_code=True)
 SimulatedDeviceManager._managing_simulator_app = False
 
 if SimulatedDeviceManager.INITIALIZED_DEVICES is None:
@@ -505,10 +505,6 @@
 
 SimulatedDeviceManager.INITIALIZED_DEVICES = None
 
-if SimulatedDeviceManager._managing_simulator_app:
-for pid in host.executive.running_pids(lambda name: 'CoreSimulator.framework' in name):
-host.executive.kill_process(pid)
-
 # If we were managing the simulator, there are some cache files we need to remove
 for directory in host.filesystem.glob('/tmp/com.apple.CoreSimulator.SimDevice.*'):
 host.filesystem.rmtree(directory)
@@ -607,7 +603,8 @@
 deadline = time.time() + timeout
 self._shut_down(deadline - time.time())
 _log.debug(u"Removing device '{}'".format(self.name))
-self.executive.run_command([SimulatedDeviceManager.xcrun, 'simctl', 'delete', self.udid])
+if self.executive.run_command([SimulatedDeviceManager.xcrun, 'simctl', 'delete', self.udid], return_exit_code=True):
+_log.error(u"Failed to remove '{},' error is not fatal, continuing".format(self.name))
 
 # This will (by design) fail if run more than once on the same SimulatedDevice
 SimulatedDeviceManager.AVAILABLE_DEVICES.remove(self)






___
webkit-changes mailing list
webkit-changes@lists.webkit.org
https://lists.webkit.org/mailman/listinfo/webkit-changes


[webkit-changes] [280604] trunk/Tools

2021-08-03 Thread jbedard
Title: [280604] trunk/Tools








Revision 280604
Author jbed...@apple.com
Date 2021-08-03 12:00:33 -0700 (Tue, 03 Aug 2021)


Log Message
[webkitscmpy] Add access to `git config`
https://bugs.webkit.org/show_bug.cgi?id=228597


Reviewed by Aakash Jain.

* Scripts/libraries/webkitscmpy/setup.py: Bump version.
* Scripts/libraries/webkitscmpy/webkitscmpy/__init__.py: Ditto.
* Scripts/libraries/webkitscmpy/webkitscmpy/local/git.py:
(Git.config): Return git configuration as dictionary.
* Scripts/libraries/webkitscmpy/webkitscmpy/mocks/local/git.py:
* Scripts/libraries/webkitscmpy/webkitscmpy/test/git_unittest.py:
(test_config): Test repository configuration.
(test_global_config): Test global configuration.

Modified Paths

trunk/Tools/ChangeLog
trunk/Tools/Scripts/libraries/webkitscmpy/setup.py
trunk/Tools/Scripts/libraries/webkitscmpy/webkitscmpy/__init__.py
trunk/Tools/Scripts/libraries/webkitscmpy/webkitscmpy/local/git.py
trunk/Tools/Scripts/libraries/webkitscmpy/webkitscmpy/mocks/local/git.py
trunk/Tools/Scripts/libraries/webkitscmpy/webkitscmpy/test/git_unittest.py




Diff

Modified: trunk/Tools/ChangeLog (280603 => 280604)

--- trunk/Tools/ChangeLog	2021-08-03 18:22:46 UTC (rev 280603)
+++ trunk/Tools/ChangeLog	2021-08-03 19:00:33 UTC (rev 280604)
@@ -1,5 +1,22 @@
 2021-08-03  Jonathan Bedard  
 
+[webkitscmpy] Add access to `git config`
+https://bugs.webkit.org/show_bug.cgi?id=228597
+
+
+Reviewed by Aakash Jain.
+
+* Scripts/libraries/webkitscmpy/setup.py: Bump version.
+* Scripts/libraries/webkitscmpy/webkitscmpy/__init__.py: Ditto.
+* Scripts/libraries/webkitscmpy/webkitscmpy/local/git.py:
+(Git.config): Return git configuration as dictionary.
+* Scripts/libraries/webkitscmpy/webkitscmpy/mocks/local/git.py:
+* Scripts/libraries/webkitscmpy/webkitscmpy/test/git_unittest.py:
+(test_config): Test repository configuration.
+(test_global_config): Test global configuration.
+
+2021-08-03  Jonathan Bedard  
+
 [check-github-mirror-integrity] Handle slow Svn query
 https://bugs.webkit.org/show_bug.cgi?id=228741
 


Modified: trunk/Tools/Scripts/libraries/webkitscmpy/setup.py (280603 => 280604)

--- trunk/Tools/Scripts/libraries/webkitscmpy/setup.py	2021-08-03 18:22:46 UTC (rev 280603)
+++ trunk/Tools/Scripts/libraries/webkitscmpy/setup.py	2021-08-03 19:00:33 UTC (rev 280604)
@@ -29,7 +29,7 @@
 
 setup(
 name='webkitscmpy',
-version='1.0.4',
+version='1.0.5',
 description='Library designed to interact with git and svn repositories.',
 long_description=readme(),
 classifiers=[


Modified: trunk/Tools/Scripts/libraries/webkitscmpy/webkitscmpy/__init__.py (280603 => 280604)

--- trunk/Tools/Scripts/libraries/webkitscmpy/webkitscmpy/__init__.py	2021-08-03 18:22:46 UTC (rev 280603)
+++ trunk/Tools/Scripts/libraries/webkitscmpy/webkitscmpy/__init__.py	2021-08-03 19:00:33 UTC (rev 280604)
@@ -46,7 +46,7 @@
 "Please install webkitcorepy with `pip install webkitcorepy --extra-index-url `"
 )
 
-version = Version(1, 0, 4)
+version = Version(1, 0, 5)
 
 AutoInstall.register(Package('fasteners', Version(0, 15, 0)))
 AutoInstall.register(Package('monotonic', Version(1, 5)))


Modified: trunk/Tools/Scripts/libraries/webkitscmpy/webkitscmpy/local/git.py (280603 => 280604)

--- trunk/Tools/Scripts/libraries/webkitscmpy/webkitscmpy/local/git.py	2021-08-03 18:22:46 UTC (rev 280603)
+++ trunk/Tools/Scripts/libraries/webkitscmpy/webkitscmpy/local/git.py	2021-08-03 19:00:33 UTC (rev 280604)
@@ -266,6 +266,30 @@
 def is_checkout(cls, path):
 return run([cls.executable(), 'rev-parse', '--show-toplevel'], cwd=path, capture_output=True).returncode == 0
 
+@decorators.hybridmethod
+def config(context):
+args = [context.executable(), 'config', '-l']
+kwargs = dict(capture_output=True, encoding='utf-8')
+
+if isinstance(context, type):
+args += ['--global']
+else:
+kwargs['cwd'] = context.root_path
+
+command = run(args, **kwargs)
+if command.returncode:
+sys.stderr.write("Failed to run '{}'{}\n".format(
+' '.join(args),
+'' if isinstance(context, type) else ' in {}'.format(context.root_path),
+))
+return {}
+
+result = {}
+for line in command.stdout.splitlines():
+parts = line.split('=')
+result[parts[0]] = '='.join(parts[1:])
+return result
+
 def __init__(self, path, dev_branches=None, prod_branches=None, contributors=None, id=None, cached=sys.version_info > (3, 0)):
 super(Git, self).__init__(path, dev_branches=dev_branches, prod_branches=prod_branches, contributors=contributors, id=id)
 self._branch = None


Modified: trunk/Tools/Scripts/libraries/webkitscmpy/webkitscmpy/mocks/local/git.py (280603 => 280604)

--- 

[webkit-changes] [280602] trunk/Tools

2021-08-03 Thread jbedard
Title: [280602] trunk/Tools








Revision 280602
Author jbed...@apple.com
Date 2021-08-03 10:49:05 -0700 (Tue, 03 Aug 2021)


Log Message
[check-github-mirror-integrity] Handle slow Svn query
https://bugs.webkit.org/show_bug.cgi?id=228741

Reviewed by Aakash Jain.

* Scripts/check-github-mirror-integrity: Pull commit from GitHub before Subversion.

Modified Paths

trunk/Tools/ChangeLog
trunk/Tools/Scripts/check-github-mirror-integrity




Diff

Modified: trunk/Tools/ChangeLog (280601 => 280602)

--- trunk/Tools/ChangeLog	2021-08-03 17:34:48 UTC (rev 280601)
+++ trunk/Tools/ChangeLog	2021-08-03 17:49:05 UTC (rev 280602)
@@ -1,3 +1,12 @@
+2021-08-03  Jonathan Bedard  
+
+[check-github-mirror-integrity] Handle slow Svn query
+https://bugs.webkit.org/show_bug.cgi?id=228741
+
+Reviewed by Aakash Jain.
+
+* Scripts/check-github-mirror-integrity: Pull commit from GitHub before Subversion.
+
 2021-08-03  Philippe Normand  
 
 [WPE][GTK] SVN_REVISION drifting away if bots don't re-run cmake


Modified: trunk/Tools/Scripts/check-github-mirror-integrity (280601 => 280602)

--- trunk/Tools/Scripts/check-github-mirror-integrity	2021-08-03 17:34:48 UTC (rev 280601)
+++ trunk/Tools/Scripts/check-github-mirror-integrity	2021-08-03 17:49:05 UTC (rev 280602)
@@ -30,11 +30,11 @@
 
 
 def main():
-repository = remote.Svn('https://svn.webkit.org/repository/webkit')
 mirror = remote.GitHub('https://github.com/WebKit/WebKit')
+repository = remote.Svn('https://svn.webkit.org/repository/webkit')
 
+mirror_tip = mirror.commit(branch='main')
 canonical_tip = repository.commit(branch='trunk')
-mirror_tip = mirror.commit(branch='main')
 
 if mirror_tip.identifier == canonical_tip.identifier:
 print('GitHub and svn.webkit.org are in sync')






___
webkit-changes mailing list
webkit-changes@lists.webkit.org
https://lists.webkit.org/mailman/listinfo/webkit-changes


[webkit-changes] [280483] trunk/Tools

2021-07-30 Thread jbedard
Title: [280483] trunk/Tools








Revision 280483
Author jbed...@apple.com
Date 2021-07-30 10:46:35 -0700 (Fri, 30 Jul 2021)


Log Message
[git-webkit] Forward errors from log and blame
https://bugs.webkit.org/show_bug.cgi?id=228621


Rubber-stamped by Aakash Jain.

* Scripts/libraries/webkitscmpy/setup.py: Bump version.
* Scripts/libraries/webkitscmpy/webkitscmpy/__init__.py: Ditto.
* Scripts/libraries/webkitscmpy/webkitscmpy/program/command.py:
(FilteredCommand.main): If the exit code is non-zero, print all errors.

Modified Paths

trunk/Tools/ChangeLog
trunk/Tools/Scripts/libraries/webkitscmpy/setup.py
trunk/Tools/Scripts/libraries/webkitscmpy/webkitscmpy/__init__.py
trunk/Tools/Scripts/libraries/webkitscmpy/webkitscmpy/program/command.py




Diff

Modified: trunk/Tools/ChangeLog (280482 => 280483)

--- trunk/Tools/ChangeLog	2021-07-30 17:46:30 UTC (rev 280482)
+++ trunk/Tools/ChangeLog	2021-07-30 17:46:35 UTC (rev 280483)
@@ -1,5 +1,18 @@
 2021-07-30  Jonathan Bedard  
 
+[git-webkit] Forward errors from log and blame
+https://bugs.webkit.org/show_bug.cgi?id=228621
+
+
+Rubber-stamped by Aakash Jain.
+
+* Scripts/libraries/webkitscmpy/setup.py: Bump version.
+* Scripts/libraries/webkitscmpy/webkitscmpy/__init__.py: Ditto.
+* Scripts/libraries/webkitscmpy/webkitscmpy/program/command.py:
+(FilteredCommand.main): If the exit code is non-zero, print all errors.
+
+2021-07-30  Jonathan Bedard  
+
 [git-webkit] Not all platforms support more -F
 https://bugs.webkit.org/show_bug.cgi?id=228619
 


Modified: trunk/Tools/Scripts/libraries/webkitscmpy/setup.py (280482 => 280483)

--- trunk/Tools/Scripts/libraries/webkitscmpy/setup.py	2021-07-30 17:46:30 UTC (rev 280482)
+++ trunk/Tools/Scripts/libraries/webkitscmpy/setup.py	2021-07-30 17:46:35 UTC (rev 280483)
@@ -29,7 +29,7 @@
 
 setup(
 name='webkitscmpy',
-version='1.0.3',
+version='1.0.4',
 description='Library designed to interact with git and svn repositories.',
 long_description=readme(),
 classifiers=[


Modified: trunk/Tools/Scripts/libraries/webkitscmpy/webkitscmpy/__init__.py (280482 => 280483)

--- trunk/Tools/Scripts/libraries/webkitscmpy/webkitscmpy/__init__.py	2021-07-30 17:46:30 UTC (rev 280482)
+++ trunk/Tools/Scripts/libraries/webkitscmpy/webkitscmpy/__init__.py	2021-07-30 17:46:35 UTC (rev 280483)
@@ -46,7 +46,7 @@
 "Please install webkitcorepy with `pip install webkitcorepy --extra-index-url `"
 )
 
-version = Version(1, 0, 3)
+version = Version(1, 0, 4)
 
 AutoInstall.register(Package('fasteners', Version(0, 15, 0)))
 AutoInstall.register(Package('monotonic', Version(1, 5)))


Modified: trunk/Tools/Scripts/libraries/webkitscmpy/webkitscmpy/program/command.py (280482 => 280483)

--- trunk/Tools/Scripts/libraries/webkitscmpy/webkitscmpy/program/command.py	2021-07-30 17:46:30 UTC (rev 280482)
+++ trunk/Tools/Scripts/libraries/webkitscmpy/webkitscmpy/program/command.py	2021-07-30 17:46:35 UTC (rev 280483)
@@ -256,5 +256,7 @@
 line = log_output.stdout.readline()
 
 finally:
+if not log_output.returncode:
+sys.stderr.write(log_output.stderr.read())
 log_output.kill()
 return log_output.returncode






___
webkit-changes mailing list
webkit-changes@lists.webkit.org
https://lists.webkit.org/mailman/listinfo/webkit-changes


[webkit-changes] [280478] trunk/Tools

2021-07-30 Thread jbedard
Title: [280478] trunk/Tools








Revision 280478
Author jbed...@apple.com
Date 2021-07-30 09:35:11 -0700 (Fri, 30 Jul 2021)


Log Message
[git-webkit] Not all platforms support more -F
https://bugs.webkit.org/show_bug.cgi?id=228619


Reviewed by Aakash Jain.

* Scripts/libraries/webkitscmpy/setup.py: Bump version.
* Scripts/libraries/webkitscmpy/webkitscmpy/__init__.py: Ditto.
* Scripts/libraries/webkitscmpy/webkitscmpy/program/command.py:
(FilteredCommand.pager): Only pass -F to more on Darwin.

Modified Paths

trunk/Tools/ChangeLog
trunk/Tools/Scripts/libraries/webkitscmpy/setup.py
trunk/Tools/Scripts/libraries/webkitscmpy/webkitscmpy/__init__.py
trunk/Tools/Scripts/libraries/webkitscmpy/webkitscmpy/program/command.py




Diff

Modified: trunk/Tools/ChangeLog (280477 => 280478)

--- trunk/Tools/ChangeLog	2021-07-30 16:21:43 UTC (rev 280477)
+++ trunk/Tools/ChangeLog	2021-07-30 16:35:11 UTC (rev 280478)
@@ -1,3 +1,16 @@
+2021-07-30  Jonathan Bedard  
+
+[git-webkit] Not all platforms support more -F
+https://bugs.webkit.org/show_bug.cgi?id=228619
+
+
+Reviewed by Aakash Jain.
+
+* Scripts/libraries/webkitscmpy/setup.py: Bump version.
+* Scripts/libraries/webkitscmpy/webkitscmpy/__init__.py: Ditto.
+* Scripts/libraries/webkitscmpy/webkitscmpy/program/command.py:
+(FilteredCommand.pager): Only pass -F to more on Darwin.
+
 2021-07-29  Carlos Alberto Lopez Perez  
 
 [WPE][GTK] build broken with python2 after r280382


Modified: trunk/Tools/Scripts/libraries/webkitscmpy/setup.py (280477 => 280478)

--- trunk/Tools/Scripts/libraries/webkitscmpy/setup.py	2021-07-30 16:21:43 UTC (rev 280477)
+++ trunk/Tools/Scripts/libraries/webkitscmpy/setup.py	2021-07-30 16:35:11 UTC (rev 280478)
@@ -29,7 +29,7 @@
 
 setup(
 name='webkitscmpy',
-version='1.0.2',
+version='1.0.3',
 description='Library designed to interact with git and svn repositories.',
 long_description=readme(),
 classifiers=[


Modified: trunk/Tools/Scripts/libraries/webkitscmpy/webkitscmpy/__init__.py (280477 => 280478)

--- trunk/Tools/Scripts/libraries/webkitscmpy/webkitscmpy/__init__.py	2021-07-30 16:21:43 UTC (rev 280477)
+++ trunk/Tools/Scripts/libraries/webkitscmpy/webkitscmpy/__init__.py	2021-07-30 16:35:11 UTC (rev 280478)
@@ -46,7 +46,7 @@
 "Please install webkitcorepy with `pip install webkitcorepy --extra-index-url `"
 )
 
-version = Version(1, 0, 2)
+version = Version(1, 0, 3)
 
 AutoInstall.register(Package('fasteners', Version(0, 15, 0)))
 AutoInstall.register(Package('monotonic', Version(1, 5)))


Modified: trunk/Tools/Scripts/libraries/webkitscmpy/webkitscmpy/program/command.py (280477 => 280478)

--- trunk/Tools/Scripts/libraries/webkitscmpy/webkitscmpy/program/command.py	2021-07-30 16:21:43 UTC (rev 280477)
+++ trunk/Tools/Scripts/libraries/webkitscmpy/webkitscmpy/program/command.py	2021-07-30 16:35:11 UTC (rev 280478)
@@ -21,6 +21,7 @@
 # OF THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE.
 
 import os
+import platform
 import re
 import subprocess
 import sys
@@ -120,7 +121,7 @@
 stdout=subprocess.PIPE,
 stderr=subprocess.PIPE,
 )
-more = subprocess.Popen([which('more'), '-F'], stdin=child.stdout)
+more = subprocess.Popen([which('more')] + ['-F'] if platform.system() == 'Darwin' else [], stdin=child.stdout)
 
 try:
 while more.poll() is None and not child.poll():






___
webkit-changes mailing list
webkit-changes@lists.webkit.org
https://lists.webkit.org/mailman/listinfo/webkit-changes


[webkit-changes] [280457] trunk/Tools

2021-07-29 Thread jbedard
Title: [280457] trunk/Tools








Revision 280457
Author jbed...@apple.com
Date 2021-07-29 17:10:03 -0700 (Thu, 29 Jul 2021)


Log Message
[git-webkit] Handle relative paths in filtered commands
https://bugs.webkit.org/show_bug.cgi?id=228606


Reviewed by Aakash Jain.

* Scripts/libraries/webkitscmpy/setup.py: Bump version.
* Scripts/libraries/webkitscmpy/webkitscmpy/__init__.py: Ditto.
* Scripts/libraries/webkitscmpy/webkitscmpy/program/command.py:
(FilteredCommand.pager): Child process should use the same current working directory.
(FilteredCommand.main): Convert any file names to their absolute paths.

Modified Paths

trunk/Tools/ChangeLog
trunk/Tools/Scripts/libraries/webkitscmpy/setup.py
trunk/Tools/Scripts/libraries/webkitscmpy/webkitscmpy/__init__.py
trunk/Tools/Scripts/libraries/webkitscmpy/webkitscmpy/program/command.py




Diff

Modified: trunk/Tools/ChangeLog (280456 => 280457)

--- trunk/Tools/ChangeLog	2021-07-29 23:54:44 UTC (rev 280456)
+++ trunk/Tools/ChangeLog	2021-07-30 00:10:03 UTC (rev 280457)
@@ -1,3 +1,17 @@
+2021-07-29  Jonathan Bedard  
+
+[git-webkit] Handle relative paths in filtered commands
+https://bugs.webkit.org/show_bug.cgi?id=228606
+
+
+Reviewed by Aakash Jain.
+
+* Scripts/libraries/webkitscmpy/setup.py: Bump version.
+* Scripts/libraries/webkitscmpy/webkitscmpy/__init__.py: Ditto.
+* Scripts/libraries/webkitscmpy/webkitscmpy/program/command.py:
+(FilteredCommand.pager): Child process should use the same current working directory.
+(FilteredCommand.main): Convert any file names to their absolute paths.
+
 2021-07-29  Tim Horton  
 
 Simplify ImageDiff SDK logic


Modified: trunk/Tools/Scripts/libraries/webkitscmpy/setup.py (280456 => 280457)

--- trunk/Tools/Scripts/libraries/webkitscmpy/setup.py	2021-07-29 23:54:44 UTC (rev 280456)
+++ trunk/Tools/Scripts/libraries/webkitscmpy/setup.py	2021-07-30 00:10:03 UTC (rev 280457)
@@ -29,7 +29,7 @@
 
 setup(
 name='webkitscmpy',
-version='1.0.1',
+version='1.0.2',
 description='Library designed to interact with git and svn repositories.',
 long_description=readme(),
 classifiers=[


Modified: trunk/Tools/Scripts/libraries/webkitscmpy/webkitscmpy/__init__.py (280456 => 280457)

--- trunk/Tools/Scripts/libraries/webkitscmpy/webkitscmpy/__init__.py	2021-07-29 23:54:44 UTC (rev 280456)
+++ trunk/Tools/Scripts/libraries/webkitscmpy/webkitscmpy/__init__.py	2021-07-30 00:10:03 UTC (rev 280457)
@@ -46,7 +46,7 @@
 "Please install webkitcorepy with `pip install webkitcorepy --extra-index-url `"
 )
 
-version = Version(1, 0, 1)
+version = Version(1, 0, 2)
 
 AutoInstall.register(Package('fasteners', Version(0, 15, 0)))
 AutoInstall.register(Package('monotonic', Version(1, 5)))


Modified: trunk/Tools/Scripts/libraries/webkitscmpy/webkitscmpy/program/command.py (280456 => 280457)

--- trunk/Tools/Scripts/libraries/webkitscmpy/webkitscmpy/program/command.py	2021-07-29 23:54:44 UTC (rev 280456)
+++ trunk/Tools/Scripts/libraries/webkitscmpy/webkitscmpy/program/command.py	2021-07-30 00:10:03 UTC (rev 280457)
@@ -116,6 +116,7 @@
 child = subprocess.Popen(
 [sys.executable, file, repository.root_path, args.representation] + args.args,
 env=environ,
+cwd=os.getcwd(),
 stdout=subprocess.PIPE,
 stderr=subprocess.PIPE,
 )
@@ -158,16 +159,26 @@
 
 for index in range(len(args)):
 parsed = Commit.parse(args[index], do_assert=False)
-if not parsed:
+if parsed:
+replacement = None
+if repository.is_svn:
+replacement = repository.cache.to_revision(hash=parsed.hash, identifier=str(parsed) if parsed.identifier else None)
+if repository.is_git:
+replacement = repository.cache.to_hash(revision=parsed.revision, identifier=str(parsed) if parsed.identifier else None)
+if replacement:
+args[index] = replacement
 continue
-replacement = None
-if repository.is_svn:
-replacement = repository.cache.to_revision(hash=parsed.hash, identifier=str(parsed) if parsed.identifier else None)
-if repository.is_git:
-replacement = repository.cache.to_hash(revision=parsed.revision, identifier=str(parsed) if parsed.identifier else None)
-if replacement:
-args[index] = replacement
 
+for candidate in [
+os.path.abspath(os.path.join(os.getcwd(), args[index])),
+os.path.abspath(os.path.join(repository.root_path, args[index])),
+]:
+if not candidate.startswith(repository.root_path):
+continue
+if os.path.exists(candidate):
+args[index] = candidate
+

[webkit-changes] [280440] trunk/Tools

2021-07-29 Thread jbedard
Title: [280440] trunk/Tools








Revision 280440
Author jbed...@apple.com
Date 2021-07-29 12:47:47 -0700 (Thu, 29 Jul 2021)


Log Message
[webkitscmpy] Return remote objects from remote() function
https://bugs.webkit.org/show_bug.cgi?id=226980


Reviewed by Dewei Zhu.

* Scripts/libraries/webkitscmpy/setup.py: Bump version.
* Scripts/libraries/webkitscmpy/webkitscmpy/__init__.py: Ditto.
* Scripts/libraries/webkitscmpy/webkitscmpy/local/git.py:
(Git.url): Add function to return remote url directly.
(Git.remote): Construct the appropriate remote object.
* Scripts/libraries/webkitscmpy/webkitscmpy/local/svn.py:
(Svn.url): Add function to return the remote url directly.
(Svn.remote): Construct the appropriate remote object.
* Scripts/libraries/webkitscmpy/webkitscmpy/test/git_unittest.py:
(TestGit.test_url):
(TestGit.test_remote):
(TestGit.test_remote_github):
(TestGit.test_remote_bitbucket):
* Scripts/libraries/webkitscmpy/webkitscmpy/test/svn_unittest.py:
(TestLocalSvn.test_url):
(TestLocalSvn.test_remote):

Modified Paths

trunk/Tools/ChangeLog
trunk/Tools/Scripts/libraries/webkitscmpy/setup.py
trunk/Tools/Scripts/libraries/webkitscmpy/webkitscmpy/__init__.py
trunk/Tools/Scripts/libraries/webkitscmpy/webkitscmpy/local/git.py
trunk/Tools/Scripts/libraries/webkitscmpy/webkitscmpy/local/svn.py
trunk/Tools/Scripts/libraries/webkitscmpy/webkitscmpy/test/git_unittest.py
trunk/Tools/Scripts/libraries/webkitscmpy/webkitscmpy/test/svn_unittest.py




Diff

Modified: trunk/Tools/ChangeLog (280439 => 280440)

--- trunk/Tools/ChangeLog	2021-07-29 19:04:52 UTC (rev 280439)
+++ trunk/Tools/ChangeLog	2021-07-29 19:47:47 UTC (rev 280440)
@@ -1,3 +1,28 @@
+2021-07-29  Jonathan Bedard  
+
+[webkitscmpy] Return remote objects from remote() function
+https://bugs.webkit.org/show_bug.cgi?id=226980
+
+
+Reviewed by Dewei Zhu.
+
+* Scripts/libraries/webkitscmpy/setup.py: Bump version.
+* Scripts/libraries/webkitscmpy/webkitscmpy/__init__.py: Ditto.
+* Scripts/libraries/webkitscmpy/webkitscmpy/local/git.py:
+(Git.url): Add function to return remote url directly.
+(Git.remote): Construct the appropriate remote object.
+* Scripts/libraries/webkitscmpy/webkitscmpy/local/svn.py:
+(Svn.url): Add function to return the remote url directly.
+(Svn.remote): Construct the appropriate remote object.
+* Scripts/libraries/webkitscmpy/webkitscmpy/test/git_unittest.py:
+(TestGit.test_url):
+(TestGit.test_remote):
+(TestGit.test_remote_github):
+(TestGit.test_remote_bitbucket):
+* Scripts/libraries/webkitscmpy/webkitscmpy/test/svn_unittest.py:
+(TestLocalSvn.test_url):
+(TestLocalSvn.test_remote):
+
 2021-07-29  Peng Liu  
 
 [Catalina][GPUP] Some API tests fail after GPU Process features are enabled


Modified: trunk/Tools/Scripts/libraries/webkitscmpy/setup.py (280439 => 280440)

--- trunk/Tools/Scripts/libraries/webkitscmpy/setup.py	2021-07-29 19:04:52 UTC (rev 280439)
+++ trunk/Tools/Scripts/libraries/webkitscmpy/setup.py	2021-07-29 19:47:47 UTC (rev 280440)
@@ -29,7 +29,7 @@
 
 setup(
 name='webkitscmpy',
-version='1.0.0',
+version='1.0.1',
 description='Library designed to interact with git and svn repositories.',
 long_description=readme(),
 classifiers=[


Modified: trunk/Tools/Scripts/libraries/webkitscmpy/webkitscmpy/__init__.py (280439 => 280440)

--- trunk/Tools/Scripts/libraries/webkitscmpy/webkitscmpy/__init__.py	2021-07-29 19:04:52 UTC (rev 280439)
+++ trunk/Tools/Scripts/libraries/webkitscmpy/webkitscmpy/__init__.py	2021-07-29 19:47:47 UTC (rev 280440)
@@ -46,7 +46,7 @@
 "Please install webkitcorepy with `pip install webkitcorepy --extra-index-url `"
 )
 
-version = Version(1, 0, 0)
+version = Version(1, 0, 1)
 
 AutoInstall.register(Package('fasteners', Version(0, 15, 0)))
 AutoInstall.register(Package('monotonic', Version(1, 5)))


Modified: trunk/Tools/Scripts/libraries/webkitscmpy/webkitscmpy/local/git.py (280439 => 280440)

--- trunk/Tools/Scripts/libraries/webkitscmpy/webkitscmpy/local/git.py	2021-07-29 19:04:52 UTC (rev 280439)
+++ trunk/Tools/Scripts/libraries/webkitscmpy/webkitscmpy/local/git.py	2021-07-29 19:47:47 UTC (rev 280440)
@@ -34,6 +34,7 @@
 
 from webkitcorepy import run, decorators, NestedFuzzyDict
 from webkitscmpy.local import Scm
+from webkitscmpy import remote, Commit, Contributor, log
 from webkitscmpy import Commit, Contributor, log
 
 
@@ -253,6 +254,8 @@
 
 
 GIT_COMMIT = re.compile(r'commit (?P[0-9a-f]+)')
+SSH_REMOTE = re.compile('(ssh://)?git@(?P.+):(?P.+).git')
+HTTP_REMOTE = re.compile('(?Phttps?)://(?P.+)/(?P.+).git')
 
 @classmethod
 @decorators.Memoize()
@@ -351,12 +354,37 @@
 raise self.Exception('Failed to retrieve tag list for {}'.format(self.root_path))
 return tags.stdout.splitlines()
 
-def remote(self, name=None):
+@decorators.Memoize()

[webkit-changes] [280436] trunk/Tools

2021-07-29 Thread jbedard
Title: [280436] trunk/Tools








Revision 280436
Author jbed...@apple.com
Date 2021-07-29 11:32:23 -0700 (Thu, 29 Jul 2021)


Log Message
[git-webkit] Add identifiers to 'log' and 'blame'
https://bugs.webkit.org/show_bug.cgi?id=228027


Reviewed by Dewei Zhu.

* Scripts/libraries/webkitscmpy/setup.py: Bump version.
* Scripts/libraries/webkitscmpy/webkitscmpy/__init__.py: Ditto.
* Scripts/libraries/webkitscmpy/webkitscmpy/local/scm.py:
(Scm.from_path): Pass all kwargs to local SCM object.
* Scripts/libraries/webkitscmpy/webkitscmpy/program/__init__.py:
(main): Add Blame and Log commands.
* Scripts/libraries/webkitscmpy/webkitscmpy/program/blame.py: Added.
(Blame): Invoke pager.
* Scripts/libraries/webkitscmpy/webkitscmpy/program/command.py:
(FilteredCommand): Shared command that handles replace hashes/revisions in
an SCM command with identifiers.
(FilteredCommand.parser): Allow user to change the prefered commit representation.
(FilteredCommand.pager): Pass output through more if called from a terminal.
(FilteredCommand.main): Modify output of provided command to replace commit representation
with the preffered commit representation.
* Scripts/libraries/webkitscmpy/webkitscmpy/program/log.py: Added.
(Log): Invoke pager.
* Scripts/libraries/webkitscmpy/webkitscmpy/test/log_unittest.py: Added.
(TestLog):
(TestLog.setUp):
(TestLog.test_git):
(TestLog.test_git_svn):
(TestLog.test_git):

Modified Paths

trunk/Tools/ChangeLog
trunk/Tools/Scripts/libraries/webkitscmpy/setup.py
trunk/Tools/Scripts/libraries/webkitscmpy/webkitscmpy/__init__.py
trunk/Tools/Scripts/libraries/webkitscmpy/webkitscmpy/local/scm.py
trunk/Tools/Scripts/libraries/webkitscmpy/webkitscmpy/mocks/local/svn.py
trunk/Tools/Scripts/libraries/webkitscmpy/webkitscmpy/program/__init__.py
trunk/Tools/Scripts/libraries/webkitscmpy/webkitscmpy/program/command.py


Added Paths

trunk/Tools/Scripts/libraries/webkitscmpy/webkitscmpy/program/blame.py
trunk/Tools/Scripts/libraries/webkitscmpy/webkitscmpy/program/log.py
trunk/Tools/Scripts/libraries/webkitscmpy/webkitscmpy/test/log_unittest.py




Diff

Modified: trunk/Tools/ChangeLog (280435 => 280436)

--- trunk/Tools/ChangeLog	2021-07-29 18:18:00 UTC (rev 280435)
+++ trunk/Tools/ChangeLog	2021-07-29 18:32:23 UTC (rev 280436)
@@ -1,5 +1,37 @@
 2021-07-29  Jonathan Bedard  
 
+[git-webkit] Add identifiers to 'log' and 'blame'
+https://bugs.webkit.org/show_bug.cgi?id=228027
+
+
+Reviewed by Dewei Zhu.
+
+* Scripts/libraries/webkitscmpy/setup.py: Bump version.
+* Scripts/libraries/webkitscmpy/webkitscmpy/__init__.py: Ditto.
+* Scripts/libraries/webkitscmpy/webkitscmpy/local/scm.py:
+(Scm.from_path): Pass all kwargs to local SCM object.
+* Scripts/libraries/webkitscmpy/webkitscmpy/program/__init__.py:
+(main): Add Blame and Log commands.
+* Scripts/libraries/webkitscmpy/webkitscmpy/program/blame.py: Added.
+(Blame): Invoke pager.
+* Scripts/libraries/webkitscmpy/webkitscmpy/program/command.py:
+(FilteredCommand): Shared command that handles replace hashes/revisions in
+an SCM command with identifiers.
+(FilteredCommand.parser): Allow user to change the prefered commit representation.
+(FilteredCommand.pager): Pass output through more if called from a terminal.
+(FilteredCommand.main): Modify output of provided command to replace commit representation
+with the preffered commit representation.
+* Scripts/libraries/webkitscmpy/webkitscmpy/program/log.py: Added.
+(Log): Invoke pager.
+* Scripts/libraries/webkitscmpy/webkitscmpy/test/log_unittest.py: Added.
+(TestLog):
+(TestLog.setUp):
+(TestLog.test_git):
+(TestLog.test_git_svn):
+(TestLog.test_git):
+
+2021-07-29  Jonathan Bedard  
+
 [webkitcorepy] Catch AttributeError when getting password
 https://bugs.webkit.org/show_bug.cgi?id=228590
 


Modified: trunk/Tools/Scripts/libraries/webkitscmpy/setup.py (280435 => 280436)

--- trunk/Tools/Scripts/libraries/webkitscmpy/setup.py	2021-07-29 18:18:00 UTC (rev 280435)
+++ trunk/Tools/Scripts/libraries/webkitscmpy/setup.py	2021-07-29 18:32:23 UTC (rev 280436)
@@ -29,7 +29,7 @@
 
 setup(
 name='webkitscmpy',
-version='0.15.0',
+version='1.0.0',
 description='Library designed to interact with git and svn repositories.',
 long_description=readme(),
 classifiers=[


Modified: trunk/Tools/Scripts/libraries/webkitscmpy/webkitscmpy/__init__.py (280435 => 280436)

--- trunk/Tools/Scripts/libraries/webkitscmpy/webkitscmpy/__init__.py	2021-07-29 18:18:00 UTC (rev 280435)
+++ trunk/Tools/Scripts/libraries/webkitscmpy/webkitscmpy/__init__.py	2021-07-29 18:32:23 UTC (rev 280436)
@@ -46,7 +46,7 @@
 "Please install webkitcorepy with `pip install webkitcorepy --extra-index-url `"
 )
 
-version = Version(0, 15, 0)
+version = Version(1, 0, 0)
 
 

[webkit-changes] [280435] trunk/Tools

2021-07-29 Thread jbedard
Title: [280435] trunk/Tools








Revision 280435
Author jbed...@apple.com
Date 2021-07-29 11:18:00 -0700 (Thu, 29 Jul 2021)


Log Message
[webkitcorepy] Catch AttributeError when getting password
https://bugs.webkit.org/show_bug.cgi?id=228590


Reviewed by Aakash Jain.

* Scripts/libraries/webkitcorepy/setup.py: Bump version.
* Scripts/libraries/webkitcorepy/webkitcorepy/__init__.py: Ditto.
* Scripts/libraries/webkitcorepy/webkitcorepy/credentials.py:
(credentials): Catch AttributeError.

Modified Paths

trunk/Tools/ChangeLog
trunk/Tools/Scripts/libraries/webkitcorepy/setup.py
trunk/Tools/Scripts/libraries/webkitcorepy/webkitcorepy/__init__.py
trunk/Tools/Scripts/libraries/webkitcorepy/webkitcorepy/credentials.py




Diff

Modified: trunk/Tools/ChangeLog (280434 => 280435)

--- trunk/Tools/ChangeLog	2021-07-29 17:52:12 UTC (rev 280434)
+++ trunk/Tools/ChangeLog	2021-07-29 18:18:00 UTC (rev 280435)
@@ -1,3 +1,16 @@
+2021-07-29  Jonathan Bedard  
+
+[webkitcorepy] Catch AttributeError when getting password
+https://bugs.webkit.org/show_bug.cgi?id=228590
+
+
+Reviewed by Aakash Jain.
+
+* Scripts/libraries/webkitcorepy/setup.py: Bump version.
+* Scripts/libraries/webkitcorepy/webkitcorepy/__init__.py: Ditto.
+* Scripts/libraries/webkitcorepy/webkitcorepy/credentials.py:
+(credentials): Catch AttributeError.
+
 2021-07-29  Aakash Jain  
 
 [ews] VerifyGitHubIntegrity step fails with an exception


Modified: trunk/Tools/Scripts/libraries/webkitcorepy/setup.py (280434 => 280435)

--- trunk/Tools/Scripts/libraries/webkitcorepy/setup.py	2021-07-29 17:52:12 UTC (rev 280434)
+++ trunk/Tools/Scripts/libraries/webkitcorepy/setup.py	2021-07-29 18:18:00 UTC (rev 280435)
@@ -30,7 +30,7 @@
 
 setup(
 name='webkitcorepy',
-version='0.7.2',
+version='0.7.3',
 description='Library containing various Python support classes and functions.',
 long_description=readme(),
 classifiers=[


Modified: trunk/Tools/Scripts/libraries/webkitcorepy/webkitcorepy/__init__.py (280434 => 280435)

--- trunk/Tools/Scripts/libraries/webkitcorepy/webkitcorepy/__init__.py	2021-07-29 17:52:12 UTC (rev 280434)
+++ trunk/Tools/Scripts/libraries/webkitcorepy/webkitcorepy/__init__.py	2021-07-29 18:18:00 UTC (rev 280435)
@@ -39,7 +39,7 @@
 from webkitcorepy.measure_time import MeasureTime
 from webkitcorepy.nested_fuzzy_dict import NestedFuzzyDict
 
-version = Version(0, 7, 2)
+version = Version(0, 7, 3)
 
 from webkitcorepy.autoinstall import Package, AutoInstall
 if sys.version_info > (3, 0):


Modified: trunk/Tools/Scripts/libraries/webkitcorepy/webkitcorepy/credentials.py (280434 => 280435)

--- trunk/Tools/Scripts/libraries/webkitcorepy/webkitcorepy/credentials.py	2021-07-29 17:52:12 UTC (rev 280434)
+++ trunk/Tools/Scripts/libraries/webkitcorepy/webkitcorepy/credentials.py	2021-07-29 18:18:00 UTC (rev 280435)
@@ -56,7 +56,7 @@
 try:
 if keyring:
 username = keyring.get_password(url, 'username')
-except RuntimeError:
+except (RuntimeError, AttributeError):
 pass
 
 if not username and required:
@@ -71,7 +71,7 @@
 try:
 if keyring:
 key = keyring.get_password(url, username)
-except RuntimeError:
+except (RuntimeError, AttributeError):
 pass
 
 if not key and required:






___
webkit-changes mailing list
webkit-changes@lists.webkit.org
https://lists.webkit.org/mailman/listinfo/webkit-changes


[webkit-changes] [280413] trunk/Tools

2021-07-28 Thread jbedard
Title: [280413] trunk/Tools








Revision 280413
Author jbed...@apple.com
Date 2021-07-28 19:31:53 -0700 (Wed, 28 Jul 2021)


Log Message
[webkitcorepy] Add hybridmethod decorator
https://bugs.webkit.org/show_bug.cgi?id=225991


Reviewed by Dewei Zhu.

* Scripts/libraries/webkitcorepy/setup.py: Bump version.
* Scripts/libraries/webkitcorepy/webkitcorepy/__init__.py: Ditto.
* Scripts/libraries/webkitcorepy/webkitcorepy/decorators.py:
(hybridmethod): Similar to the "classmethod" decorator, except this decorator allows the
decorated functions to differentiate between being called by the class and an instance
of the class.
* Scripts/libraries/webkitcorepy/webkitcorepy/tests/decorators_unittest.py:
(TestHybrid):
(TestHybrid.is_type):
(TestHybrid.test_type):
(TestHybrid.test_instance):

Modified Paths

trunk/Tools/ChangeLog
trunk/Tools/Scripts/libraries/webkitcorepy/setup.py
trunk/Tools/Scripts/libraries/webkitcorepy/webkitcorepy/__init__.py
trunk/Tools/Scripts/libraries/webkitcorepy/webkitcorepy/decorators.py
trunk/Tools/Scripts/libraries/webkitcorepy/webkitcorepy/tests/decorators_unittest.py




Diff

Modified: trunk/Tools/ChangeLog (280412 => 280413)

--- trunk/Tools/ChangeLog	2021-07-29 01:48:45 UTC (rev 280412)
+++ trunk/Tools/ChangeLog	2021-07-29 02:31:53 UTC (rev 280413)
@@ -1,5 +1,25 @@
 2021-07-28  Jonathan Bedard  
 
+[webkitcorepy] Add hybridmethod decorator
+https://bugs.webkit.org/show_bug.cgi?id=225991
+
+
+Reviewed by Dewei Zhu.
+
+* Scripts/libraries/webkitcorepy/setup.py: Bump version.
+* Scripts/libraries/webkitcorepy/webkitcorepy/__init__.py: Ditto.
+* Scripts/libraries/webkitcorepy/webkitcorepy/decorators.py:
+(hybridmethod): Similar to the "classmethod" decorator, except this decorator allows the
+decorated functions to differentiate between being called by the class and an instance
+of the class.
+* Scripts/libraries/webkitcorepy/webkitcorepy/tests/decorators_unittest.py:
+(TestHybrid):
+(TestHybrid.is_type):
+(TestHybrid.test_type):
+(TestHybrid.test_instance):
+
+2021-07-28  Jonathan Bedard  
+
 [webkitcorepy] Fix race condition in TaskPool unittests (follow-up fix)
 https://bugs.webkit.org/show_bug.cgi?id=227455
 


Modified: trunk/Tools/Scripts/libraries/webkitcorepy/setup.py (280412 => 280413)

--- trunk/Tools/Scripts/libraries/webkitcorepy/setup.py	2021-07-29 01:48:45 UTC (rev 280412)
+++ trunk/Tools/Scripts/libraries/webkitcorepy/setup.py	2021-07-29 02:31:53 UTC (rev 280413)
@@ -30,7 +30,7 @@
 
 setup(
 name='webkitcorepy',
-version='0.7.1',
+version='0.7.2',
 description='Library containing various Python support classes and functions.',
 long_description=readme(),
 classifiers=[


Modified: trunk/Tools/Scripts/libraries/webkitcorepy/webkitcorepy/__init__.py (280412 => 280413)

--- trunk/Tools/Scripts/libraries/webkitcorepy/webkitcorepy/__init__.py	2021-07-29 01:48:45 UTC (rev 280412)
+++ trunk/Tools/Scripts/libraries/webkitcorepy/webkitcorepy/__init__.py	2021-07-29 02:31:53 UTC (rev 280413)
@@ -39,7 +39,7 @@
 from webkitcorepy.measure_time import MeasureTime
 from webkitcorepy.nested_fuzzy_dict import NestedFuzzyDict
 
-version = Version(0, 7, 1)
+version = Version(0, 7, 2)
 
 from webkitcorepy.autoinstall import Package, AutoInstall
 if sys.version_info > (3, 0):


Modified: trunk/Tools/Scripts/libraries/webkitcorepy/webkitcorepy/decorators.py (280412 => 280413)

--- trunk/Tools/Scripts/libraries/webkitcorepy/webkitcorepy/decorators.py	2021-07-29 01:48:45 UTC (rev 280412)
+++ trunk/Tools/Scripts/libraries/webkitcorepy/webkitcorepy/decorators.py	2021-07-29 02:31:53 UTC (rev 280413)
@@ -64,3 +64,21 @@
 def clear(self):
 self._cache = defaultdict(dict)
 self._last_called = defaultdict(dict)
+
+
+class hybridmethod(object):
+def __init__(self, function):
+self.function = function
+
+def __get__(self, obj, cls):
+context = obj if obj is not None else cls
+
+def wrapper(*args, **kwargs):
+return self.function(context, *args, **kwargs)
+
+wrapper.__name__ = self.function.__name__
+wrapper.__doc__ = self.function.__doc__
+wrapper.__func__ = wrapper.im_func = self.function
+wrapper.__self__ = wrapper.im_self = context
+
+return wrapper


Modified: trunk/Tools/Scripts/libraries/webkitcorepy/webkitcorepy/tests/decorators_unittest.py (280412 => 280413)

--- trunk/Tools/Scripts/libraries/webkitcorepy/webkitcorepy/tests/decorators_unittest.py	2021-07-29 01:48:45 UTC (rev 280412)
+++ trunk/Tools/Scripts/libraries/webkitcorepy/webkitcorepy/tests/decorators_unittest.py	2021-07-29 02:31:53 UTC (rev 280413)
@@ -120,3 +120,16 @@
 self.assertEqual(TestMemoize.increment_with_arg(arg='x'), 1)
 self.assertEqual(TestMemoize.increment_with_arg(arg='x'), 2)
 

[webkit-changes] [280412] trunk/Tools

2021-07-28 Thread jbedard
Title: [280412] trunk/Tools








Revision 280412
Author jbed...@apple.com
Date 2021-07-28 18:48:45 -0700 (Wed, 28 Jul 2021)


Log Message
[webkitcorepy] Fix race condition in TaskPool unittests (follow-up fix)
https://bugs.webkit.org/show_bug.cgi?id=227455


Reviewed by Dewei Zhu.

* Scripts/libraries/webkitcorepy/webkitcorepy/tests/task_pool_unittest.py:
(TaskPoolUnittest.test_invalid_shutdown): Deleted.

Modified Paths

trunk/Tools/ChangeLog
trunk/Tools/Scripts/libraries/webkitcorepy/webkitcorepy/tests/task_pool_unittest.py




Diff

Modified: trunk/Tools/ChangeLog (280411 => 280412)

--- trunk/Tools/ChangeLog	2021-07-29 00:09:39 UTC (rev 280411)
+++ trunk/Tools/ChangeLog	2021-07-29 01:48:45 UTC (rev 280412)
@@ -1,5 +1,16 @@
 2021-07-28  Jonathan Bedard  
 
+[webkitcorepy] Fix race condition in TaskPool unittests (follow-up fix)
+https://bugs.webkit.org/show_bug.cgi?id=227455
+
+
+Reviewed by Dewei Zhu.
+
+* Scripts/libraries/webkitcorepy/webkitcorepy/tests/task_pool_unittest.py:
+(TaskPoolUnittest.test_invalid_shutdown): Deleted.
+
+2021-07-28  Jonathan Bedard  
+
 [ews-build.webkit.org] Verify GitHub integrity in commit queue
 https://bugs.webkit.org/show_bug.cgi?id=228563
 


Modified: trunk/Tools/Scripts/libraries/webkitcorepy/webkitcorepy/tests/task_pool_unittest.py (280411 => 280412)

--- trunk/Tools/Scripts/libraries/webkitcorepy/webkitcorepy/tests/task_pool_unittest.py	2021-07-29 00:09:39 UTC (rev 280411)
+++ trunk/Tools/Scripts/libraries/webkitcorepy/webkitcorepy/tests/task_pool_unittest.py	2021-07-29 01:48:45 UTC (rev 280412)
@@ -168,9 +168,3 @@
 sorted(captured.webkitcorepy.log.getvalue().splitlines()),
 ['worker/{} Teardown argument'.format(x) for x in range(4)],
 )
-
-def test_invalid_shutdown(self):
-with OutputCapture():
-with self.assertRaises(TaskPool.Exception):
-with TaskPool(workers=1, teardown=teardown, grace_period=1, force_fork=True) as pool:
-pool.do(wait, 5)






___
webkit-changes mailing list
webkit-changes@lists.webkit.org
https://lists.webkit.org/mailman/listinfo/webkit-changes


[webkit-changes] [280399] trunk/Tools

2021-07-28 Thread jbedard
Title: [280399] trunk/Tools








Revision 280399
Author jbed...@apple.com
Date 2021-07-28 14:36:26 -0700 (Wed, 28 Jul 2021)


Log Message
[ews-build.webkit.org] Verify GitHub integrity in commit queue
https://bugs.webkit.org/show_bug.cgi?id=228563


Reviewed by Aakash Jain.

* CISupport/ews-build/factories.py:
(CommitQueueFactory.__init__): Add VerifyGitHubIntegrity.
* CISupport/ews-build/factories_unittest.py:
(TestCommitQueueFactory.test_commit_queue_factory):
* CISupport/ews-build/steps.py:
(CheckPatchStatusOnEWSQueues.start):
(VerifyGitHubIntegrity):
(VerifyGitHubIntegrity.__init__):
(VerifyGitHubIntegrity.getResultSummary):
* Scripts/check-github-mirror-integrity: Import webkitscmpy from webkitpy.

Modified Paths

trunk/Tools/CISupport/ews-build/factories.py
trunk/Tools/CISupport/ews-build/factories_unittest.py
trunk/Tools/CISupport/ews-build/steps.py
trunk/Tools/ChangeLog
trunk/Tools/Scripts/check-github-mirror-integrity




Diff

Modified: trunk/Tools/CISupport/ews-build/factories.py (280398 => 280399)

--- trunk/Tools/CISupport/ews-build/factories.py	2021-07-28 20:21:30 UTC (rev 280398)
+++ trunk/Tools/CISupport/ews-build/factories.py	2021-07-28 21:36:26 UTC (rev 280399)
@@ -33,7 +33,7 @@
RunWebKitPyPython3Tests, RunWebKitTests, RunWebKitTestsInStressMode, RunWebKitTestsInStressGuardmallocMode,
SetBuildSummary, ShowIdentifier, TriggerCrashLogSubmission, UpdateWorkingDirectory,
ValidatePatch, ValidateChangeLogAndReviewer, ValidateCommiterAndReviewer, WaitForCrashCollection,
-   InstallBuiltProduct)
+   InstallBuiltProduct, VerifyGitHubIntegrity)
 
 
 class Factory(factory.BuildFactory):
@@ -289,6 +289,7 @@
 self.addStep(CheckOutSource(repourl='https://git.webkit.org/git/WebKit-https'))
 self.addStep(FetchBranches())
 self.addStep(ShowIdentifier())
+self.addStep(VerifyGitHubIntegrity())
 self.addStep(UpdateWorkingDirectory())
 self.addStep(ApplyPatch())
 self.addStep(ValidateChangeLogAndReviewer())


Modified: trunk/Tools/CISupport/ews-build/factories_unittest.py (280398 => 280399)

--- trunk/Tools/CISupport/ews-build/factories_unittest.py	2021-07-28 20:21:30 UTC (rev 280398)
+++ trunk/Tools/CISupport/ews-build/factories_unittest.py	2021-07-28 21:36:26 UTC (rev 280399)
@@ -418,6 +418,7 @@
 _BuildStepFactory(steps.CheckOutSource, repourl='https://git.webkit.org/git/WebKit-https'),
 _BuildStepFactory(steps.FetchBranches),
 _BuildStepFactory(steps.ShowIdentifier),
+_BuildStepFactory(steps.VerifyGitHubIntegrity),
 _BuildStepFactory(steps.UpdateWorkingDirectory),
 _BuildStepFactory(steps.ApplyPatch),
 _BuildStepFactory(steps.ValidateChangeLogAndReviewer),


Modified: trunk/Tools/CISupport/ews-build/steps.py (280398 => 280399)

--- trunk/Tools/CISupport/ews-build/steps.py	2021-07-28 20:21:30 UTC (rev 280398)
+++ trunk/Tools/CISupport/ews-build/steps.py	2021-07-28 21:36:26 UTC (rev 280399)
@@ -3449,3 +3449,18 @@
 self.setProperty('passed_mac_wk2', True)
 self.finished(SUCCESS)
 return None
+
+
+# FIXME: Only needed when GitHub is a mirror, remove once GitHub is the source of truth
+class VerifyGitHubIntegrity(steps.ShellSequence):
+command = ['python3', 'Tools/Scripts/check-github-mirror-integrity']
+name = 'verify-github-integrity'
+haltOnFailure = True
+
+def __init__(self, **kwargs):
+super(VerifyGitHubIntegrity, self).__init__(logEnviron=False, **kwargs)
+
+def getResultSummary(self):
+if self.results != SUCCESS:
+return {'step': 'Encountered some issues during cleanup'}
+return {'step': 'Verified GitHub integrity'}


Modified: trunk/Tools/ChangeLog (280398 => 280399)

--- trunk/Tools/ChangeLog	2021-07-28 20:21:30 UTC (rev 280398)
+++ trunk/Tools/ChangeLog	2021-07-28 21:36:26 UTC (rev 280399)
@@ -1,3 +1,22 @@
+2021-07-28  Jonathan Bedard  
+
+[ews-build.webkit.org] Verify GitHub integrity in commit queue
+https://bugs.webkit.org/show_bug.cgi?id=228563
+
+
+Reviewed by Aakash Jain.
+
+* CISupport/ews-build/factories.py:
+(CommitQueueFactory.__init__): Add VerifyGitHubIntegrity.
+* CISupport/ews-build/factories_unittest.py:
+(TestCommitQueueFactory.test_commit_queue_factory):
+* CISupport/ews-build/steps.py:
+(CheckPatchStatusOnEWSQueues.start):
+(VerifyGitHubIntegrity):
+(VerifyGitHubIntegrity.__init__):
+(VerifyGitHubIntegrity.getResultSummary):
+* Scripts/check-github-mirror-integrity: Import webkitscmpy from webkitpy.
+
 2021-07-28  Alex Christensen  
 
 WebSocket: Safari on iOS 15 beta 3 is sending invalid close frame


Modified: trunk/Tools/Scripts/check-github-mirror-integrity (280398 => 280399)

--- trunk/Tools/Scripts/check-github-mirror-integrity	2021-07-28 

[webkit-changes] [280365] trunk/Tools

2021-07-27 Thread jbedard
Title: [280365] trunk/Tools








Revision 280365
Author jbed...@apple.com
Date 2021-07-27 17:47:02 -0700 (Tue, 27 Jul 2021)


Log Message
[build.webkit.org] Simulator temp files filling up disk
https://bugs.webkit.org/show_bug.cgi?id=228335


Reviewed by Aakash Jain.

* CISupport/kill-old-processes:
(main): Delete stale simulator files.

Modified Paths

trunk/Tools/CISupport/kill-old-processes
trunk/Tools/ChangeLog




Diff

Modified: trunk/Tools/CISupport/kill-old-processes (280364 => 280365)

--- trunk/Tools/CISupport/kill-old-processes	2021-07-28 00:21:05 UTC (rev 280364)
+++ trunk/Tools/CISupport/kill-old-processes	2021-07-28 00:47:02 UTC (rev 280365)
@@ -172,6 +172,8 @@
 os.system("xcrun simctl shutdown booted")
 # Kill all instances of python executing run-webkit-tests
 os.system("ps aux | grep -E '.+/Python .+(run_webkit_tests|run-webkit-tests|mod_pywebsocket)' | grep -v grep | awk '{print $2}' | xargs kill")
+# Remove stale simulator temp files
+os.system('find /private/var/folders -name "Deleting-*" -maxdepth 4 -exec sudo rm -rf {} +')
 elif sys.platform == 'cygwin' or sys.platform == 'win32':
 for task in tasksToKill + tasksToKillWin:
 os.system("taskkill /t /f /im " + task)


Modified: trunk/Tools/ChangeLog (280364 => 280365)

--- trunk/Tools/ChangeLog	2021-07-28 00:21:05 UTC (rev 280364)
+++ trunk/Tools/ChangeLog	2021-07-28 00:47:02 UTC (rev 280365)
@@ -1,3 +1,14 @@
+2021-07-27  Jonathan Bedard  
+
+[build.webkit.org] Simulator temp files filling up disk
+https://bugs.webkit.org/show_bug.cgi?id=228335
+
+
+Reviewed by Aakash Jain.
+
+* CISupport/kill-old-processes:
+(main): Delete stale simulator files.
+
 2021-07-27  Aakash Jain  
 
 Add .gitignore file for CISupport






___
webkit-changes mailing list
webkit-changes@lists.webkit.org
https://lists.webkit.org/mailman/listinfo/webkit-changes


[webkit-changes] [279991] trunk/Tools

2021-07-16 Thread jbedard
Title: [279991] trunk/Tools








Revision 279991
Author jbed...@apple.com
Date 2021-07-16 11:18:05 -0700 (Fri, 16 Jul 2021)


Log Message
[webkitscmpy] Provide API to access SVN cache
https://bugs.webkit.org/show_bug.cgi?id=228000


Reviewed by Dewei Zhu.

Create a Svn cache with the same API as the Git cache. This allows
git and svn to share logic when inserting identifiers in `log` and `blame`.

* Scripts/libraries/webkitscmpy/setup.py: Bump version.
* Scripts/libraries/webkitscmpy/webkitscmpy/__init__.py: Ditto.
* Scripts/libraries/webkitscmpy/webkitscmpy/local/svn.py:
(Svn.Cache.path): Path to cahce file.
(Svn.Cache.populate): Fill cache from `svn log` operation.
(Svn.Cache.to_hash): Svn is unaware of hashes, and can never map them.
(Svn.Cache.to_revision): Map identifiers to revisions.
(Svn.Cache.to_identifier): Map revisions to identifiers.
(Svn.__init__): Use cache object instead of _metadata_cache.
(Svn._commit_count): Access cache object.
(Svn._branch_for): Ditto.
(Svn.commit): Ditto.
(Svn._cache_path): Deleted.
(Svn._cache_revisions): Deleted.
* Scripts/libraries/webkitscmpy/webkitscmpy/test/svn_unittest.py:
(TestLocalSvn.test_revision_cache):

Modified Paths

trunk/Tools/ChangeLog
trunk/Tools/Scripts/libraries/webkitscmpy/setup.py
trunk/Tools/Scripts/libraries/webkitscmpy/webkitscmpy/__init__.py
trunk/Tools/Scripts/libraries/webkitscmpy/webkitscmpy/local/svn.py
trunk/Tools/Scripts/libraries/webkitscmpy/webkitscmpy/test/svn_unittest.py




Diff

Modified: trunk/Tools/ChangeLog (279990 => 279991)

--- trunk/Tools/ChangeLog	2021-07-16 18:02:46 UTC (rev 279990)
+++ trunk/Tools/ChangeLog	2021-07-16 18:18:05 UTC (rev 279991)
@@ -1,3 +1,31 @@
+2021-07-16  Jonathan Bedard  
+
+[webkitscmpy] Provide API to access SVN cache
+https://bugs.webkit.org/show_bug.cgi?id=228000
+
+
+Reviewed by Dewei Zhu.
+
+Create a Svn cache with the same API as the Git cache. This allows
+git and svn to share logic when inserting identifiers in `log` and `blame`.
+
+* Scripts/libraries/webkitscmpy/setup.py: Bump version.
+* Scripts/libraries/webkitscmpy/webkitscmpy/__init__.py: Ditto.
+* Scripts/libraries/webkitscmpy/webkitscmpy/local/svn.py:
+(Svn.Cache.path): Path to cahce file.
+(Svn.Cache.populate): Fill cache from `svn log` operation.
+(Svn.Cache.to_hash): Svn is unaware of hashes, and can never map them.
+(Svn.Cache.to_revision): Map identifiers to revisions.
+(Svn.Cache.to_identifier): Map revisions to identifiers.
+(Svn.__init__): Use cache object instead of _metadata_cache.
+(Svn._commit_count): Access cache object.
+(Svn._branch_for): Ditto.
+(Svn.commit): Ditto.
+(Svn._cache_path): Deleted.
+(Svn._cache_revisions): Deleted.
+* Scripts/libraries/webkitscmpy/webkitscmpy/test/svn_unittest.py:
+(TestLocalSvn.test_revision_cache):
+
 2021-07-16  Philippe Normand  
 
 [GStreamer] RealtimeMediaSourceCenter and VideoEncoder are not libwebrtc-specific


Modified: trunk/Tools/Scripts/libraries/webkitscmpy/setup.py (279990 => 279991)

--- trunk/Tools/Scripts/libraries/webkitscmpy/setup.py	2021-07-16 18:02:46 UTC (rev 279990)
+++ trunk/Tools/Scripts/libraries/webkitscmpy/setup.py	2021-07-16 18:18:05 UTC (rev 279991)
@@ -29,7 +29,7 @@
 
 setup(
 name='webkitscmpy',
-version='0.14.7',
+version='0.15.0',
 description='Library designed to interact with git and svn repositories.',
 long_description=readme(),
 classifiers=[


Modified: trunk/Tools/Scripts/libraries/webkitscmpy/webkitscmpy/__init__.py (279990 => 279991)

--- trunk/Tools/Scripts/libraries/webkitscmpy/webkitscmpy/__init__.py	2021-07-16 18:02:46 UTC (rev 279990)
+++ trunk/Tools/Scripts/libraries/webkitscmpy/webkitscmpy/__init__.py	2021-07-16 18:18:05 UTC (rev 279991)
@@ -46,7 +46,7 @@
 "Please install webkitcorepy with `pip install webkitcorepy --extra-index-url `"
 )
 
-version = Version(0, 14, 7)
+version = Version(0, 15, 0)
 
 AutoInstall.register(Package('fasteners', Version(0, 15, 0)))
 AutoInstall.register(Package('monotonic', Version(1, 5)))


Modified: trunk/Tools/Scripts/libraries/webkitscmpy/webkitscmpy/local/svn.py (279990 => 279991)

--- trunk/Tools/Scripts/libraries/webkitscmpy/webkitscmpy/local/svn.py	2021-07-16 18:02:46 UTC (rev 279990)
+++ trunk/Tools/Scripts/libraries/webkitscmpy/webkitscmpy/local/svn.py	2021-07-16 18:18:05 UTC (rev 279991)
@@ -29,6 +29,7 @@
 import shutil
 import subprocess
 import sys
+import time
 
 from datetime import datetime, timedelta
 
@@ -38,9 +39,172 @@
 
 
 class Svn(Scm):
-LOG_RE = re.compile(r'r(?P\d+) \| (?P.*) \| (?P.*)')
-CACHE_VERSION = Version(1)
+class Cache(object):
+LOG_RE = re.compile(r'r(?P\d+) \| (?P.*) \| (?P.*)')
+VERSION = Version(1)
 
+def __init__(self, repo, guranteed_for=10):
+self.repo = repo
+self._last_populated = {}
+  

[webkit-changes] [279898] trunk/Tools

2021-07-13 Thread jbedard
Title: [279898] trunk/Tools








Revision 279898
Author jbed...@apple.com
Date 2021-07-13 16:58:14 -0700 (Tue, 13 Jul 2021)


Log Message
[webkitscmpy] Handle failed `git log` process
https://bugs.webkit.org/show_bug.cgi?id=227709


Rubber-stamped by Aakash Jain.

* Scripts/libraries/webkitscmpy/setup.py: Bump version.
* Scripts/libraries/webkitscmpy/webkitscmpy/__init__.py: Ditto.
* Scripts/libraries/webkitscmpy/webkitscmpy/local/git.py:
(Git.Cache.populate): Do not populate cache if `git log` fails.

Modified Paths

trunk/Tools/ChangeLog
trunk/Tools/Scripts/libraries/webkitscmpy/setup.py
trunk/Tools/Scripts/libraries/webkitscmpy/webkitscmpy/__init__.py
trunk/Tools/Scripts/libraries/webkitscmpy/webkitscmpy/local/git.py




Diff

Modified: trunk/Tools/ChangeLog (279897 => 279898)

--- trunk/Tools/ChangeLog	2021-07-13 23:56:54 UTC (rev 279897)
+++ trunk/Tools/ChangeLog	2021-07-13 23:58:14 UTC (rev 279898)
@@ -1,3 +1,16 @@
+2021-07-13  Jonathan Bedard  
+
+[webkitscmpy] Handle failed `git log` process
+https://bugs.webkit.org/show_bug.cgi?id=227709
+
+
+Rubber-stamped by Aakash Jain.
+
+* Scripts/libraries/webkitscmpy/setup.py: Bump version.
+* Scripts/libraries/webkitscmpy/webkitscmpy/__init__.py: Ditto.
+* Scripts/libraries/webkitscmpy/webkitscmpy/local/git.py:
+(Git.Cache.populate): Do not populate cache if `git log` fails.
+
 2021-07-13  Alex Christensen  
 
 >4K Referer should have tailing /


Modified: trunk/Tools/Scripts/libraries/webkitscmpy/setup.py (279897 => 279898)

--- trunk/Tools/Scripts/libraries/webkitscmpy/setup.py	2021-07-13 23:56:54 UTC (rev 279897)
+++ trunk/Tools/Scripts/libraries/webkitscmpy/setup.py	2021-07-13 23:58:14 UTC (rev 279898)
@@ -29,7 +29,7 @@
 
 setup(
 name='webkitscmpy',
-version='0.14.6',
+version='0.14.7',
 description='Library designed to interact with git and svn repositories.',
 long_description=readme(),
 classifiers=[


Modified: trunk/Tools/Scripts/libraries/webkitscmpy/webkitscmpy/__init__.py (279897 => 279898)

--- trunk/Tools/Scripts/libraries/webkitscmpy/webkitscmpy/__init__.py	2021-07-13 23:56:54 UTC (rev 279897)
+++ trunk/Tools/Scripts/libraries/webkitscmpy/webkitscmpy/__init__.py	2021-07-13 23:58:14 UTC (rev 279898)
@@ -46,7 +46,7 @@
 "Please install webkitcorepy with `pip install webkitcorepy --extra-index-url `"
 )
 
-version = Version(0, 14, 6)
+version = Version(0, 14, 7)
 
 AutoInstall.register(Package('fasteners', Version(0, 15, 0)))
 AutoInstall.register(Package('monotonic', Version(1, 5)))


Modified: trunk/Tools/Scripts/libraries/webkitscmpy/webkitscmpy/local/git.py (279897 => 279898)

--- trunk/Tools/Scripts/libraries/webkitscmpy/webkitscmpy/local/git.py	2021-07-13 23:56:54 UTC (rev 279897)
+++ trunk/Tools/Scripts/libraries/webkitscmpy/webkitscmpy/local/git.py	2021-07-13 23:58:14 UTC (rev 279898)
@@ -161,6 +161,9 @@
 intersected = _append(branch, hash, revision=revision)
 
 finally:
+# If our `git log` operation failed, we can't count on the validity of our cache
+if log and log.returncode:
+return
 if log:
 log.kill()
 






___
webkit-changes mailing list
webkit-changes@lists.webkit.org
https://lists.webkit.org/mailman/listinfo/webkit-changes


[webkit-changes] [279849] trunk/Tools

2021-07-12 Thread jbedard
Title: [279849] trunk/Tools








Revision 279849
Author jbed...@apple.com
Date 2021-07-12 13:46:41 -0700 (Mon, 12 Jul 2021)


Log Message
[run-api-tests] Use Python 3 (Part 1)
https://bugs.webkit.org/show_bug.cgi?id=225427


Reviewed by Aakash Jain.

* CISupport/build-webkit-org/steps.py:
(RunAPITests): Use Python3 to invoke run-api-tests.
* CISupport/ews-build/steps.py:
(RunAPITests): Use Python3 to invoke run-api-tests.
* CISupport/ews-build/steps_unittest.py:

Modified Paths

trunk/Tools/CISupport/build-webkit-org/steps.py
trunk/Tools/CISupport/ews-build/steps.py
trunk/Tools/CISupport/ews-build/steps_unittest.py
trunk/Tools/ChangeLog




Diff

Modified: trunk/Tools/CISupport/build-webkit-org/steps.py (279848 => 279849)

--- trunk/Tools/CISupport/build-webkit-org/steps.py	2021-07-12 20:45:53 UTC (rev 279848)
+++ trunk/Tools/CISupport/build-webkit-org/steps.py	2021-07-12 20:46:41 UTC (rev 279849)
@@ -648,7 +648,7 @@
 jsonFileName = "api_test_results.json"
 logfiles = {"json": jsonFileName}
 command = [
-"python",
+"python3",
 "./Tools/Scripts/run-api-tests",
 "--no-build",
 "--json-output={0}".format(jsonFileName),


Modified: trunk/Tools/CISupport/ews-build/steps.py (279848 => 279849)

--- trunk/Tools/CISupport/ews-build/steps.py	2021-07-12 20:45:53 UTC (rev 279848)
+++ trunk/Tools/CISupport/ews-build/steps.py	2021-07-12 20:46:41 UTC (rev 279849)
@@ -2782,7 +2782,7 @@
 descriptionDone = ['api-tests']
 jsonFileName = 'api_test_results.json'
 logfiles = {'json': jsonFileName}
-command = ['python', 'Tools/Scripts/run-api-tests', '--no-build',
+command = ['python3', 'Tools/Scripts/run-api-tests', '--no-build',
WithProperties('--%(configuration)s'), '--verbose', '--json-output={0}'.format(jsonFileName)]
 failedTestsFormatString = '%d api test%s failed or timed out'
 


Modified: trunk/Tools/CISupport/ews-build/steps_unittest.py (279848 => 279849)

--- trunk/Tools/CISupport/ews-build/steps_unittest.py	2021-07-12 20:45:53 UTC (rev 279848)
+++ trunk/Tools/CISupport/ews-build/steps_unittest.py	2021-07-12 20:46:41 UTC (rev 279849)
@@ -3200,7 +3200,7 @@
 self.expectRemoteCommands(
 ExpectShell(workdir='wkdir',
 logEnviron=False,
-command=['python', 'Tools/Scripts/run-api-tests', '--no-build', '--release', '--verbose', '--json-output={0}'.format(self.jsonFileName)],
+command=['python3', 'Tools/Scripts/run-api-tests', '--no-build', '--release', '--verbose', '--json-output={0}'.format(self.jsonFileName)],
 logfiles={'json': self.jsonFileName},
 )
 + ExpectShell.log('stdio', stdout='''...
@@ -3228,7 +3228,7 @@
 self.expectRemoteCommands(
 ExpectShell(workdir='wkdir',
 logEnviron=False,
-command=['python', 'Tools/Scripts/run-api-tests', '--no-build', '--debug', '--verbose', '--json-output={0}'.format(self.jsonFileName), '--ios-simulator'],
+command=['python3', 'Tools/Scripts/run-api-tests', '--no-build', '--debug', '--verbose', '--json-output={0}'.format(self.jsonFileName), '--ios-simulator'],
 logfiles={'json': self.jsonFileName},
 )
 + ExpectShell.log('stdio', stdout='''...
@@ -3289,7 +3289,7 @@
 self.expectRemoteCommands(
 ExpectShell(workdir='wkdir',
 logEnviron=False,
-command=['python', 'Tools/Scripts/run-api-tests', '--no-build', '--debug', '--verbose', '--json-output={0}'.format(self.jsonFileName)],
+command=['python3', 'Tools/Scripts/run-api-tests', '--no-build', '--debug', '--verbose', '--json-output={0}'.format(self.jsonFileName)],
 logfiles={'json': self.jsonFileName},
 )
 + ExpectShell.log('stdio', stdout='''
@@ -3331,7 +3331,7 @@
 self.expectRemoteCommands(
 ExpectShell(workdir='wkdir',
 logEnviron=False,
-command=['python', 'Tools/Scripts/run-api-tests', '--no-build', '--debug', '--verbose', '--json-output={0}'.format(self.jsonFileName)],
+command=['python3', 'Tools/Scripts/run-api-tests', '--no-build', '--debug', '--verbose', '--json-output={0}'.format(self.jsonFileName)],
 logfiles={'json': self.jsonFileName},
 )
 + ExpectShell.log('stdio', stdout='''...
@@ -3387,7 +3387,7 @@
 self.expectRemoteCommands(
 ExpectShell(workdir='wkdir',
 logEnviron=False,
-command=['python', 'Tools/Scripts/run-api-tests', '--no-build', '--debug', '--verbose', '--json-output={0}'.format(self.jsonFileName)],
+command=['python3', 

[webkit-changes] [279496] trunk/Tools

2021-07-01 Thread jbedard
Title: [279496] trunk/Tools








Revision 279496
Author jbed...@apple.com
Date 2021-07-01 21:05:41 -0700 (Thu, 01 Jul 2021)


Log Message
[run-webkit-tests] Set software_variant from runtime
https://bugs.webkit.org/show_bug.cgi?id=227600


Reviewed by Stephanie Lewis.

* Scripts/webkitpy/xcode/device_type.py:
(DeviceType._define_software_variant_from_hardware_family):
(DeviceType.check_consistency):
(DeviceType.__contains__):
* Scripts/webkitpy/xcode/device_type_unittest.py:
(DeviceTypeTest.test_from_string):
(DeviceTypeTest.test_contained_in):
* Scripts/webkitpy/xcode/simulated_device.py:
(SimulatedDeviceManager._create_device_with_runtime):

Modified Paths

trunk/Tools/ChangeLog
trunk/Tools/Scripts/webkitpy/xcode/device_type.py
trunk/Tools/Scripts/webkitpy/xcode/device_type_unittest.py
trunk/Tools/Scripts/webkitpy/xcode/simulated_device.py




Diff

Modified: trunk/Tools/ChangeLog (279495 => 279496)

--- trunk/Tools/ChangeLog	2021-07-02 03:14:26 UTC (rev 279495)
+++ trunk/Tools/ChangeLog	2021-07-02 04:05:41 UTC (rev 279496)
@@ -1,3 +1,21 @@
+2021-07-01  Jonathan Bedard  
+
+[run-webkit-tests] Set software_variant from runtime
+https://bugs.webkit.org/show_bug.cgi?id=227600
+
+
+Reviewed by Stephanie Lewis.
+
+* Scripts/webkitpy/xcode/device_type.py:
+(DeviceType._define_software_variant_from_hardware_family):
+(DeviceType.check_consistency):
+(DeviceType.__contains__):
+* Scripts/webkitpy/xcode/device_type_unittest.py:
+(DeviceTypeTest.test_from_string):
+(DeviceTypeTest.test_contained_in):
+* Scripts/webkitpy/xcode/simulated_device.py:
+(SimulatedDeviceManager._create_device_with_runtime):
+
 2021-07-01  Alex Christensen  
 
 loadSimulatedRequest: should do same delegate callbacks as loadHTMLString and loadData


Modified: trunk/Tools/Scripts/webkitpy/xcode/device_type.py (279495 => 279496)

--- trunk/Tools/Scripts/webkitpy/xcode/device_type.py	2021-07-02 03:14:26 UTC (rev 279495)
+++ trunk/Tools/Scripts/webkitpy/xcode/device_type.py	2021-07-02 04:05:41 UTC (rev 279496)
@@ -64,7 +64,7 @@
 if self.software_variant:
 return
 
-self.software_variant = 'iOS'
+self.software_variant = None
 if self.hardware_family.lower().split(' ')[-1].startswith('watch'):
 self.hardware_family = 'Apple Watch'
 self.software_variant = 'watchOS'
@@ -71,21 +71,20 @@
 elif self.hardware_family.lower().split(' ')[-1].startswith('tv'):
 self.hardware_family = 'Apple TV'
 self.software_variant = 'tvOS'
+elif self.hardware_family.lower().startswith('ipad') or self.hardware_family.lower().startswith('iphone'):
+self.software_variant = 'iOS'
 
 def check_consistency(self):
 if self.hardware_family is not None:
-assert self.software_variant is not None
 if self.hardware_family == 'Apple Watch':
 assert self.software_variant == 'watchOS'
 elif self.hardware_family == 'Apple TV':
 assert self.software_variant == 'tvOS'
-else:
+elif self.hardware_family in ('iPhone', 'iPad'):
 assert self.software_variant == 'iOS'
 
 if self.hardware_type is not None:
 assert self.hardware_family is not None
-if self.software_version:
-assert self.software_variant is not None
 
 def __init__(self, hardware_family=None, hardware_type=None, software_version=None, software_variant=None):
 """
@@ -146,11 +145,11 @@
 
 def __contains__(self, other):
 assert isinstance(other, DeviceType)
-if self.hardware_family is not None and (not other.hardware_family or self.hardware_family.lower() != other.hardware_family.lower()):
+if self.hardware_family is not None and other.hardware_family is not None and self.hardware_family.lower() != other.hardware_family.lower():
 return False
-if self.standardized_hardware_type is not None and (not other.standardized_hardware_type or self.standardized_hardware_type.lower() != other.standardized_hardware_type.lower()):
+if self.standardized_hardware_type is not None and other.standardized_hardware_type is not None and self.standardized_hardware_type.lower() != other.standardized_hardware_type.lower():
 return False
-if self.software_variant is not None and (not other.software_variant or self.software_variant.lower() != other.software_variant.lower()):
+if self.software_variant is not None and other.software_variant is not None and self.software_variant.lower() != other.software_variant.lower():
 return False
 if self.software_version is not None and other.software_version is not None and not other.software_version in self.software_version:
 return False


Modified: 

[webkit-changes] [279488] trunk/Tools

2021-07-01 Thread jbedard
Title: [279488] trunk/Tools








Revision 279488
Author jbed...@apple.com
Date 2021-07-01 17:20:52 -0700 (Thu, 01 Jul 2021)


Log Message
[webkitscmpy] Cache identifiers in Git checkouts (Follow-up fix)
https://bugs.webkit.org/show_bug.cgi?id=225616


Reviewed by Dewei Zhu.

Python 2's Subprocess is 10x slower than Python 3, which means generating
the cache is impractical in Python 2.

* Scripts/libraries/webkitscmpy/webkitscmpy/local/git.py:
(Git.__init__): Disable cache on Python 2 by default.
* Scripts/libraries/webkitscmpy/webkitscmpy/test/git_unittest.py:
(test_cache): Force Git to use cache.
(test_revision_cache): Ditto.

Modified Paths

trunk/Tools/ChangeLog
trunk/Tools/Scripts/libraries/webkitscmpy/webkitscmpy/local/git.py
trunk/Tools/Scripts/libraries/webkitscmpy/webkitscmpy/test/git_unittest.py




Diff

Modified: trunk/Tools/ChangeLog (279487 => 279488)

--- trunk/Tools/ChangeLog	2021-07-02 00:08:31 UTC (rev 279487)
+++ trunk/Tools/ChangeLog	2021-07-02 00:20:52 UTC (rev 279488)
@@ -1,5 +1,22 @@
 2021-07-01  Jonathan Bedard  
 
+[webkitscmpy] Cache identifiers in Git checkouts (Follow-up fix)
+https://bugs.webkit.org/show_bug.cgi?id=225616
+
+
+Reviewed by Dewei Zhu.
+
+Python 2's Subprocess is 10x slower than Python 3, which means generating
+the cache is impractical in Python 2.
+
+* Scripts/libraries/webkitscmpy/webkitscmpy/local/git.py:
+(Git.__init__): Disable cache on Python 2 by default.
+* Scripts/libraries/webkitscmpy/webkitscmpy/test/git_unittest.py:
+(test_cache): Force Git to use cache.
+(test_revision_cache): Ditto.
+
+2021-07-01  Jonathan Bedard  
+
 [clean-webkit] Exclude autoinstalled directory
 https://bugs.webkit.org/show_bug.cgi?id=227588
 


Modified: trunk/Tools/Scripts/libraries/webkitscmpy/webkitscmpy/local/git.py (279487 => 279488)

--- trunk/Tools/Scripts/libraries/webkitscmpy/webkitscmpy/local/git.py	2021-07-02 00:08:31 UTC (rev 279487)
+++ trunk/Tools/Scripts/libraries/webkitscmpy/webkitscmpy/local/git.py	2021-07-02 00:20:52 UTC (rev 279488)
@@ -260,10 +260,10 @@
 def is_checkout(cls, path):
 return run([cls.executable(), 'rev-parse', '--show-toplevel'], cwd=path, capture_output=True).returncode == 0
 
-def __init__(self, path, dev_branches=None, prod_branches=None, contributors=None, id=None):
+def __init__(self, path, dev_branches=None, prod_branches=None, contributors=None, id=None, cached=sys.version_info > (3, 0)):
 super(Git, self).__init__(path, dev_branches=dev_branches, prod_branches=prod_branches, contributors=contributors, id=id)
 self._branch = None
-self.cache = self.Cache(self) if self.root_path else None
+self.cache = self.Cache(self) if self.root_path and cached else None
 if not self.root_path:
 raise OSError('Provided path {} is not a git repository'.format(path))
 


Modified: trunk/Tools/Scripts/libraries/webkitscmpy/webkitscmpy/test/git_unittest.py (279487 => 279488)

--- trunk/Tools/Scripts/libraries/webkitscmpy/webkitscmpy/test/git_unittest.py	2021-07-02 00:08:31 UTC (rev 279487)
+++ trunk/Tools/Scripts/libraries/webkitscmpy/webkitscmpy/test/git_unittest.py	2021-07-02 00:20:52 UTC (rev 279488)
@@ -368,7 +368,7 @@
 def test_cache(self):
 for mock in [mocks.local.Git(self.path), mocks.local.Git(self.path, git_svn=True)]:
 with mock, OutputCapture():
-repo = local.Git(self.path)
+repo = local.Git(self.path, cached=True)
 
 self.assertEqual(repo.cache.to_hash(identifier='1@main'), '9b8311f25a77ba14923d9d5a6532103f54abefcb')
 self.assertEqual(repo.cache.to_identifier(hash='d8bce26fa65c'), '5@main')
@@ -381,7 +381,7 @@
 
 def test_revision_cache(self):
 with mocks.local.Git(self.path, git_svn=True), OutputCapture():
-repo = local.Git(self.path)
+repo = local.Git(self.path, cached=True)
 
 self.assertEqual(repo.cache.to_revision(identifier='1@main'), 1)
 self.assertEqual(repo.cache.to_identifier(revision='r9'), '5@main')






___
webkit-changes mailing list
webkit-changes@lists.webkit.org
https://lists.webkit.org/mailman/listinfo/webkit-changes


[webkit-changes] [279482] trunk/Tools

2021-07-01 Thread jbedard
Title: [279482] trunk/Tools








Revision 279482
Author jbed...@apple.com
Date 2021-07-01 13:46:56 -0700 (Thu, 01 Jul 2021)


Log Message
[clean-webkit] Exclude autoinstalled directory
https://bugs.webkit.org/show_bug.cgi?id=227588


Reviewed by Alexey Proskuryakov.

* Scripts/webkitpy/common/checkout/scm/scm.py:
(SCM.discard_untracked_files): Never discard the autoinstalled directory.

Modified Paths

trunk/Tools/ChangeLog
trunk/Tools/Scripts/webkitpy/common/checkout/scm/scm.py




Diff

Modified: trunk/Tools/ChangeLog (279481 => 279482)

--- trunk/Tools/ChangeLog	2021-07-01 20:28:32 UTC (rev 279481)
+++ trunk/Tools/ChangeLog	2021-07-01 20:46:56 UTC (rev 279482)
@@ -1,3 +1,14 @@
+2021-07-01  Jonathan Bedard  
+
+[clean-webkit] Exclude autoinstalled directory
+https://bugs.webkit.org/show_bug.cgi?id=227588
+
+
+Reviewed by Alexey Proskuryakov.
+
+* Scripts/webkitpy/common/checkout/scm/scm.py:
+(SCM.discard_untracked_files): Never discard the autoinstalled directory.
+
 2021-07-01  Wenson Hsieh  
 
 Selecting or dragging images that contain recognizable text is difficult in Mail compose


Modified: trunk/Tools/Scripts/webkitpy/common/checkout/scm/scm.py (279481 => 279482)

--- trunk/Tools/Scripts/webkitpy/common/checkout/scm/scm.py	2021-07-01 20:28:32 UTC (rev 279481)
+++ trunk/Tools/Scripts/webkitpy/common/checkout/scm/scm.py	2021-07-01 20:46:56 UTC (rev 279482)
@@ -219,6 +219,8 @@
 if self._filesystem.isdir(filename):
 if keep_webkitbuild_directory and filename == "WebKitBuild":
 continue
+if filename == 'Tools/Scripts/libraries/autoinstalled':
+continue
 self._filesystem.rmtree(filename)
 else:
 self._filesystem.remove(filename)






___
webkit-changes mailing list
webkit-changes@lists.webkit.org
https://lists.webkit.org/mailman/listinfo/webkit-changes


[webkit-changes] [279445] trunk/Tools

2021-06-30 Thread jbedard
Title: [279445] trunk/Tools








Revision 279445
Author jbed...@apple.com
Date 2021-06-30 17:16:18 -0700 (Wed, 30 Jun 2021)


Log Message
[webkitscmpy] Cache identifiers in Git checkouts
https://bugs.webkit.org/show_bug.cgi?id=225616


Reviewed by Dewei Zhu.

Computing identifiers in git can be slow, especially if you need to compute
multiple. Caching all identifiers for a branch is not much more expensive than calculating a single identifier. Additionally, caching all identifiers
lets us build a performant subversion mapping, bypassing git-svn.

* Scripts/libraries/webkitcorepy/setup.py:
* Scripts/libraries/webkitcorepy/webkitcorepy/__init__.py:
* Scripts/libraries/webkitscmpy/webkitscmpy/local/git.py:
(Git.Cache): Class holding a cache allowing quick mapping between hashes, identifiers and revisions.
(Git.Cache.__init__): Load cache from json file on disk.
(Git.Cache.path): Path to location of cache on disk.
(Git.Cache._fill): Populate revision and hash to identifier dictionaries.
(Git.Cache.populate): Parse git-log and populate cache.
(Git.Cache.hash): Given an identifier or revision, find the hash.
(Git.Cache.revision): Given an identifier or hash, find the revision.
(Git.Cache.identifier): Given a hash or revision, determine the identifier.
(Git.__init__): Instantiate cache.
(Git.commit): Check cache before running expensive commands.
* Scripts/libraries/webkitscmpy/webkitscmpy/mocks/local/git.py: Add `git log` mock.
* Scripts/libraries/webkitscmpy/webkitscmpy/test/git_unittest.py:
(TestGit.test_tag): Surpress logging.
(TestGit.test_checkout): Ditto.
(TestGit.test_no_log): Ditto.
(TestGit.test_order): Ditto.
(test_cache): Verify identifier cache.
(test_revision_cache): Verify revision cache.
* Scripts/webkitpy/layout_tests/models/test_run_results_unittest.py:
(SummarizedResultsTest.test_svn_revision_git): Surpress logging.
* Scripts/webkitpy/port/base_unittest.py:
(PortTest.test_commits_for_upload_git_svn): Surpress logging.

Modified Paths

trunk/Tools/ChangeLog
trunk/Tools/Scripts/libraries/webkitcorepy/setup.py
trunk/Tools/Scripts/libraries/webkitcorepy/webkitcorepy/__init__.py
trunk/Tools/Scripts/libraries/webkitscmpy/webkitscmpy/local/git.py
trunk/Tools/Scripts/libraries/webkitscmpy/webkitscmpy/mocks/local/git.py
trunk/Tools/Scripts/libraries/webkitscmpy/webkitscmpy/test/git_unittest.py
trunk/Tools/Scripts/webkitpy/layout_tests/models/test_run_results_unittest.py
trunk/Tools/Scripts/webkitpy/port/base_unittest.py




Diff

Modified: trunk/Tools/ChangeLog (279444 => 279445)

--- trunk/Tools/ChangeLog	2021-06-30 23:54:40 UTC (rev 279444)
+++ trunk/Tools/ChangeLog	2021-07-01 00:16:18 UTC (rev 279445)
@@ -1,3 +1,41 @@
+2021-06-30  Jonathan Bedard  
+
+[webkitscmpy] Cache identifiers in Git checkouts
+https://bugs.webkit.org/show_bug.cgi?id=225616
+
+
+Reviewed by Dewei Zhu.
+
+Computing identifiers in git can be slow, especially if you need to compute
+multiple. Caching all identifiers for a branch is not much more expensive than calculating a single identifier. Additionally, caching all identifiers
+lets us build a performant subversion mapping, bypassing git-svn.
+
+* Scripts/libraries/webkitcorepy/setup.py:
+* Scripts/libraries/webkitcorepy/webkitcorepy/__init__.py:
+* Scripts/libraries/webkitscmpy/webkitscmpy/local/git.py:
+(Git.Cache): Class holding a cache allowing quick mapping between hashes, identifiers and revisions.
+(Git.Cache.__init__): Load cache from json file on disk.
+(Git.Cache.path): Path to location of cache on disk.
+(Git.Cache._fill): Populate revision and hash to identifier dictionaries.
+(Git.Cache.populate): Parse git-log and populate cache.
+(Git.Cache.hash): Given an identifier or revision, find the hash.
+(Git.Cache.revision): Given an identifier or hash, find the revision.
+(Git.Cache.identifier): Given a hash or revision, determine the identifier.
+(Git.__init__): Instantiate cache.
+(Git.commit): Check cache before running expensive commands.
+* Scripts/libraries/webkitscmpy/webkitscmpy/mocks/local/git.py: Add `git log` mock.
+* Scripts/libraries/webkitscmpy/webkitscmpy/test/git_unittest.py:
+(TestGit.test_tag): Surpress logging.
+(TestGit.test_checkout): Ditto.
+(TestGit.test_no_log): Ditto.
+(TestGit.test_order): Ditto.
+(test_cache): Verify identifier cache.
+(test_revision_cache): Verify revision cache.
+* Scripts/webkitpy/layout_tests/models/test_run_results_unittest.py:
+(SummarizedResultsTest.test_svn_revision_git): Surpress logging.
+* Scripts/webkitpy/port/base_unittest.py:
+(PortTest.test_commits_for_upload_git_svn): Surpress logging.
+
 2021-06-30  Megan Gardner  
 
 Add ID and versioning support for AppHighlights


Modified: trunk/Tools/Scripts/libraries/webkitcorepy/setup.py (279444 => 279445)


[webkit-changes] [279381] trunk/Tools

2021-06-29 Thread jbedard
Title: [279381] trunk/Tools








Revision 279381
Author jbed...@apple.com
Date 2021-06-29 12:27:13 -0700 (Tue, 29 Jun 2021)


Log Message
[webkitcorepy] Add NestedFuzzyDict
https://bugs.webkit.org/show_bug.cgi?id=227150


Reviewed by Dewei Zhu.

* Scripts/libraries/webkitcorepy/setup.py: Bump version.
* Scripts/libraries/webkitcorepy/webkitcorepy/__init__.py: Ditto.
* Scripts/libraries/webkitcorepy/webkitcorepy/nested_fuzzy_dict.py: Added.
(NestedFuzzyDict):
(NestedFuzzyDict.assert_valid_key): Ensure that the provided key is fuzz-able.
(NestedFuzzyDict.__init__): Construct the object the same way a dictionary is constructed.
(NestedFuzzyDict.__getitem__): Split provided keyname and fuzzy match the second part.
(NestedFuzzyDict.get): Ditto.
(NestedFuzzyDict.getitem): Return the complete keyname and value.
(NestedFuzzyDict.__setitem__): Add value to dictionary.
(NestedFuzzyDict.update): Given a dictionary, insert it's contents into this object.
(NestedFuzzyDict.keys): Iterate through all keys in the object.
(NestedFuzzyDict.values): Iterate through all values in the object.
(NestedFuzzyDict.items): Iterate through all key/value pairs in the object.
(NestedFuzzyDict.dict): Return a standard dictionary with the contents of this object.
(NestedFuzzyDict.__repr__):
(NestedFuzzyDict.__str__):
* Scripts/libraries/webkitcorepy/webkitcorepy/tests/nested_fuzzy_dict_unittest.py: Added.
(TestNestedFuzzyDict):
(TestNestedFuzzyDict.test_constructor):
(TestNestedFuzzyDict.test_index):
(TestNestedFuzzyDict.test_get):
(TestNestedFuzzyDict.test_getitem):
(TestNestedFuzzyDict.test_set):
(TestNestedFuzzyDict.test_dict):

Modified Paths

trunk/Tools/ChangeLog
trunk/Tools/Scripts/libraries/webkitcorepy/setup.py
trunk/Tools/Scripts/libraries/webkitcorepy/webkitcorepy/__init__.py


Added Paths

trunk/Tools/Scripts/libraries/webkitcorepy/webkitcorepy/nested_fuzzy_dict.py
trunk/Tools/Scripts/libraries/webkitcorepy/webkitcorepy/tests/nested_fuzzy_dict_unittest.py




Diff

Modified: trunk/Tools/ChangeLog (279380 => 279381)

--- trunk/Tools/ChangeLog	2021-06-29 19:07:43 UTC (rev 279380)
+++ trunk/Tools/ChangeLog	2021-06-29 19:27:13 UTC (rev 279381)
@@ -1,5 +1,39 @@
 2021-06-29  Jonathan Bedard  
 
+[webkitcorepy] Add NestedFuzzyDict
+https://bugs.webkit.org/show_bug.cgi?id=227150
+
+
+Reviewed by Dewei Zhu.
+
+* Scripts/libraries/webkitcorepy/setup.py: Bump version.
+* Scripts/libraries/webkitcorepy/webkitcorepy/__init__.py: Ditto.
+* Scripts/libraries/webkitcorepy/webkitcorepy/nested_fuzzy_dict.py: Added.
+(NestedFuzzyDict):
+(NestedFuzzyDict.assert_valid_key): Ensure that the provided key is fuzz-able.
+(NestedFuzzyDict.__init__): Construct the object the same way a dictionary is constructed.
+(NestedFuzzyDict.__getitem__): Split provided keyname and fuzzy match the second part.
+(NestedFuzzyDict.get): Ditto.
+(NestedFuzzyDict.getitem): Return the complete keyname and value.
+(NestedFuzzyDict.__setitem__): Add value to dictionary.
+(NestedFuzzyDict.update): Given a dictionary, insert it's contents into this object.
+(NestedFuzzyDict.keys): Iterate through all keys in the object.
+(NestedFuzzyDict.values): Iterate through all values in the object.
+(NestedFuzzyDict.items): Iterate through all key/value pairs in the object.
+(NestedFuzzyDict.dict): Return a standard dictionary with the contents of this object.
+(NestedFuzzyDict.__repr__):
+(NestedFuzzyDict.__str__):
+* Scripts/libraries/webkitcorepy/webkitcorepy/tests/nested_fuzzy_dict_unittest.py: Added.
+(TestNestedFuzzyDict):
+(TestNestedFuzzyDict.test_constructor):
+(TestNestedFuzzyDict.test_index):
+(TestNestedFuzzyDict.test_get):
+(TestNestedFuzzyDict.test_getitem):
+(TestNestedFuzzyDict.test_set):
+(TestNestedFuzzyDict.test_dict):
+
+2021-06-29  Jonathan Bedard  
+
 [webkitcorepy] Add MeasureTime python tool
 https://bugs.webkit.org/show_bug.cgi?id=227313
 


Modified: trunk/Tools/Scripts/libraries/webkitcorepy/setup.py (279380 => 279381)

--- trunk/Tools/Scripts/libraries/webkitcorepy/setup.py	2021-06-29 19:07:43 UTC (rev 279380)
+++ trunk/Tools/Scripts/libraries/webkitcorepy/setup.py	2021-06-29 19:27:13 UTC (rev 279381)
@@ -30,7 +30,7 @@
 
 setup(
 name='webkitcorepy',
-version='0.6.1',
+version='0.7.0',
 description='Library containing various Python support classes and functions.',
 long_description=readme(),
 classifiers=[


Modified: trunk/Tools/Scripts/libraries/webkitcorepy/webkitcorepy/__init__.py (279380 => 279381)

--- trunk/Tools/Scripts/libraries/webkitcorepy/webkitcorepy/__init__.py	2021-06-29 19:07:43 UTC (rev 279380)
+++ trunk/Tools/Scripts/libraries/webkitcorepy/webkitcorepy/__init__.py	2021-06-29 19:27:13 UTC (rev 279381)
@@ -37,8 +37,9 @@
 from webkitcorepy.task_pool import 

[webkit-changes] [279377] trunk/Tools

2021-06-29 Thread jbedard
Title: [279377] trunk/Tools








Revision 279377
Author jbed...@apple.com
Date 2021-06-29 11:07:34 -0700 (Tue, 29 Jun 2021)


Log Message
[webkitcorepy] Add MeasureTime python tool
https://bugs.webkit.org/show_bug.cgi?id=227313


Reviewed by Dewei Zhu.

* Scripts/libraries/webkitcorepy/setup.py: Bump version.
* Scripts/libraries/webkitcorepy/webkitcorepy/__init__.py: Ditto.
* Scripts/libraries/webkitcorepy/webkitcorepy/__init__.py: Export MeasureTime object.
* Scripts/libraries/webkitcorepy/webkitcorepy/measure_time.py: Added.
(MeasureTime): Provide class which logs time elapsed in context.
* Scripts/libraries/webkitcorepy/webkitcorepy/tests/measure_time_unittest.py: Added.
(MeasureTimeTests):

Modified Paths

trunk/Tools/ChangeLog
trunk/Tools/Scripts/libraries/webkitcorepy/setup.py
trunk/Tools/Scripts/libraries/webkitcorepy/webkitcorepy/__init__.py


Added Paths

trunk/Tools/Scripts/libraries/webkitcorepy/webkitcorepy/measure_time.py
trunk/Tools/Scripts/libraries/webkitcorepy/webkitcorepy/tests/measure_time_unittest.py




Diff

Modified: trunk/Tools/ChangeLog (279376 => 279377)

--- trunk/Tools/ChangeLog	2021-06-29 18:00:06 UTC (rev 279376)
+++ trunk/Tools/ChangeLog	2021-06-29 18:07:34 UTC (rev 279377)
@@ -1,3 +1,19 @@
+2021-06-29  Jonathan Bedard  
+
+[webkitcorepy] Add MeasureTime python tool
+https://bugs.webkit.org/show_bug.cgi?id=227313
+
+
+Reviewed by Dewei Zhu.
+
+* Scripts/libraries/webkitcorepy/setup.py: Bump version.
+* Scripts/libraries/webkitcorepy/webkitcorepy/__init__.py: Ditto.
+* Scripts/libraries/webkitcorepy/webkitcorepy/__init__.py: Export MeasureTime object.
+* Scripts/libraries/webkitcorepy/webkitcorepy/measure_time.py: Added.
+(MeasureTime): Provide class which logs time elapsed in context.
+* Scripts/libraries/webkitcorepy/webkitcorepy/tests/measure_time_unittest.py: Added.
+(MeasureTimeTests):
+
 2021-06-28  Wenson Hsieh  
 
 REGRESSION (r279310): Occasional crash when focusing login fields on iPad with a software keyboard


Modified: trunk/Tools/Scripts/libraries/webkitcorepy/setup.py (279376 => 279377)

--- trunk/Tools/Scripts/libraries/webkitcorepy/setup.py	2021-06-29 18:00:06 UTC (rev 279376)
+++ trunk/Tools/Scripts/libraries/webkitcorepy/setup.py	2021-06-29 18:07:34 UTC (rev 279377)
@@ -30,7 +30,7 @@
 
 setup(
 name='webkitcorepy',
-version='0.6.0',
+version='0.6.1',
 description='Library containing various Python support classes and functions.',
 long_description=readme(),
 classifiers=[


Modified: trunk/Tools/Scripts/libraries/webkitcorepy/webkitcorepy/__init__.py (279376 => 279377)

--- trunk/Tools/Scripts/libraries/webkitcorepy/webkitcorepy/__init__.py	2021-06-29 18:00:06 UTC (rev 279376)
+++ trunk/Tools/Scripts/libraries/webkitcorepy/webkitcorepy/__init__.py	2021-06-29 18:07:34 UTC (rev 279377)
@@ -36,8 +36,9 @@
 from webkitcorepy.output_capture import LoggerCapture, OutputCapture, OutputDuplicate
 from webkitcorepy.task_pool import TaskPool
 from webkitcorepy.credentials import credentials
+from webkitcorepy.measure_time import MeasureTime
 
-version = Version(0, 6, 0)
+version = Version(0, 6, 1)
 
 from webkitcorepy.autoinstall import Package, AutoInstall
 if sys.version_info > (3, 0):


Copied: trunk/Tools/Scripts/libraries/webkitcorepy/webkitcorepy/measure_time.py (from rev 279375, trunk/Tools/Scripts/libraries/webkitcorepy/setup.py) (0 => 279377)

--- trunk/Tools/Scripts/libraries/webkitcorepy/webkitcorepy/measure_time.py	(rev 0)
+++ trunk/Tools/Scripts/libraries/webkitcorepy/webkitcorepy/measure_time.py	2021-06-29 18:07:34 UTC (rev 279377)
@@ -0,0 +1,53 @@
+# Copyright (C) 2021 Apple Inc. All rights reserved.
+#
+# Redistribution and use in source and binary forms, with or without
+# modification, are permitted provided that the following conditions
+# are met:
+# 1.  Redistributions of source code must retain the above copyright
+#notice, this list of conditions and the following disclaimer.
+# 2.  Redistributions in binary form must reproduce the above copyright
+#notice, this list of conditions and the following disclaimer in the
+#documentation and/or other materials provided with the distribution.
+#
+# THIS SOFTWARE IS PROVIDED BY APPLE INC. AND ITS CONTRIBUTORS ``AS IS'' AND ANY
+# EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT LIMITED TO, THE IMPLIED
+# WARRANTIES OF MERCHANTABILITY AND FITNESS FOR A PARTICULAR PURPOSE ARE
+# DISCLAIMED. IN NO EVENT SHALL APPLE INC. OR ITS CONTRIBUTORS BE LIABLE FOR ANY
+# DIRECT, INDIRECT, INCIDENTAL, SPECIAL, EXEMPLARY, OR CONSEQUENTIAL DAMAGES
+# (INCLUDING, BUT NOT LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS OR SERVICES;
+# LOSS OF USE, DATA, OR PROFITS; OR BUSINESS INTERRUPTION) HOWEVER CAUSED AND ON
+# ANY THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT LIABILITY, OR TORT
+# (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY OUT OF THE USE OF THIS
+# 

[webkit-changes] [279347] trunk/Tools

2021-06-28 Thread jbedard
Title: [279347] trunk/Tools








Revision 279347
Author jbed...@apple.com
Date 2021-06-28 12:57:15 -0700 (Mon, 28 Jun 2021)


Log Message
[webkitcorepy] Add test suite with temp directory
https://bugs.webkit.org/show_bug.cgi?id=227327


Reviewed by Stephanie Lewis.

We had some duplicated code which set up, then cleaned up a temporary
directory associated with a test. This should really be owned by a
base class shared between multiple test suites.

* Scripts/libraries/webkitcorepy/setup.py: Bump version.
* Scripts/libraries/webkitcorepy/webkitcorepy/__init__.py: Ditto.
* Scripts/libraries/webkitcorepy/webkitcorepy/testing.py: Added.
(PathTestCase): Create a temporary directory before a test starts, delete it after.
* Scripts/libraries/webkitscmpy/webkitscmpy/test/canonicalize_unittest.py:
(TestCanonicalize): Adopt PathTestCase.
* Scripts/libraries/webkitscmpy/webkitscmpy/test/checkout_unittest.py:
(TestCheckout): Adopt PathTestCase.
* Scripts/libraries/webkitscmpy/webkitscmpy/test/find_unittest.py:
(TestFind): Adopt PathTestCase.
* Scripts/libraries/webkitscmpy/webkitscmpy/test/git_unittest.py:
(TestGit): Adopt PathTestCase.
* Scripts/libraries/webkitscmpy/webkitscmpy/test/scm_unittest.py:
(TestScm): Adopt PathTestCase.
* Scripts/libraries/webkitscmpy/webkitscmpy/test/setup_git_svn_unittest.py:
(TestSetupGitSvn): Adopt PathTestCase.
* Scripts/libraries/webkitscmpy/webkitscmpy/test/svn_unittest.py:
(TestLocalSvn): Adopt PathTestCase.

Modified Paths

trunk/Tools/ChangeLog
trunk/Tools/Scripts/libraries/webkitcorepy/setup.py
trunk/Tools/Scripts/libraries/webkitcorepy/webkitcorepy/__init__.py
trunk/Tools/Scripts/libraries/webkitscmpy/webkitscmpy/test/canonicalize_unittest.py
trunk/Tools/Scripts/libraries/webkitscmpy/webkitscmpy/test/checkout_unittest.py
trunk/Tools/Scripts/libraries/webkitscmpy/webkitscmpy/test/find_unittest.py
trunk/Tools/Scripts/libraries/webkitscmpy/webkitscmpy/test/git_unittest.py
trunk/Tools/Scripts/libraries/webkitscmpy/webkitscmpy/test/scm_unittest.py
trunk/Tools/Scripts/libraries/webkitscmpy/webkitscmpy/test/setup_git_svn_unittest.py
trunk/Tools/Scripts/libraries/webkitscmpy/webkitscmpy/test/svn_unittest.py


Added Paths

trunk/Tools/Scripts/libraries/webkitcorepy/webkitcorepy/testing.py




Diff

Modified: trunk/Tools/ChangeLog (279346 => 279347)

--- trunk/Tools/ChangeLog	2021-06-28 19:56:01 UTC (rev 279346)
+++ trunk/Tools/ChangeLog	2021-06-28 19:57:15 UTC (rev 279347)
@@ -1,5 +1,36 @@
 2021-06-28  Jonathan Bedard  
 
+[webkitcorepy] Add test suite with temp directory
+https://bugs.webkit.org/show_bug.cgi?id=227327
+
+
+Reviewed by Stephanie Lewis.
+
+We had some duplicated code which set up, then cleaned up a temporary
+directory associated with a test. This should really be owned by a
+base class shared between multiple test suites.
+
+* Scripts/libraries/webkitcorepy/setup.py: Bump version.
+* Scripts/libraries/webkitcorepy/webkitcorepy/__init__.py: Ditto.
+* Scripts/libraries/webkitcorepy/webkitcorepy/testing.py: Added.
+(PathTestCase): Create a temporary directory before a test starts, delete it after.
+* Scripts/libraries/webkitscmpy/webkitscmpy/test/canonicalize_unittest.py:
+(TestCanonicalize): Adopt PathTestCase.
+* Scripts/libraries/webkitscmpy/webkitscmpy/test/checkout_unittest.py:
+(TestCheckout): Adopt PathTestCase.
+* Scripts/libraries/webkitscmpy/webkitscmpy/test/find_unittest.py:
+(TestFind): Adopt PathTestCase.
+* Scripts/libraries/webkitscmpy/webkitscmpy/test/git_unittest.py:
+(TestGit): Adopt PathTestCase.
+* Scripts/libraries/webkitscmpy/webkitscmpy/test/scm_unittest.py:
+(TestScm): Adopt PathTestCase.
+* Scripts/libraries/webkitscmpy/webkitscmpy/test/setup_git_svn_unittest.py:
+(TestSetupGitSvn): Adopt PathTestCase.
+* Scripts/libraries/webkitscmpy/webkitscmpy/test/svn_unittest.py:
+(TestLocalSvn): Adopt PathTestCase.
+
+2021-06-28  Jonathan Bedard  
+
 [webkitcorepy] Fix race condition in TaskPool unittests 
 https://bugs.webkit.org/show_bug.cgi?id=227455
 


Modified: trunk/Tools/Scripts/libraries/webkitcorepy/setup.py (279346 => 279347)

--- trunk/Tools/Scripts/libraries/webkitcorepy/setup.py	2021-06-28 19:56:01 UTC (rev 279346)
+++ trunk/Tools/Scripts/libraries/webkitcorepy/setup.py	2021-06-28 19:57:15 UTC (rev 279347)
@@ -30,7 +30,7 @@
 
 setup(
 name='webkitcorepy',
-version='0.5.19',
+version='0.6.0',
 description='Library containing various Python support classes and functions.',
 long_description=readme(),
 classifiers=[


Modified: trunk/Tools/Scripts/libraries/webkitcorepy/webkitcorepy/__init__.py (279346 => 279347)

--- trunk/Tools/Scripts/libraries/webkitcorepy/webkitcorepy/__init__.py	2021-06-28 19:56:01 UTC (rev 279346)
+++ trunk/Tools/Scripts/libraries/webkitcorepy/webkitcorepy/__init__.py	

[webkit-changes] [279345] trunk/Tools

2021-06-28 Thread jbedard
Title: [279345] trunk/Tools








Revision 279345
Author jbed...@apple.com
Date 2021-06-28 12:11:31 -0700 (Mon, 28 Jun 2021)


Log Message
[webkitcorepy] Fix race condition in TaskPool unittests
https://bugs.webkit.org/show_bug.cgi?id=227455


Reviewed by Dewei Zhu.

* Scripts/libraries/webkitcorepy/webkitcorepy/tests/task_pool_unittest.py:
(TaskPoolUnittest.test_invalid_shutdown): Increase worker load to 5 seconds.

Modified Paths

trunk/Tools/ChangeLog
trunk/Tools/Scripts/libraries/webkitcorepy/webkitcorepy/tests/task_pool_unittest.py




Diff

Modified: trunk/Tools/ChangeLog (279344 => 279345)

--- trunk/Tools/ChangeLog	2021-06-28 19:07:34 UTC (rev 279344)
+++ trunk/Tools/ChangeLog	2021-06-28 19:11:31 UTC (rev 279345)
@@ -1,3 +1,14 @@
+2021-06-28  Jonathan Bedard  
+
+[webkitcorepy] Fix race condition in TaskPool unittests 
+https://bugs.webkit.org/show_bug.cgi?id=227455
+
+
+Reviewed by Dewei Zhu.
+
+* Scripts/libraries/webkitcorepy/webkitcorepy/tests/task_pool_unittest.py:
+(TaskPoolUnittest.test_invalid_shutdown): Increase worker load to 5 seconds.
+
 2021-06-28  Alex Christensen  
 
 RELEASE_ASSERT hit in NetworkSessionCocoa::removeWebSocketTask when using WKWebViewConfiguration._attributedBundleIdentifier


Modified: trunk/Tools/Scripts/libraries/webkitcorepy/webkitcorepy/tests/task_pool_unittest.py (279344 => 279345)

--- trunk/Tools/Scripts/libraries/webkitcorepy/webkitcorepy/tests/task_pool_unittest.py	2021-06-28 19:07:34 UTC (rev 279344)
+++ trunk/Tools/Scripts/libraries/webkitcorepy/webkitcorepy/tests/task_pool_unittest.py	2021-06-28 19:11:31 UTC (rev 279345)
@@ -173,4 +173,4 @@
 with OutputCapture():
 with self.assertRaises(TaskPool.Exception):
 with TaskPool(workers=1, teardown=teardown, grace_period=1, force_fork=True) as pool:
-pool.do(wait, 2)
+pool.do(wait, 5)






___
webkit-changes mailing list
webkit-changes@lists.webkit.org
https://lists.webkit.org/mailman/listinfo/webkit-changes


[webkit-changes] [279149] trunk/Tools

2021-06-22 Thread jbedard
Title: [279149] trunk/Tools








Revision 279149
Author jbed...@apple.com
Date 2021-06-22 14:25:36 -0700 (Tue, 22 Jun 2021)


Log Message
[results.webkit.org] XSS vulnerability in configuration
https://bugs.webkit.org/show_bug.cgi?id=227267


Reviewed by Dewei Zhu.

* Scripts/libraries/resultsdbpy/resultsdbpy/__init__.py: Bump version.
* Scripts/libraries/resultsdbpy/resultsdbpy/view/static/js/drawer.js: Escape configuration specification.
* Scripts/libraries/resultsdbpy/setup.py: Bump version.

Modified Paths

trunk/Tools/ChangeLog
trunk/Tools/Scripts/libraries/resultsdbpy/resultsdbpy/__init__.py
trunk/Tools/Scripts/libraries/resultsdbpy/resultsdbpy/view/static/js/drawer.js
trunk/Tools/Scripts/libraries/resultsdbpy/setup.py




Diff

Modified: trunk/Tools/ChangeLog (279148 => 279149)

--- trunk/Tools/ChangeLog	2021-06-22 21:25:02 UTC (rev 279148)
+++ trunk/Tools/ChangeLog	2021-06-22 21:25:36 UTC (rev 279149)
@@ -1,3 +1,15 @@
+2021-06-22  Jonathan Bedard  
+
+[results.webkit.org] XSS vulnerability in configuration
+https://bugs.webkit.org/show_bug.cgi?id=227267
+
+
+Reviewed by Dewei Zhu.
+
+* Scripts/libraries/resultsdbpy/resultsdbpy/__init__.py: Bump version.
+* Scripts/libraries/resultsdbpy/resultsdbpy/view/static/js/drawer.js: Escape configuration specification.
+* Scripts/libraries/resultsdbpy/setup.py: Bump version.
+
 2021-06-22  Saam Barati  
 
 jitCompileAndSetHeuristics shouldn't return true when we fail to compile


Modified: trunk/Tools/Scripts/libraries/resultsdbpy/resultsdbpy/__init__.py (279148 => 279149)

--- trunk/Tools/Scripts/libraries/resultsdbpy/resultsdbpy/__init__.py	2021-06-22 21:25:02 UTC (rev 279148)
+++ trunk/Tools/Scripts/libraries/resultsdbpy/resultsdbpy/__init__.py	2021-06-22 21:25:36 UTC (rev 279149)
@@ -44,7 +44,7 @@
 "Please install webkitcorepy with `pip install webkitcorepy --extra-index-url `"
 )
 
-version = Version(3, 0, 1)
+version = Version(3, 0, 2)
 
 import webkitflaskpy
 


Modified: trunk/Tools/Scripts/libraries/resultsdbpy/resultsdbpy/view/static/js/drawer.js (279148 => 279149)

--- trunk/Tools/Scripts/libraries/resultsdbpy/resultsdbpy/view/static/js/drawer.js	2021-06-22 21:25:02 UTC (rev 279148)
+++ trunk/Tools/Scripts/libraries/resultsdbpy/resultsdbpy/view/static/js/drawer.js	2021-06-22 21:25:36 UTC (rev 279149)
@@ -22,7 +22,7 @@
 // THE POSSIBILITY OF SUCH DAMAGE.
 
 import {DOM, REF} from '/library/js/Ref.js';
-import {queryToParams, paramsToQuery, QueryModifier} from '/assets/js/common.js';
+import {queryToParams, paramsToQuery, QueryModifier, escapeHTML} from '/assets/js/common.js';
 import {CommitBank} from '/assets/js/commit.js';
 import {Configuration} from '/assets/js/configuration.js'
 
@@ -315,7 +315,7 @@
 });
 
 return `
-${option}
+${escapeHTML(option)}
 
 
 


Modified: trunk/Tools/Scripts/libraries/resultsdbpy/setup.py (279148 => 279149)

--- trunk/Tools/Scripts/libraries/resultsdbpy/setup.py	2021-06-22 21:25:02 UTC (rev 279148)
+++ trunk/Tools/Scripts/libraries/resultsdbpy/setup.py	2021-06-22 21:25:36 UTC (rev 279149)
@@ -30,7 +30,7 @@
 
 setup(
 name='resultsdbpy',
-version='3.0.1',
+version='3.0.2',
 description='Library for visualizing, processing and storing test results.',
 long_description=readme(),
 classifiers=[






___
webkit-changes mailing list
webkit-changes@lists.webkit.org
https://lists.webkit.org/mailman/listinfo/webkit-changes


[webkit-changes] [279094] trunk/Tools

2021-06-21 Thread jbedard
Title: [279094] trunk/Tools








Revision 279094
Author jbed...@apple.com
Date 2021-06-21 17:40:48 -0700 (Mon, 21 Jun 2021)


Log Message
[results.webkit.org] XSS vulnerability in test name
https://bugs.webkit.org/show_bug.cgi?id=227235


Reviewed by Alexey Proskuryakov.

* Scripts/libraries/resultsdbpy/resultsdbpy/__init__.py: Bump version.
* Scripts/libraries/resultsdbpy/resultsdbpy/view/static/js/archiveRouter.js:
(_ArchiveRouter.prototype.labelFor): Escape any HTML in a potential label.
* Scripts/libraries/resultsdbpy/resultsdbpy/view/static/js/common.js:
(escapeHTML): If an object is undefined, don't attempt to escape it.
* Scripts/libraries/resultsdbpy/resultsdbpy/view/static/js/configuration.js:
(Configuration.prototype.toString): Escape configuration parameters.
* Scripts/libraries/resultsdbpy/resultsdbpy/view/templates/investigate.html:
* Scripts/libraries/resultsdbpy/resultsdbpy/view/templates/search.html:
* Scripts/libraries/resultsdbpy/resultsdbpy/view/templates/suite_results.html:
* Scripts/libraries/resultsdbpy/setup.py:

Modified Paths

trunk/Tools/ChangeLog
trunk/Tools/Scripts/libraries/resultsdbpy/resultsdbpy/__init__.py
trunk/Tools/Scripts/libraries/resultsdbpy/resultsdbpy/view/static/js/archiveRouter.js
trunk/Tools/Scripts/libraries/resultsdbpy/resultsdbpy/view/static/js/common.js
trunk/Tools/Scripts/libraries/resultsdbpy/resultsdbpy/view/static/js/configuration.js
trunk/Tools/Scripts/libraries/resultsdbpy/resultsdbpy/view/templates/investigate.html
trunk/Tools/Scripts/libraries/resultsdbpy/resultsdbpy/view/templates/search.html
trunk/Tools/Scripts/libraries/resultsdbpy/resultsdbpy/view/templates/suite_results.html
trunk/Tools/Scripts/libraries/resultsdbpy/setup.py




Diff

Modified: trunk/Tools/ChangeLog (279093 => 279094)

--- trunk/Tools/ChangeLog	2021-06-22 00:22:44 UTC (rev 279093)
+++ trunk/Tools/ChangeLog	2021-06-22 00:40:48 UTC (rev 279094)
@@ -1,3 +1,23 @@
+2021-06-21  Jonathan Bedard  
+
+[results.webkit.org] XSS vulnerability in test name
+https://bugs.webkit.org/show_bug.cgi?id=227235
+
+
+Reviewed by Alexey Proskuryakov.
+
+* Scripts/libraries/resultsdbpy/resultsdbpy/__init__.py: Bump version.
+* Scripts/libraries/resultsdbpy/resultsdbpy/view/static/js/archiveRouter.js:
+(_ArchiveRouter.prototype.labelFor): Escape any HTML in a potential label.
+* Scripts/libraries/resultsdbpy/resultsdbpy/view/static/js/common.js:
+(escapeHTML): If an object is undefined, don't attempt to escape it.
+* Scripts/libraries/resultsdbpy/resultsdbpy/view/static/js/configuration.js:
+(Configuration.prototype.toString): Escape configuration parameters.
+* Scripts/libraries/resultsdbpy/resultsdbpy/view/templates/investigate.html:
+* Scripts/libraries/resultsdbpy/resultsdbpy/view/templates/search.html:
+* Scripts/libraries/resultsdbpy/resultsdbpy/view/templates/suite_results.html:
+* Scripts/libraries/resultsdbpy/setup.py:
+
 2021-06-21  Kate Cheney  
 
 Migrate App Privacy Report code from WebKitAdditions


Modified: trunk/Tools/Scripts/libraries/resultsdbpy/resultsdbpy/__init__.py (279093 => 279094)

--- trunk/Tools/Scripts/libraries/resultsdbpy/resultsdbpy/__init__.py	2021-06-22 00:22:44 UTC (rev 279093)
+++ trunk/Tools/Scripts/libraries/resultsdbpy/resultsdbpy/__init__.py	2021-06-22 00:40:48 UTC (rev 279094)
@@ -44,7 +44,7 @@
 "Please install webkitcorepy with `pip install webkitcorepy --extra-index-url `"
 )
 
-version = Version(3, 0, 0)
+version = Version(3, 0, 1)
 
 import webkitflaskpy
 


Modified: trunk/Tools/Scripts/libraries/resultsdbpy/resultsdbpy/view/static/js/archiveRouter.js (279093 => 279094)

--- trunk/Tools/Scripts/libraries/resultsdbpy/resultsdbpy/view/static/js/archiveRouter.js	2021-06-22 00:22:44 UTC (rev 279093)
+++ trunk/Tools/Scripts/libraries/resultsdbpy/resultsdbpy/view/static/js/archiveRouter.js	2021-06-22 00:40:48 UTC (rev 279094)
@@ -21,6 +21,8 @@
 // ARISING IN ANY WAY OUT OF THE USE OF THIS SOFTWARE, EVEN IF ADVISED OF
 // THE POSSIBILITY OF SUCH DAMAGE.
 
+import {escapeHTML} from '/assets/js/common.js';
+
 class _ArchiveRouter {
 constructor() {
 this.routes = {};
@@ -71,7 +73,7 @@
 if (!this.hasArchive(suite))
 return null;
 
-return this._determineArgumentFromAncestry('label', 'Result archive', suite, mode);
+return escapeHTML(this._determineArgumentFromAncestry('label', 'Result archive', suite, mode));
 }
 };
 


Modified: trunk/Tools/Scripts/libraries/resultsdbpy/resultsdbpy/view/static/js/common.js (279093 => 279094)

--- trunk/Tools/Scripts/libraries/resultsdbpy/resultsdbpy/view/static/js/common.js	2021-06-22 00:22:44 UTC (rev 279093)
+++ trunk/Tools/Scripts/libraries/resultsdbpy/resultsdbpy/view/static/js/common.js	2021-06-22 00:40:48 UTC (rev 279094)
@@ -119,6 +119,8 @@
 
 // Based on 
 function escapeHTML(text) {
+if (!text)
+return text;
 return 

[webkit-changes] [279067] trunk/Tools

2021-06-21 Thread jbedard
Title: [279067] trunk/Tools








Revision 279067
Author jbed...@apple.com
Date 2021-06-21 08:51:06 -0700 (Mon, 21 Jun 2021)


Log Message
[resultsdbpy] Adopt autoinstaller (Follow-up fix)
https://bugs.webkit.org/show_bug.cgi?id=227096


Rubber-stamped by Aakash Jain.

* Scripts/libraries/resultsdbpy/container: Fix libraries path.
* Scripts/libraries/resultsdbpy/run: Ditto.
* Scripts/libraries/resultsdbpy/run-tests: Ditto.

Modified Paths

trunk/Tools/ChangeLog
trunk/Tools/Scripts/libraries/resultsdbpy/container
trunk/Tools/Scripts/libraries/resultsdbpy/run
trunk/Tools/Scripts/libraries/resultsdbpy/run-tests




Diff

Modified: trunk/Tools/ChangeLog (279066 => 279067)

--- trunk/Tools/ChangeLog	2021-06-21 15:08:43 UTC (rev 279066)
+++ trunk/Tools/ChangeLog	2021-06-21 15:51:06 UTC (rev 279067)
@@ -1,3 +1,15 @@
+2021-06-21  Jonathan Bedard  
+
+[resultsdbpy] Adopt autoinstaller (Follow-up fix)
+https://bugs.webkit.org/show_bug.cgi?id=227096
+
+
+Rubber-stamped by Aakash Jain.
+
+* Scripts/libraries/resultsdbpy/container: Fix libraries path.
+* Scripts/libraries/resultsdbpy/run: Ditto.
+* Scripts/libraries/resultsdbpy/run-tests: Ditto.
+
 2021-06-19  Commit Queue  
 
 Unreviewed, reverting r278699.


Modified: trunk/Tools/Scripts/libraries/resultsdbpy/container (279066 => 279067)

--- trunk/Tools/Scripts/libraries/resultsdbpy/container	2021-06-21 15:08:43 UTC (rev 279066)
+++ trunk/Tools/Scripts/libraries/resultsdbpy/container	2021-06-21 15:51:06 UTC (rev 279067)
@@ -29,7 +29,7 @@
 import resultsdbpy
 from webkitcorepy import AutoInstall
 
-libraries = os.path.join(os.path.abspath(os.path.dirname(os.path.dirname(os.path.dirname(__file__, 'libraries')
+libraries = os.path.dirname(os.path.dirname(os.path.abspath(__file__)))
 if sys.platform == 'darwin':
 is_root = not os.getuid()
 does_own_libraries = os.stat(libraries).st_uid == os.getuid()


Modified: trunk/Tools/Scripts/libraries/resultsdbpy/run (279066 => 279067)

--- trunk/Tools/Scripts/libraries/resultsdbpy/run	2021-06-21 15:08:43 UTC (rev 279066)
+++ trunk/Tools/Scripts/libraries/resultsdbpy/run	2021-06-21 15:51:06 UTC (rev 279067)
@@ -32,7 +32,7 @@
 import resultsdbpy
 from webkitcorepy import AutoInstall
 
-libraries = os.path.join(os.path.abspath(os.path.dirname(os.path.dirname(os.path.dirname(__file__, 'libraries')
+libraries = os.path.dirname(os.path.dirname(os.path.abspath(__file__)))
 if sys.platform == 'darwin':
 is_root = not os.getuid()
 does_own_libraries = os.stat(libraries).st_uid == os.getuid()


Modified: trunk/Tools/Scripts/libraries/resultsdbpy/run-tests (279066 => 279067)

--- trunk/Tools/Scripts/libraries/resultsdbpy/run-tests	2021-06-21 15:08:43 UTC (rev 279066)
+++ trunk/Tools/Scripts/libraries/resultsdbpy/run-tests	2021-06-21 15:51:06 UTC (rev 279067)
@@ -33,7 +33,7 @@
 import resultsdbpy
 from webkitcorepy import AutoInstall
 
-libraries = os.path.join(os.path.abspath(os.path.dirname(os.path.dirname(os.path.dirname(__file__, 'libraries')
+libraries = os.path.dirname(os.path.dirname(os.path.abspath(__file__)))
 if sys.platform == 'darwin':
 is_root = not os.getuid()
 does_own_libraries = os.stat(libraries).st_uid == os.getuid()






___
webkit-changes mailing list
webkit-changes@lists.webkit.org
https://lists.webkit.org/mailman/listinfo/webkit-changes


[webkit-changes] [279012] trunk/Tools

2021-06-17 Thread jbedard
Title: [279012] trunk/Tools








Revision 279012
Author jbed...@apple.com
Date 2021-06-17 15:03:03 -0700 (Thu, 17 Jun 2021)


Log Message
[resultsdbpy] Adopt autoinstaller
https://bugs.webkit.org/show_bug.cgi?id=227096


Rubber-stamped by Aakash Jain.

* Scripts/libraries/resultsdbpy/container: Moved from insdie library.
* Scripts/libraries/resultsdbpy/resultsdbpy/__init__.py: Register required libraries.
* Scripts/libraries/resultsdbpy/resultsdbpy/container: Moved to containing folder.
* Scripts/libraries/resultsdbpy/resultsdbpy/example/main.py:
* Scripts/libraries/resultsdbpy/resultsdbpy/run: Moved to containing folder.
* Scripts/libraries/resultsdbpy/resultsdbpy/view/view_routes_unittest.py: Use specific imports
* Scripts/libraries/resultsdbpy/run: Moved from insdie library.
* Scripts/libraries/resultsdbpy/run-tests: Use autoinstalled libraries.
* Scripts/libraries/resultsdbpy/setup.py: Bump version.

Modified Paths

trunk/Tools/ChangeLog
trunk/Tools/Scripts/libraries/resultsdbpy/resultsdbpy/__init__.py
trunk/Tools/Scripts/libraries/resultsdbpy/resultsdbpy/example/main.py
trunk/Tools/Scripts/libraries/resultsdbpy/resultsdbpy/view/view_routes_unittest.py
trunk/Tools/Scripts/libraries/resultsdbpy/setup.py


Added Paths

trunk/Tools/Scripts/libraries/resultsdbpy/container
trunk/Tools/Scripts/libraries/resultsdbpy/run
trunk/Tools/Scripts/libraries/resultsdbpy/run-tests


Removed Paths

trunk/Tools/Scripts/libraries/resultsdbpy/resultsdbpy/container
trunk/Tools/Scripts/libraries/resultsdbpy/resultsdbpy/run




Diff

Modified: trunk/Tools/ChangeLog (279011 => 279012)

--- trunk/Tools/ChangeLog	2021-06-17 22:01:55 UTC (rev 279011)
+++ trunk/Tools/ChangeLog	2021-06-17 22:03:03 UTC (rev 279012)
@@ -1,5 +1,23 @@
 2021-06-17  Jonathan Bedard  
 
+[resultsdbpy] Adopt autoinstaller
+https://bugs.webkit.org/show_bug.cgi?id=227096
+
+
+Rubber-stamped by Aakash Jain.
+
+* Scripts/libraries/resultsdbpy/container: Moved from insdie library.
+* Scripts/libraries/resultsdbpy/resultsdbpy/__init__.py: Register required libraries.
+* Scripts/libraries/resultsdbpy/resultsdbpy/container: Moved to containing folder.
+* Scripts/libraries/resultsdbpy/resultsdbpy/example/main.py:
+* Scripts/libraries/resultsdbpy/resultsdbpy/run: Moved to containing folder.
+* Scripts/libraries/resultsdbpy/resultsdbpy/view/view_routes_unittest.py: Use specific imports
+* Scripts/libraries/resultsdbpy/run: Moved from insdie library.
+* Scripts/libraries/resultsdbpy/run-tests: Use autoinstalled libraries.
+* Scripts/libraries/resultsdbpy/setup.py: Bump version.
+
+2021-06-17  Jonathan Bedard  
+
 [webkitcorepy] Retry downloads in Autoinstall
 https://bugs.webkit.org/show_bug.cgi?id=227134
 


Copied: trunk/Tools/Scripts/libraries/resultsdbpy/container (from rev 279011, trunk/Tools/Scripts/libraries/resultsdbpy/resultsdbpy/container) (0 => 279012)

--- trunk/Tools/Scripts/libraries/resultsdbpy/container	(rev 0)
+++ trunk/Tools/Scripts/libraries/resultsdbpy/container	2021-06-17 22:03:03 UTC (rev 279012)
@@ -0,0 +1,83 @@
+#!/usr/bin/env python3
+
+# Copyright (C) 2020, 2021 Apple Inc. All rights reserved.
+#
+# Redistribution and use in source and binary forms, with or without
+# modification, are permitted provided that the following conditions
+# are met:
+# 1.  Redistributions of source code must retain the above copyright
+# notice, this list of conditions and the following disclaimer.
+# 2.  Redistributions in binary form must reproduce the above copyright
+# notice, this list of conditions and the following disclaimer in the
+# documentation and/or other materials provided with the distribution.
+#
+# THIS SOFTWARE IS PROVIDED BY APPLE INC. AND ITS CONTRIBUTORS "AS IS" AND
+# ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT LIMITED TO, THE IMPLIED
+# WARRANTIES OF MERCHANTABILITY AND FITNESS FOR A PARTICULAR PURPOSE ARE
+# DISCLAIMED. IN NO EVENT SHALL APPLE INC. OR ITS CONTRIBUTORS BE LIABLE FOR
+# ANY DIRECT, INDIRECT, INCIDENTAL, SPECIAL, EXEMPLARY, OR CONSEQUENTIAL
+# DAMAGES (INCLUDING, BUT NOT LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS OR
+# SERVICES; LOSS OF USE, DATA, OR PROFITS; OR BUSINESS INTERRUPTION) HOWEVER
+# CAUSED AND ON ANY THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT LIABILITY,
+# OR TORT (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY OUT OF THE USE
+# OF THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE.
+
+import argparse
+import os
+import sys
+
+import resultsdbpy
+from webkitcorepy import AutoInstall
+
+libraries = os.path.join(os.path.abspath(os.path.dirname(os.path.dirname(os.path.dirname(__file__, 'libraries')
+if sys.platform == 'darwin':
+is_root = not os.getuid()
+does_own_libraries = os.stat(libraries).st_uid == os.getuid()
+if (is_root or not does_own_libraries):
+libraries = 

[webkit-changes] [279009] trunk/Tools

2021-06-17 Thread jbedard
Title: [279009] trunk/Tools








Revision 279009
Author jbed...@apple.com
Date 2021-06-17 14:27:17 -0700 (Thu, 17 Jun 2021)


Log Message
[webkitcorepy] Retry downloads in Autoinstall
https://bugs.webkit.org/show_bug.cgi?id=227134


Reviewed by Aakash Jain.

* Scripts/libraries/webkitcorepy/setup.py: Bump version.
* Scripts/libraries/webkitcorepy/webkitcorepy/__init__.py: Ditto.
* Scripts/libraries/webkitcorepy/webkitcorepy/autoinstall.py:
(Package.Archive.download): Retry failed downloads
(AutoInstall): Allow for a single retry by default

Modified Paths

trunk/Tools/ChangeLog
trunk/Tools/Scripts/libraries/webkitcorepy/setup.py
trunk/Tools/Scripts/libraries/webkitcorepy/webkitcorepy/__init__.py
trunk/Tools/Scripts/libraries/webkitcorepy/webkitcorepy/autoinstall.py




Diff

Modified: trunk/Tools/ChangeLog (279008 => 279009)

--- trunk/Tools/ChangeLog	2021-06-17 21:12:45 UTC (rev 279008)
+++ trunk/Tools/ChangeLog	2021-06-17 21:27:17 UTC (rev 279009)
@@ -1,3 +1,17 @@
+2021-06-17  Jonathan Bedard  
+
+[webkitcorepy] Retry downloads in Autoinstall
+https://bugs.webkit.org/show_bug.cgi?id=227134
+
+
+Reviewed by Aakash Jain.
+
+* Scripts/libraries/webkitcorepy/setup.py: Bump version.
+* Scripts/libraries/webkitcorepy/webkitcorepy/__init__.py: Ditto.
+* Scripts/libraries/webkitcorepy/webkitcorepy/autoinstall.py:
+(Package.Archive.download): Retry failed downloads
+(AutoInstall): Allow for a single retry by default
+
 2021-06-17  Chris Dumez  
 
 Trying to take empty snapshots of the view should not cause crashes


Modified: trunk/Tools/Scripts/libraries/webkitcorepy/setup.py (279008 => 279009)

--- trunk/Tools/Scripts/libraries/webkitcorepy/setup.py	2021-06-17 21:12:45 UTC (rev 279008)
+++ trunk/Tools/Scripts/libraries/webkitcorepy/setup.py	2021-06-17 21:27:17 UTC (rev 279009)
@@ -30,7 +30,7 @@
 
 setup(
 name='webkitcorepy',
-version='0.5.18',
+version='0.5.19',
 description='Library containing various Python support classes and functions.',
 long_description=readme(),
 classifiers=[


Modified: trunk/Tools/Scripts/libraries/webkitcorepy/webkitcorepy/__init__.py (279008 => 279009)

--- trunk/Tools/Scripts/libraries/webkitcorepy/webkitcorepy/__init__.py	2021-06-17 21:12:45 UTC (rev 279008)
+++ trunk/Tools/Scripts/libraries/webkitcorepy/webkitcorepy/__init__.py	2021-06-17 21:27:17 UTC (rev 279009)
@@ -37,7 +37,7 @@
 from webkitcorepy.task_pool import TaskPool
 from webkitcorepy.credentials import credentials
 
-version = Version(0, 5, 18)
+version = Version(0, 5, 19)
 
 from webkitcorepy.autoinstall import Package, AutoInstall
 if sys.version_info > (3, 0):


Modified: trunk/Tools/Scripts/libraries/webkitcorepy/webkitcorepy/autoinstall.py (279008 => 279009)

--- trunk/Tools/Scripts/libraries/webkitcorepy/webkitcorepy/autoinstall.py	2021-06-17 21:12:45 UTC (rev 279008)
+++ trunk/Tools/Scripts/libraries/webkitcorepy/webkitcorepy/autoinstall.py	2021-06-17 21:27:17 UTC (rev 279009)
@@ -96,18 +96,30 @@
 
 def download(self):
 AutoInstall._verify_index()
-response = AutoInstall._request(self.link)
-try:
-if response.code != 200:
-raise IOError('Failed to retrieve Python module with response code {}'.format(response.code))
-with open(self.path, 'wb') as file:
-while True:
-data = "" ** 13)
-if not data:
-break
-file.write(data)
-finally:
-response.close()
+count = 0
+while count <= (AutoInstall.times_to_retry or 0):
+response = None
+try:
+response = AutoInstall._request(self.link)
+if not response or response.code != 200:
+raise IOError('Failed to retrieve Python module with response code {}'.format(response.code))
+with open(self.path, 'wb') as file:
+while True:
+data = "" ** 13)
+if not data:
+break
+file.write(data)
+return
+except (IOError, URLError) as e:
+if count > (AutoInstall.times_to_retry or 0):
+raise
+else:
+AutoInstall.log(str(e))
+AutoInstall.log('Failed to download {}, retrying'.format(self.name))
+finally:
+if response:
+response.close()
+count += 1
 
 def unpack(self, target):
 if not os.path.isfile(self.path):
@@ -378,6 +390,7 @@
 directory = None
 index = _default_pypi_index()
 timeout = 30
+times_to_retry = 1
 

[webkit-changes] [278963] trunk/Tools

2021-06-16 Thread jbedard
Title: [278963] trunk/Tools








Revision 278963
Author jbed...@apple.com
Date 2021-06-16 15:41:35 -0700 (Wed, 16 Jun 2021)


Log Message
[webkitscmpy] Support branch queries in mock git log
https://bugs.webkit.org/show_bug.cgi?id=225889


Reviewed by Stephanie Lewis.

* Scripts/libraries/webkitscmpy/setup.py: Bump version.
* Scripts/libraries/webkitscmpy/webkitscmpy/__init__.py: Ditto.
* Scripts/libraries/webkitscmpy/webkitscmpy/mocks/local/git.py: Add support for branches in
`git log` commands.
* Scripts/libraries/webkitscmpy/webkitscmpy/test/git_unittest.py:
(TestGit.test_log):
(TestGit.test_branch_log):

Modified Paths

trunk/Tools/ChangeLog
trunk/Tools/Scripts/libraries/webkitscmpy/setup.py
trunk/Tools/Scripts/libraries/webkitscmpy/webkitscmpy/__init__.py
trunk/Tools/Scripts/libraries/webkitscmpy/webkitscmpy/mocks/local/git.py
trunk/Tools/Scripts/libraries/webkitscmpy/webkitscmpy/test/git_unittest.py




Diff

Modified: trunk/Tools/ChangeLog (278962 => 278963)

--- trunk/Tools/ChangeLog	2021-06-16 22:39:29 UTC (rev 278962)
+++ trunk/Tools/ChangeLog	2021-06-16 22:41:35 UTC (rev 278963)
@@ -1,5 +1,21 @@
 2021-06-16  Jonathan Bedard  
 
+[webkitscmpy] Support branch queries in mock git log
+https://bugs.webkit.org/show_bug.cgi?id=225889
+
+
+Reviewed by Stephanie Lewis.
+
+* Scripts/libraries/webkitscmpy/setup.py: Bump version.
+* Scripts/libraries/webkitscmpy/webkitscmpy/__init__.py: Ditto.
+* Scripts/libraries/webkitscmpy/webkitscmpy/mocks/local/git.py: Add support for branches in
+`git log` commands.
+* Scripts/libraries/webkitscmpy/webkitscmpy/test/git_unittest.py:
+(TestGit.test_log):
+(TestGit.test_branch_log):
+
+2021-06-16  Jonathan Bedard  
+
 [webkitscmpy] Cache more Git commands
 https://bugs.webkit.org/show_bug.cgi?id=227082
 


Modified: trunk/Tools/Scripts/libraries/webkitscmpy/setup.py (278962 => 278963)

--- trunk/Tools/Scripts/libraries/webkitscmpy/setup.py	2021-06-16 22:39:29 UTC (rev 278962)
+++ trunk/Tools/Scripts/libraries/webkitscmpy/setup.py	2021-06-16 22:41:35 UTC (rev 278963)
@@ -29,7 +29,7 @@
 
 setup(
 name='webkitscmpy',
-version='0.14.5',
+version='0.14.6',
 description='Library designed to interact with git and svn repositories.',
 long_description=readme(),
 classifiers=[


Modified: trunk/Tools/Scripts/libraries/webkitscmpy/webkitscmpy/__init__.py (278962 => 278963)

--- trunk/Tools/Scripts/libraries/webkitscmpy/webkitscmpy/__init__.py	2021-06-16 22:39:29 UTC (rev 278962)
+++ trunk/Tools/Scripts/libraries/webkitscmpy/webkitscmpy/__init__.py	2021-06-16 22:41:35 UTC (rev 278963)
@@ -46,7 +46,7 @@
 "Please install webkitcorepy with `pip install webkitcorepy --extra-index-url `"
 )
 
-version = Version(0, 14, 5)
+version = Version(0, 14, 6)
 
 AutoInstall.register(Package('fasteners', Version(0, 15, 0)))
 AutoInstall.register(Package('monotonic', Version(1, 5)))


Modified: trunk/Tools/Scripts/libraries/webkitscmpy/webkitscmpy/mocks/local/git.py (278962 => 278963)

--- trunk/Tools/Scripts/libraries/webkitscmpy/webkitscmpy/mocks/local/git.py	2021-06-16 22:39:29 UTC (rev 278962)
+++ trunk/Tools/Scripts/libraries/webkitscmpy/webkitscmpy/mocks/local/git.py	2021-06-16 22:41:35 UTC (rev 278963)
@@ -253,7 +253,7 @@
 'AuthorDate: {date}\n'
 'Commit: {author} <{email}>\n'
 'CommitDate: {date}\n'
-'\n{log}'.format(
+'\n{log}\n'.format(
 hash=commit.hash,
 author=commit.author.name,
 email=commit.author.email,
@@ -353,7 +353,7 @@
 return self.commits[self.default_branch][found.branch_point - difference - 1]
 return None
 
-something = str(something)
+something = str(something).replace('remotes/', '')
 if '..' in something:
 a, b = something.split('..')
 a = self.find(a)
@@ -501,28 +501,43 @@
 )
 
 def commits_in_range(self, begin, end):
+begin = begin.replace('remotes/', '') if begin else begin
+end = end.replace('remotes/', '') if end else end
+
+if begin and self.remotes.get(begin):
+begin = self.remotes.get(begin).hash
+if end and self.remotes.get(end):
+end = self.remotes.get(end).hash
+
 branches = [self.default_branch]
-for branch, commits in self.commits.items():
-if branch == self.default_branch:
-continue
-for commit in commits:
-if commit.hash == end:
-branches.insert(0, branch)
+if end in self.commits.keys() and end != self.default_branch:
+branches.append(end)
+else:
+for branch, commits in self.commits.items():
+if branch == 

[webkit-changes] [278955] trunk/Tools

2021-06-16 Thread jbedard
Title: [278955] trunk/Tools








Revision 278955
Author jbed...@apple.com
Date 2021-06-16 14:34:59 -0700 (Wed, 16 Jun 2021)


Log Message
[webkitscmpy] Cache more Git commands
https://bugs.webkit.org/show_bug.cgi?id=227082


Reviewed by Stephanie Lewis.

* Scripts/libraries/webkitscmpy/webkitscmpy/local/git.py:
(Git.__init__): Reset branch cache.
(Git.default_branch): Memoize default_branch call.
(Git.branch): Prefer branch cache.
(Git.checkout): Reset branch cache.

Modified Paths

trunk/Tools/ChangeLog
trunk/Tools/Scripts/libraries/webkitscmpy/setup.py
trunk/Tools/Scripts/libraries/webkitscmpy/webkitscmpy/__init__.py
trunk/Tools/Scripts/libraries/webkitscmpy/webkitscmpy/local/git.py




Diff

Modified: trunk/Tools/ChangeLog (278954 => 278955)

--- trunk/Tools/ChangeLog	2021-06-16 20:51:16 UTC (rev 278954)
+++ trunk/Tools/ChangeLog	2021-06-16 21:34:59 UTC (rev 278955)
@@ -1,3 +1,17 @@
+2021-06-16  Jonathan Bedard  
+
+[webkitscmpy] Cache more Git commands
+https://bugs.webkit.org/show_bug.cgi?id=227082
+
+
+Reviewed by Stephanie Lewis.
+
+* Scripts/libraries/webkitscmpy/webkitscmpy/local/git.py:
+(Git.__init__): Reset branch cache.
+(Git.default_branch): Memoize default_branch call.
+(Git.branch): Prefer branch cache.
+(Git.checkout): Reset branch cache.
+
 2021-06-16  Alicia Boya García  
 
 [WTF] DataMutex: Assert on double locking on the same thread


Modified: trunk/Tools/Scripts/libraries/webkitscmpy/setup.py (278954 => 278955)

--- trunk/Tools/Scripts/libraries/webkitscmpy/setup.py	2021-06-16 20:51:16 UTC (rev 278954)
+++ trunk/Tools/Scripts/libraries/webkitscmpy/setup.py	2021-06-16 21:34:59 UTC (rev 278955)
@@ -1,4 +1,4 @@
-# Copyright (C) 2020 Apple Inc. All rights reserved.
+# Copyright (C) 2020, 2021 Apple Inc. All rights reserved.
 #
 # Redistribution and use in source and binary forms, with or without
 # modification, are permitted provided that the following conditions
@@ -29,7 +29,7 @@
 
 setup(
 name='webkitscmpy',
-version='0.14.4',
+version='0.14.5',
 description='Library designed to interact with git and svn repositories.',
 long_description=readme(),
 classifiers=[


Modified: trunk/Tools/Scripts/libraries/webkitscmpy/webkitscmpy/__init__.py (278954 => 278955)

--- trunk/Tools/Scripts/libraries/webkitscmpy/webkitscmpy/__init__.py	2021-06-16 20:51:16 UTC (rev 278954)
+++ trunk/Tools/Scripts/libraries/webkitscmpy/webkitscmpy/__init__.py	2021-06-16 21:34:59 UTC (rev 278955)
@@ -46,7 +46,7 @@
 "Please install webkitcorepy with `pip install webkitcorepy --extra-index-url `"
 )
 
-version = Version(0, 14, 4)
+version = Version(0, 14, 5)
 
 AutoInstall.register(Package('fasteners', Version(0, 15, 0)))
 AutoInstall.register(Package('monotonic', Version(1, 5)))


Modified: trunk/Tools/Scripts/libraries/webkitscmpy/webkitscmpy/local/git.py (278954 => 278955)

--- trunk/Tools/Scripts/libraries/webkitscmpy/webkitscmpy/local/git.py	2021-06-16 20:51:16 UTC (rev 278954)
+++ trunk/Tools/Scripts/libraries/webkitscmpy/webkitscmpy/local/git.py	2021-06-16 21:34:59 UTC (rev 278955)
@@ -50,6 +50,7 @@
 
 def __init__(self, path, dev_branches=None, prod_branches=None, contributors=None, id=None):
 super(Git, self).__init__(path, dev_branches=dev_branches, prod_branches=prod_branches, contributors=contributors, id=id)
+self._branch = None
 if not self.root_path:
 raise OSError('Provided path {} is not a git repository'.format(path))
 
@@ -94,6 +95,7 @@
 return result.stdout.rstrip()
 
 @property
+@decorators.Memoize()
 def default_branch(self):
 result = run([self.executable(), 'rev-parse', '--abbrev-ref', 'origin/HEAD'], cwd=self.path, capture_output=True, encoding='utf-8')
 if result.returncode:
@@ -107,6 +109,9 @@
 
 @property
 def branch(self):
+if self._branch:
+return self._branch
+
 status = run([self.executable(), 'status'], cwd=self.root_path, capture_output=True, encoding='utf-8')
 if status.returncode:
 raise self.Exception('Failed to run `git status` for {}'.format(self.root_path))
@@ -116,7 +121,8 @@
 result = run([self.executable(), 'rev-parse', '--abbrev-ref', 'HEAD'], cwd=self.root_path, capture_output=True, encoding='utf-8')
 if result.returncode:
 raise self.Exception('Failed to retrieve branch for {}'.format(self.root_path))
-return result.stdout.rstrip()
+self._branch = result.stdout.rstrip()
+return self._branch
 
 @property
 def branches(self):
@@ -442,6 +448,8 @@
 if not isinstance(argument, six.string_types):
 raise ValueError("Expected 'argument' to be a string, not '{}'".format(type(argument)))
 
+self._branch = None
+
 if log.level > logging.WARNING:
 log_arg = ['-q']
 elif log.level < logging.WARNING:







[webkit-changes] [278914] trunk/WebKitLibraries

2021-06-15 Thread jbedard
Title: [278914] trunk/WebKitLibraries








Revision 278914
Author jbed...@apple.com
Date 2021-06-15 17:00:02 -0700 (Tue, 15 Jun 2021)


Log Message
[tvOS 15] Support building WebKit
https://bugs.webkit.org/show_bug.cgi?id=227037


Reviewed by Alex Christensen.

* WebKitPrivateFrameworkStubs/appletvos/15/AppSupport.framework/AppSupport.tbd: Added.
* WebKitPrivateFrameworkStubs/appletvos/15/CorePrediction.framework/CorePrediction.tbd: Added.
* WebKitPrivateFrameworkStubs/appletvos/15/FileProvider.framework/FileProvider.tbd: Added.
* WebKitPrivateFrameworkStubs/appletvos/15/GraphicsServices.framework/GraphicsServices.tbd: Added.
* WebKitPrivateFrameworkStubs/appletvos/15/IOSurfaceAccelerator.framework/IOSurfaceAccelerator.tbd: Added.
* WebKitPrivateFrameworkStubs/appletvos/15/RunningBoardServices.framework/RunningBoardServices.tbd: Added.

Modified Paths

trunk/WebKitLibraries/ChangeLog


Added Paths

trunk/WebKitLibraries/WebKitPrivateFrameworkStubs/appletvos/15/
trunk/WebKitLibraries/WebKitPrivateFrameworkStubs/appletvos/15/AppSupport.framework/
trunk/WebKitLibraries/WebKitPrivateFrameworkStubs/appletvos/15/AppSupport.framework/AppSupport.tbd
trunk/WebKitLibraries/WebKitPrivateFrameworkStubs/appletvos/15/CorePrediction.framework/
trunk/WebKitLibraries/WebKitPrivateFrameworkStubs/appletvos/15/CorePrediction.framework/CorePrediction.tbd
trunk/WebKitLibraries/WebKitPrivateFrameworkStubs/appletvos/15/FileProvider.framework/
trunk/WebKitLibraries/WebKitPrivateFrameworkStubs/appletvos/15/FileProvider.framework/FileProvider.tbd
trunk/WebKitLibraries/WebKitPrivateFrameworkStubs/appletvos/15/GraphicsServices.framework/
trunk/WebKitLibraries/WebKitPrivateFrameworkStubs/appletvos/15/GraphicsServices.framework/GraphicsServices.tbd
trunk/WebKitLibraries/WebKitPrivateFrameworkStubs/appletvos/15/IOSurfaceAccelerator.framework/
trunk/WebKitLibraries/WebKitPrivateFrameworkStubs/appletvos/15/IOSurfaceAccelerator.framework/IOSurfaceAccelerator.tbd
trunk/WebKitLibraries/WebKitPrivateFrameworkStubs/appletvos/15/RunningBoardServices.framework/
trunk/WebKitLibraries/WebKitPrivateFrameworkStubs/appletvos/15/RunningBoardServices.framework/RunningBoardServices.tbd




Diff

Modified: trunk/WebKitLibraries/ChangeLog (278913 => 278914)

--- trunk/WebKitLibraries/ChangeLog	2021-06-15 23:49:26 UTC (rev 278913)
+++ trunk/WebKitLibraries/ChangeLog	2021-06-16 00:00:02 UTC (rev 278914)
@@ -1,5 +1,20 @@
 2021-06-15  Jonathan Bedard  
 
+[tvOS 15] Support building WebKit
+https://bugs.webkit.org/show_bug.cgi?id=227037
+
+
+Reviewed by Alex Christensen.
+
+* WebKitPrivateFrameworkStubs/appletvos/15/AppSupport.framework/AppSupport.tbd: Added.
+* WebKitPrivateFrameworkStubs/appletvos/15/CorePrediction.framework/CorePrediction.tbd: Added.
+* WebKitPrivateFrameworkStubs/appletvos/15/FileProvider.framework/FileProvider.tbd: Added.
+* WebKitPrivateFrameworkStubs/appletvos/15/GraphicsServices.framework/GraphicsServices.tbd: Added.
+* WebKitPrivateFrameworkStubs/appletvos/15/IOSurfaceAccelerator.framework/IOSurfaceAccelerator.tbd: Added.
+* WebKitPrivateFrameworkStubs/appletvos/15/RunningBoardServices.framework/RunningBoardServices.tbd: Added.
+
+2021-06-15  Jonathan Bedard  
+
 [iOS 15] Support building WebKit (Part 2)
 https://bugs.webkit.org/show_bug.cgi?id=227002
 


Added: trunk/WebKitLibraries/WebKitPrivateFrameworkStubs/appletvos/15/AppSupport.framework/AppSupport.tbd (0 => 278914)

--- trunk/WebKitLibraries/WebKitPrivateFrameworkStubs/appletvos/15/AppSupport.framework/AppSupport.tbd	(rev 0)
+++ trunk/WebKitLibraries/WebKitPrivateFrameworkStubs/appletvos/15/AppSupport.framework/AppSupport.tbd	2021-06-16 00:00:02 UTC (rev 278914)
@@ -0,0 +1,11 @@
+--- !tapi-tbd-v3
+archs:   [ x86_64, arm64 ]
+install-name:'/System/Library/PrivateFrameworks/AppSupport.framework/AppSupport'
+objc-constraint: none
+platform: tvos
+exports:
+  -
+archs:   [ x86_64, arm64 ]
+symbols: [ CPCopyBundleIdentifierFromAuditToken ]
+objc-classes:[ CPNetworkObserver ]
+...


Added: trunk/WebKitLibraries/WebKitPrivateFrameworkStubs/appletvos/15/CorePrediction.framework/CorePrediction.tbd (0 => 278914)

--- trunk/WebKitLibraries/WebKitPrivateFrameworkStubs/appletvos/15/CorePrediction.framework/CorePrediction.tbd	(rev 0)
+++ trunk/WebKitLibraries/WebKitPrivateFrameworkStubs/appletvos/15/CorePrediction.framework/CorePrediction.tbd	2021-06-16 00:00:02 UTC (rev 278914)
@@ -0,0 +1,10 @@
+--- !tapi-tbd-v3
+archs:   [ x86_64, arm64 ]
+install-name:'/System/Library/PrivateFrameworks/CorePrediction.framework/CorePrediction'
+objc-constraint: none
+platform: tvos
+exports:
+  -
+archs:   [ x86_64, arm64 ]
+symbols: [ _svm_load_model, _svm_predict_values ]
+...


Added: 

[webkit-changes] [278911] trunk/WebKitLibraries

2021-06-15 Thread jbedard
Title: [278911] trunk/WebKitLibraries








Revision 278911
Author jbed...@apple.com
Date 2021-06-15 16:28:04 -0700 (Tue, 15 Jun 2021)


Log Message
[iOS 15] Support building WebKit (Part 2)
https://bugs.webkit.org/show_bug.cgi?id=227002


Reviewed by Alex Christensen.

* WebKitPrivateFrameworkStubs/iOS/15/IOSurfaceAccelerator.framework/IOSurfaceAccelerator.tbd: Added.

Modified Paths

trunk/WebKitLibraries/ChangeLog


Added Paths

trunk/WebKitLibraries/WebKitPrivateFrameworkStubs/iOS/15/IOSurfaceAccelerator.framework/
trunk/WebKitLibraries/WebKitPrivateFrameworkStubs/iOS/15/IOSurfaceAccelerator.framework/IOSurfaceAccelerator.tbd




Diff

Modified: trunk/WebKitLibraries/ChangeLog (278910 => 278911)

--- trunk/WebKitLibraries/ChangeLog	2021-06-15 23:12:52 UTC (rev 278910)
+++ trunk/WebKitLibraries/ChangeLog	2021-06-15 23:28:04 UTC (rev 278911)
@@ -1,5 +1,15 @@
 2021-06-15  Jonathan Bedard  
 
+[iOS 15] Support building WebKit (Part 2)
+https://bugs.webkit.org/show_bug.cgi?id=227002
+
+
+Reviewed by Alex Christensen.
+
+* WebKitPrivateFrameworkStubs/iOS/15/IOSurfaceAccelerator.framework/IOSurfaceAccelerator.tbd: Added.
+
+2021-06-15  Jonathan Bedard  
+
 [watchOS 8] Support building WebKit
 https://bugs.webkit.org/show_bug.cgi?id=227050
 


Added: trunk/WebKitLibraries/WebKitPrivateFrameworkStubs/iOS/15/IOSurfaceAccelerator.framework/IOSurfaceAccelerator.tbd (0 => 278911)

--- trunk/WebKitLibraries/WebKitPrivateFrameworkStubs/iOS/15/IOSurfaceAccelerator.framework/IOSurfaceAccelerator.tbd	(rev 0)
+++ trunk/WebKitLibraries/WebKitPrivateFrameworkStubs/iOS/15/IOSurfaceAccelerator.framework/IOSurfaceAccelerator.tbd	2021-06-15 23:28:04 UTC (rev 278911)
@@ -0,0 +1,24 @@
+--- !tapi-tbd-v2
+archs:
+  - armv7
+  - armv7s
+  - arm64
+  - i386
+  - x86_64
+exports:
+  -
+archs:
+  - armv7
+  - armv7s
+  - arm64
+  - i386
+  - x86_64
+symbols:
+  - _IOSurfaceAcceleratorCreate
+  - _IOSurfaceAcceleratorGetRunLoopSource
+  - _IOSurfaceAcceleratorTransformSurface
+  - _kIOSurfaceAcceleratorUnwireSurfaceKey
+install-name: /System/Library/PrivateFrameworks/IOSurfaceAccelerator.framework/IOSurfaceAccelerator
+objc-constraint: none
+platform: ios
+...






___
webkit-changes mailing list
webkit-changes@lists.webkit.org
https://lists.webkit.org/mailman/listinfo/webkit-changes


[webkit-changes] [278910] trunk

2021-06-15 Thread jbedard
Title: [278910] trunk








Revision 278910
Author jbed...@apple.com
Date 2021-06-15 16:12:52 -0700 (Tue, 15 Jun 2021)


Log Message
[watchOS 8] Support building WebKit
https://bugs.webkit.org/show_bug.cgi?id=227050


Reviewed by Tim Horton.

Source/WebKit:

Covered by existing tests.

* Platform/spi/watchos/PepperUICoreSPI.h: Add QuickboardController SPI.

WebKitLibraries:

* WebKitPrivateFrameworkStubs/watchos/8/AppSupport.framework/AppSupport.tbd: Added.
* WebKitPrivateFrameworkStubs/watchos/8/CorePrediction.framework/CorePrediction.tbd: Added.
* WebKitPrivateFrameworkStubs/watchos/8/FileProvider.framework/FileProvider.tbd: Added.
* WebKitPrivateFrameworkStubs/watchos/8/GraphicsServices.framework/GraphicsServices.tbd: Added.
* WebKitPrivateFrameworkStubs/watchos/8/IOSurfaceAccelerator.framework/IOSurfaceAccelerator.tbd: Added.
* WebKitPrivateFrameworkStubs/watchos/8/PepperUICore.framework/PepperUICore.tbd: Added.
* WebKitPrivateFrameworkStubs/watchos/8/RunningBoardServices.framework/RunningBoardServices.tbd: Added.
* WebKitPrivateFrameworkStubs/watchos/8/SafariSafeBrowsing.framework/SafariSafeBrowsing.tbd: Added.
* WebKitPrivateFrameworkStubs/watchos/8/URLFormatting.framework/URLFormatting.tbd: Added.

Modified Paths

trunk/Source/WebKit/ChangeLog
trunk/Source/WebKit/Platform/spi/watchos/PepperUICoreSPI.h
trunk/WebKitLibraries/ChangeLog


Added Paths

trunk/WebKitLibraries/WebKitPrivateFrameworkStubs/watchos/8/
trunk/WebKitLibraries/WebKitPrivateFrameworkStubs/watchos/8/AppSupport.framework/
trunk/WebKitLibraries/WebKitPrivateFrameworkStubs/watchos/8/AppSupport.framework/AppSupport.tbd
trunk/WebKitLibraries/WebKitPrivateFrameworkStubs/watchos/8/CorePrediction.framework/
trunk/WebKitLibraries/WebKitPrivateFrameworkStubs/watchos/8/CorePrediction.framework/CorePrediction.tbd
trunk/WebKitLibraries/WebKitPrivateFrameworkStubs/watchos/8/FileProvider.framework/
trunk/WebKitLibraries/WebKitPrivateFrameworkStubs/watchos/8/FileProvider.framework/FileProvider.tbd
trunk/WebKitLibraries/WebKitPrivateFrameworkStubs/watchos/8/GraphicsServices.framework/
trunk/WebKitLibraries/WebKitPrivateFrameworkStubs/watchos/8/GraphicsServices.framework/GraphicsServices.tbd
trunk/WebKitLibraries/WebKitPrivateFrameworkStubs/watchos/8/IOSurfaceAccelerator.framework/
trunk/WebKitLibraries/WebKitPrivateFrameworkStubs/watchos/8/IOSurfaceAccelerator.framework/IOSurfaceAccelerator.tbd
trunk/WebKitLibraries/WebKitPrivateFrameworkStubs/watchos/8/PepperUICore.framework/
trunk/WebKitLibraries/WebKitPrivateFrameworkStubs/watchos/8/PepperUICore.framework/PepperUICore.tbd
trunk/WebKitLibraries/WebKitPrivateFrameworkStubs/watchos/8/RunningBoardServices.framework/
trunk/WebKitLibraries/WebKitPrivateFrameworkStubs/watchos/8/RunningBoardServices.framework/RunningBoardServices.tbd
trunk/WebKitLibraries/WebKitPrivateFrameworkStubs/watchos/8/SafariSafeBrowsing.framework/
trunk/WebKitLibraries/WebKitPrivateFrameworkStubs/watchos/8/SafariSafeBrowsing.framework/SafariSafeBrowsing.tbd
trunk/WebKitLibraries/WebKitPrivateFrameworkStubs/watchos/8/URLFormatting.framework/
trunk/WebKitLibraries/WebKitPrivateFrameworkStubs/watchos/8/URLFormatting.framework/URLFormatting.tbd




Diff

Modified: trunk/Source/WebKit/ChangeLog (278909 => 278910)

--- trunk/Source/WebKit/ChangeLog	2021-06-15 22:50:24 UTC (rev 278909)
+++ trunk/Source/WebKit/ChangeLog	2021-06-15 23:12:52 UTC (rev 278910)
@@ -1,3 +1,15 @@
+2021-06-15  Jonathan Bedard  
+
+[watchOS 8] Support building WebKit
+https://bugs.webkit.org/show_bug.cgi?id=227050
+
+
+Reviewed by Tim Horton.
+
+Covered by existing tests.
+
+* Platform/spi/watchos/PepperUICoreSPI.h: Add QuickboardController SPI.
+
 2021-06-15  Chris Dumez  
 
 Add basic detection of unresponsive Network / GPU Processes


Modified: trunk/Source/WebKit/Platform/spi/watchos/PepperUICoreSPI.h (278909 => 278910)

--- trunk/Source/WebKit/Platform/spi/watchos/PepperUICoreSPI.h	2021-06-15 22:50:24 UTC (rev 278909)
+++ trunk/Source/WebKit/Platform/spi/watchos/PepperUICoreSPI.h	2021-06-15 23:12:52 UTC (rev 278910)
@@ -173,6 +173,12 @@
 @property (nonatomic, assign) UIReturnKeyType returnKeyType;
 @property (nonatomic, strong) NSAttributedString *attributedHeaderText;
 
+#if HAVE(QUICKBOARD_CONTROLLER)
+@property (nonatomic, copy, nullable) NSArray *suggestions;
+@property (nonatomic, readwrite) BOOL acceptsEmoji;
+@property (nonatomic, readwrite) BOOL shouldPresentModernTextInputUI;
+#endif
+
 @end
 
 @class PUICQuickboardController;
@@ -184,6 +190,13 @@
 @property (nonatomic, weak) id delegate;
 @property (nonatomic, strong) PUICTextInputContext *textInputContext;
 @property (nonatomic, weak) UIViewController *quickboardPresentingViewController;
+
+#if HAVE(QUICKBOARD_CONTROLLER)
+- (void)dismissWithCompletion:(void (^ _Nullable)(void))completion;
+- (void)present;
+@property (nonatomic, assign) BOOL excludedFromScreenCapture;
+#endif
+
 @end
 
 @protocol PUICQuickboardController 
@@ -308,6 

[webkit-changes] [278890] trunk/Tools

2021-06-15 Thread jbedard
Title: [278890] trunk/Tools








Revision 278890
Author jbed...@apple.com
Date 2021-06-15 12:05:32 -0700 (Tue, 15 Jun 2021)


Log Message
[git-webkit] Handle auth failures
https://bugs.webkit.org/show_bug.cgi?id=226999


Reviewed by Dewei Zhu.

* Scripts/libraries/webkitcorepy/setup.py: Bump version.
* Scripts/libraries/webkitcorepy/webkitcorepy/__init__.py: Ditto.
* Scripts/libraries/webkitcorepy/webkitcorepy/credentials.py:
(credentials): We should attempt to retrieve credentials, even if they
are not requested because retrieving credentials does not prompt the user.
* Scripts/libraries/webkitscmpy/setup.py: Bump version.
* Scripts/libraries/webkitscmpy/webkitscmpy/__init__.py: Ditto.
* Scripts/libraries/webkitscmpy/webkitscmpy/remote/git_hub.py:
(GitHub.request): In the event we get a 400 error from the GitHub API,
attempt forcing authentication before reporting an error.

Modified Paths

trunk/Tools/ChangeLog
trunk/Tools/Scripts/libraries/webkitcorepy/setup.py
trunk/Tools/Scripts/libraries/webkitcorepy/webkitcorepy/__init__.py
trunk/Tools/Scripts/libraries/webkitcorepy/webkitcorepy/credentials.py
trunk/Tools/Scripts/libraries/webkitscmpy/setup.py
trunk/Tools/Scripts/libraries/webkitscmpy/webkitscmpy/__init__.py
trunk/Tools/Scripts/libraries/webkitscmpy/webkitscmpy/remote/git_hub.py




Diff

Modified: trunk/Tools/ChangeLog (278889 => 278890)

--- trunk/Tools/ChangeLog	2021-06-15 19:04:43 UTC (rev 278889)
+++ trunk/Tools/ChangeLog	2021-06-15 19:05:32 UTC (rev 278890)
@@ -1,3 +1,22 @@
+2021-06-15  Jonathan Bedard  
+
+[git-webkit] Handle auth failures
+https://bugs.webkit.org/show_bug.cgi?id=226999
+
+
+Reviewed by Dewei Zhu.
+
+* Scripts/libraries/webkitcorepy/setup.py: Bump version.
+* Scripts/libraries/webkitcorepy/webkitcorepy/__init__.py: Ditto.
+* Scripts/libraries/webkitcorepy/webkitcorepy/credentials.py:
+(credentials): We should attempt to retrieve credentials, even if they
+are not requested because retrieving credentials does not prompt the user.
+* Scripts/libraries/webkitscmpy/setup.py: Bump version.
+* Scripts/libraries/webkitscmpy/webkitscmpy/__init__.py: Ditto.
+* Scripts/libraries/webkitscmpy/webkitscmpy/remote/git_hub.py:
+(GitHub.request): In the event we get a 400 error from the GitHub API,
+attempt forcing authentication before reporting an error.
+
 2021-06-15  Alex Christensen  
 
 Check for "xn--" in any subdomain when parsing URL hosts


Modified: trunk/Tools/Scripts/libraries/webkitcorepy/setup.py (278889 => 278890)

--- trunk/Tools/Scripts/libraries/webkitcorepy/setup.py	2021-06-15 19:04:43 UTC (rev 278889)
+++ trunk/Tools/Scripts/libraries/webkitcorepy/setup.py	2021-06-15 19:05:32 UTC (rev 278890)
@@ -30,7 +30,7 @@
 
 setup(
 name='webkitcorepy',
-version='0.5.17',
+version='0.5.18',
 description='Library containing various Python support classes and functions.',
 long_description=readme(),
 classifiers=[


Modified: trunk/Tools/Scripts/libraries/webkitcorepy/webkitcorepy/__init__.py (278889 => 278890)

--- trunk/Tools/Scripts/libraries/webkitcorepy/webkitcorepy/__init__.py	2021-06-15 19:04:43 UTC (rev 278889)
+++ trunk/Tools/Scripts/libraries/webkitcorepy/webkitcorepy/__init__.py	2021-06-15 19:05:32 UTC (rev 278890)
@@ -37,7 +37,7 @@
 from webkitcorepy.task_pool import TaskPool
 from webkitcorepy.credentials import credentials
 
-version = Version(0, 5, 17)
+version = Version(0, 5, 18)
 
 from webkitcorepy.autoinstall import Package, AutoInstall
 if sys.version_info > (3, 0):


Modified: trunk/Tools/Scripts/libraries/webkitcorepy/webkitcorepy/credentials.py (278889 => 278890)

--- trunk/Tools/Scripts/libraries/webkitcorepy/webkitcorepy/credentials.py	2021-06-15 19:04:43 UTC (rev 278889)
+++ trunk/Tools/Scripts/libraries/webkitcorepy/webkitcorepy/credentials.py	2021-06-15 19:05:32 UTC (rev 278890)
@@ -67,7 +67,7 @@
 username = (input if sys.version_info > (3, 0) else raw_input)()
 username_prompted = True
 
-if not key and required:
+if not key:
 try:
 if keyring:
 key = keyring.get_password(url, username)
@@ -74,7 +74,7 @@
 except RuntimeError:
 pass
 
-if not key:
+if not key and required:
 if not sys.stderr.isatty() or not sys.stdin.isatty():
 raise OSError('No tty to prompt user for username')
 key = getpass.getpass('{}: '.format(key_name.capitalize()))


Modified: trunk/Tools/Scripts/libraries/webkitscmpy/setup.py (278889 => 278890)

--- trunk/Tools/Scripts/libraries/webkitscmpy/setup.py	2021-06-15 19:04:43 UTC (rev 278889)
+++ trunk/Tools/Scripts/libraries/webkitscmpy/setup.py	2021-06-15 19:05:32 UTC (rev 278890)
@@ -29,7 +29,7 @@
 
 setup(
 name='webkitscmpy',
-version='0.14.3',
+version='0.14.4',
 description='Library designed to interact with git and svn 

[webkit-changes] [278889] trunk/Source/WebKit

2021-06-15 Thread jbedard
Title: [278889] trunk/Source/WebKit








Revision 278889
Author jbed...@apple.com
Date 2021-06-15 12:04:43 -0700 (Tue, 15 Jun 2021)


Log Message
[Monterey] Support building WebKit (Follow-up)
https://bugs.webkit.org/show_bug.cgi?id=226846


Unreviewed follow-up fix.

Covered by exisiting tests.


* WebKit.xcodeproj/project.pbxproj: Reset objectVersion.

Modified Paths

trunk/Source/WebKit/ChangeLog
trunk/Source/WebKit/WebKit.xcodeproj/project.pbxproj




Diff

Modified: trunk/Source/WebKit/ChangeLog (27 => 278889)

--- trunk/Source/WebKit/ChangeLog	2021-06-15 18:39:27 UTC (rev 27)
+++ trunk/Source/WebKit/ChangeLog	2021-06-15 19:04:43 UTC (rev 278889)
@@ -1,3 +1,15 @@
+2021-06-15  Jonathan Bedard  
+
+[Monterey] Support building WebKit (Follow-up)
+https://bugs.webkit.org/show_bug.cgi?id=226846
+
+
+Unreviewed follow-up fix.
+
+Covered by exisiting tests.
+
+* WebKit.xcodeproj/project.pbxproj: Reset objectVersion.
+
 2021-06-15  Brent Fulgham  
 
 [iOS] Permit access to 'platform-name' 


Modified: trunk/Source/WebKit/WebKit.xcodeproj/project.pbxproj (27 => 278889)

--- trunk/Source/WebKit/WebKit.xcodeproj/project.pbxproj	2021-06-15 18:39:27 UTC (rev 27)
+++ trunk/Source/WebKit/WebKit.xcodeproj/project.pbxproj	2021-06-15 19:04:43 UTC (rev 278889)
@@ -3,7 +3,7 @@
 	archiveVersion = 1;
 	classes = {
 	};
-	objectVersion = 54;
+	objectVersion = 52;
 	objects = {
 
 /* Begin PBXAggregateTarget section */






___
webkit-changes mailing list
webkit-changes@lists.webkit.org
https://lists.webkit.org/mailman/listinfo/webkit-changes


[webkit-changes] [278872] trunk

2021-06-15 Thread jbedard
Title: [278872] trunk








Revision 278872
Author jbed...@apple.com
Date 2021-06-15 07:14:07 -0700 (Tue, 15 Jun 2021)


Log Message
Source/WebCore/PAL:
[iOS 15] Support building WebKit
https://bugs.webkit.org/show_bug.cgi?id=227002


Reviewed by Tim Horton.

* pal/spi/ios/QuickLookSPI.h:

Source/WebKit:
[iOS 15] Support building WebKit
https://bugs.webkit.org/show_bug.cgi?id=227002


Reviewed by Tim Horton.

Covered by existing tests.

* Platform/spi/ios/UIKitSPI.h: Add _insertTextFromCamera.

Tools:
[iOS 15] Support building WebKit
https://bugs.webkit.org/show_bug.cgi?id=227002


Reviewed by Tim Horton.

* TestWebKitAPI/Tests/WebKitCocoa/EventAttribution.mm: Remove unneeded import.

WebKitLibraries:
   [iOS 15] Support building WebKit
https://bugs.webkit.org/show_bug.cgi?id=227002


Reviewed by Tim Horton.

* WebKitPrivateFrameworkStubs/iOS/15/AppSupport.framework/AppSupport.tbd: Added.
* WebKitPrivateFrameworkStubs/iOS/15/AuthKit.framework/AuthKit.tbd: Added.
* WebKitPrivateFrameworkStubs/iOS/15/BackBoardServices.framework/BackBoardServices.tbd: Added.
* WebKitPrivateFrameworkStubs/iOS/15/CorePrediction.framework/CorePrediction.tbd: Added.
* WebKitPrivateFrameworkStubs/iOS/15/GraphicsServices.framework/GraphicsServices.tbd: Added.
* WebKitPrivateFrameworkStubs/iOS/15/RunningBoardServices.framework/RunningBoardServices.tbd: Added.
* WebKitPrivateFrameworkStubs/iOS/15/SafariSafeBrowsing.framework/SafariSafeBrowsing.tbd: Added.
* WebKitPrivateFrameworkStubs/iOS/15/URLFormatting.framework/URLFormatting.tbd: Added.

Modified Paths

trunk/Source/WebCore/PAL/ChangeLog
trunk/Source/WebCore/PAL/pal/spi/ios/QuickLookSPI.h
trunk/Source/WebKit/ChangeLog
trunk/Source/WebKit/Platform/spi/ios/UIKitSPI.h
trunk/Tools/ChangeLog
trunk/Tools/TestWebKitAPI/Tests/WebKitCocoa/EventAttribution.mm
trunk/WebKitLibraries/ChangeLog


Added Paths

trunk/WebKitLibraries/WebKitPrivateFrameworkStubs/iOS/15/
trunk/WebKitLibraries/WebKitPrivateFrameworkStubs/iOS/15/AppSupport.framework/
trunk/WebKitLibraries/WebKitPrivateFrameworkStubs/iOS/15/AppSupport.framework/AppSupport.tbd
trunk/WebKitLibraries/WebKitPrivateFrameworkStubs/iOS/15/AuthKit.framework/
trunk/WebKitLibraries/WebKitPrivateFrameworkStubs/iOS/15/AuthKit.framework/AuthKit.tbd
trunk/WebKitLibraries/WebKitPrivateFrameworkStubs/iOS/15/BackBoardServices.framework/
trunk/WebKitLibraries/WebKitPrivateFrameworkStubs/iOS/15/BackBoardServices.framework/BackBoardServices.tbd
trunk/WebKitLibraries/WebKitPrivateFrameworkStubs/iOS/15/CorePrediction.framework/
trunk/WebKitLibraries/WebKitPrivateFrameworkStubs/iOS/15/CorePrediction.framework/CorePrediction.tbd
trunk/WebKitLibraries/WebKitPrivateFrameworkStubs/iOS/15/GraphicsServices.framework/
trunk/WebKitLibraries/WebKitPrivateFrameworkStubs/iOS/15/GraphicsServices.framework/GraphicsServices.tbd
trunk/WebKitLibraries/WebKitPrivateFrameworkStubs/iOS/15/RunningBoardServices.framework/
trunk/WebKitLibraries/WebKitPrivateFrameworkStubs/iOS/15/RunningBoardServices.framework/RunningBoardServices.tbd
trunk/WebKitLibraries/WebKitPrivateFrameworkStubs/iOS/15/SafariSafeBrowsing.framework/
trunk/WebKitLibraries/WebKitPrivateFrameworkStubs/iOS/15/SafariSafeBrowsing.framework/SafariSafeBrowsing.tbd
trunk/WebKitLibraries/WebKitPrivateFrameworkStubs/iOS/15/URLFormatting.framework/
trunk/WebKitLibraries/WebKitPrivateFrameworkStubs/iOS/15/URLFormatting.framework/URLFormatting.tbd




Diff

Modified: trunk/Source/WebCore/PAL/ChangeLog (278871 => 278872)

--- trunk/Source/WebCore/PAL/ChangeLog	2021-06-15 14:12:41 UTC (rev 278871)
+++ trunk/Source/WebCore/PAL/ChangeLog	2021-06-15 14:14:07 UTC (rev 278872)
@@ -1,3 +1,13 @@
+2021-06-15  Jonathan Bedard  
+
+[iOS 15] Support building WebKit
+https://bugs.webkit.org/show_bug.cgi?id=227002
+
+
+Reviewed by Tim Horton.
+
+* pal/spi/ios/QuickLookSPI.h:
+
 2021-06-14  Jonathan Bedard  
 
 [Monterey] Support building WebKit (Part 2)


Modified: trunk/Source/WebCore/PAL/pal/spi/ios/QuickLookSPI.h (278871 => 278872)

--- trunk/Source/WebCore/PAL/pal/spi/ios/QuickLookSPI.h	2021-06-15 14:12:41 UTC (rev 278871)
+++ trunk/Source/WebCore/PAL/pal/spi/ios/QuickLookSPI.h	2021-06-15 14:14:07 UTC (rev 278872)
@@ -60,10 +60,25 @@
 - (instancetype)initWithPreviewItemProvider:(NSItemProvider *)itemProvider contentType:(NSString *)contentType previewTitle:(NSString *)previewTitle fileSize:(NSNumber *)fileSize;
 - (void)setPreviewItemProviderProgress:(NSNumber*)progress;
 - (void)setUseLoadingTimeout:(BOOL) timeout;
+@property (nonatomic, copy) NSDictionary *previewOptions;
 @end
 
 #define kQLReturnPasswordProtected 1 << 2
 
+typedef NS_OPTIONS(NSUInteger, QLPreviewControllerFirstTimeAppearanceActions) {
+QLPreviewControllerFirstTimeAppearanceActionNone = 0,
+QLPreviewControllerFirstTimeAppearanceActionPlayAudio = 1 << 0,
+QLPreviewControllerFirstTimeAppearanceActionPlayVideo = 1 << 1,
+QLPreviewControllerFirstTimeAppearanceActionEnableEditMode = 1 << 2,
+

[webkit-changes] [278834] trunk/Source/WebCore

2021-06-14 Thread jbedard
Title: [278834] trunk/Source/WebCore








Revision 278834
Author jbed...@apple.com
Date 2021-06-14 10:34:25 -0700 (Mon, 14 Jun 2021)


Log Message
[Monterey] Support building WebKit (Part 2)
https://bugs.webkit.org/show_bug.cgi?id=226846


Reviewed by Chris Dumez.

Source/WebCore:

Covered by exisiting tests.

* html/HTMLElement.cpp:
(WebCore::HTMLElement::updateWithTextRecognitionResult): Explicitly define second arugment
to avoid 'missing field' compilation error.

Source/WebCore/PAL:

* pal/spi/cf/CFNetworkSPI.h: Add nw_connection_privacy_stance_t.
* pal/spi/cocoa/PassKitSPI.h: Add PKPaymentCoupon.

Modified Paths

trunk/Source/WebCore/ChangeLog
trunk/Source/WebCore/PAL/ChangeLog
trunk/Source/WebCore/PAL/pal/spi/cf/CFNetworkSPI.h
trunk/Source/WebCore/PAL/pal/spi/cocoa/PassKitSPI.h
trunk/Source/WebCore/html/HTMLElement.cpp




Diff

Modified: trunk/Source/WebCore/ChangeLog (278833 => 278834)

--- trunk/Source/WebCore/ChangeLog	2021-06-14 17:31:02 UTC (rev 278833)
+++ trunk/Source/WebCore/ChangeLog	2021-06-14 17:34:25 UTC (rev 278834)
@@ -1,3 +1,17 @@
+2021-06-14  Jonathan Bedard  
+
+[Monterey] Support building WebKit (Part 2)
+https://bugs.webkit.org/show_bug.cgi?id=226846
+
+
+Reviewed by Chris Dumez.
+
+Covered by exisiting tests.
+
+* html/HTMLElement.cpp:
+(WebCore::HTMLElement::updateWithTextRecognitionResult): Explicitly define second arugment
+to avoid 'missing field' compilation error.
+
 2021-06-14  Chris Dumez  
 
 Micro-optimize ResourceResponseBase::sanitizeHTTPHeaderFields()


Modified: trunk/Source/WebCore/PAL/ChangeLog (278833 => 278834)

--- trunk/Source/WebCore/PAL/ChangeLog	2021-06-14 17:31:02 UTC (rev 278833)
+++ trunk/Source/WebCore/PAL/ChangeLog	2021-06-14 17:34:25 UTC (rev 278834)
@@ -1,3 +1,14 @@
+2021-06-14  Jonathan Bedard  
+
+[Monterey] Support building WebKit (Part 2)
+https://bugs.webkit.org/show_bug.cgi?id=226846
+
+
+Reviewed by Chris Dumez.
+
+* pal/spi/cf/CFNetworkSPI.h: Add nw_connection_privacy_stance_t.
+* pal/spi/cocoa/PassKitSPI.h: Add PKPaymentCoupon.
+
 2021-06-11  Wenson Hsieh  
 
 [Cocoa] Clean up some VisionKitCore soft linking code in WebKit


Modified: trunk/Source/WebCore/PAL/pal/spi/cf/CFNetworkSPI.h (278833 => 278834)

--- trunk/Source/WebCore/PAL/pal/spi/cf/CFNetworkSPI.h	2021-06-14 17:31:02 UTC (rev 278833)
+++ trunk/Source/WebCore/PAL/pal/spi/cf/CFNetworkSPI.h	2021-06-14 17:34:25 UTC (rev 278834)
@@ -122,6 +122,16 @@
 CFHTTPCookieStorageAcceptPolicyExclusivelyFromMainDocumentDomain = 3,
 };
 
+#if HAVE(NETWORK_CONNECTION_PRIVACY_STANCE)
+typedef enum {
+nw_connection_privacy_stance_unknown = 0,
+nw_connection_privacy_stance_not_eligible = 1,
+nw_connection_privacy_stance_proxied = 2,
+nw_connection_privacy_stance_failed = 3,
+nw_connection_privacy_stance_direct = 4,
+} nw_connection_privacy_stance_t;
+#endif
+
 #if defined(__OBJC__)
 
 @interface NSURLSessionTask ()


Modified: trunk/Source/WebCore/PAL/pal/spi/cocoa/PassKitSPI.h (278833 => 278834)

--- trunk/Source/WebCore/PAL/pal/spi/cocoa/PassKitSPI.h	2021-06-14 17:31:02 UTC (rev 278833)
+++ trunk/Source/WebCore/PAL/pal/spi/cocoa/PassKitSPI.h	2021-06-14 17:34:25 UTC (rev 278834)
@@ -132,6 +132,10 @@
 PKPaymentShippingContactInvalidError = 1,
 PKPaymentBillingContactInvalidError,
 PKPaymentShippingAddressUnserviceableError,
+#if HAVE(PASSKIT_COUPON_CODE)
+PKPaymentCouponCodeInvalidError,
+PKPaymentCouponCodeExpiredError,
+#endif
 };
 
 typedef NS_OPTIONS(NSUInteger, PKAddressField) {
@@ -242,11 +246,29 @@
 @property (nonatomic, copy) NSDecimalNumber *amount;
 @end
 
+#if HAVE(PASSKIT_SHIPPING_METHOD_DATE_COMPONENTS_RANGE)
+@interface PKDateComponentsRange : NSObject 
+- (nullable instancetype)initWithStartDateComponents:(NSDateComponents *)startDateComponents endDateComponents:(NSDateComponents *)endDateComponents;
+@property (copy, readonly, nonatomic) NSDateComponents *startDateComponents;
+@property (copy, readonly, nonatomic) NSDateComponents *endDateComponents;
+@end
+#endif
+
 @interface PKShippingMethod : PKPaymentSummaryItem
 @property (nonatomic, copy, nullable) NSString *identifier;
 @property (nonatomic, copy, nullable) NSString *detail;
+#if HAVE(PASSKIT_SHIPPING_METHOD_DATE_COMPONENTS_RANGE)
+@property (nonatomic, copy, nullable) PKDateComponentsRange *dateComponentsRange;
+#endif
 @end
 
+#if HAVE(PASSKIT_SHIPPING_CONTACT_EDITING_MODE)
+typedef NS_ENUM(NSUInteger, PKShippingContactEditingMode) {
+PKShippingContactEditingModeEnabled = 1,
+PKShippingContactEditingModeStorePickup
+};
+#endif
+
 @interface PKPaymentRequest : NSObject
 + (NSArray *)availableNetworks;
 @property (nonatomic, copy) NSString *countryCode;
@@ -264,6 +286,16 @@
 @property (nonatomic, copy, nullable) NSSet *supportedCountries;
 @property (nonatomic, strong) NSSet *requiredShippingContactFields;
 @property (nonatomic, strong) NSSet 

[webkit-changes] [278781] trunk/Source/WebCore/PAL

2021-06-11 Thread jbedard
Title: [278781] trunk/Source/WebCore/PAL








Revision 278781
Author jbed...@apple.com
Date 2021-06-11 13:59:51 -0700 (Fri, 11 Jun 2021)


Log Message
[Monterey] Support building WebKit (Follow-up fix)
https://bugs.webkit.org/show_bug.cgi?id=226846


Unreviewed build fix.

* pal/spi/mac/QuickLookMacSPI.h:

Modified Paths

trunk/Source/WebCore/PAL/ChangeLog
trunk/Source/WebCore/PAL/pal/spi/mac/QuickLookMacSPI.h




Diff

Modified: trunk/Source/WebCore/PAL/ChangeLog (278780 => 278781)

--- trunk/Source/WebCore/PAL/ChangeLog	2021-06-11 20:44:21 UTC (rev 278780)
+++ trunk/Source/WebCore/PAL/ChangeLog	2021-06-11 20:59:51 UTC (rev 278781)
@@ -1,5 +1,15 @@
 2021-06-11  Jonathan Bedard  
 
+[Monterey] Support building WebKit (Follow-up fix)
+https://bugs.webkit.org/show_bug.cgi?id=226846
+
+
+Unreviewed build fix.
+
+* pal/spi/mac/QuickLookMacSPI.h:
+
+2021-06-11  Jonathan Bedard  
+
 [Monterey] Support building WebKit
 https://bugs.webkit.org/show_bug.cgi?id=226846
 


Modified: trunk/Source/WebCore/PAL/pal/spi/mac/QuickLookMacSPI.h (278780 => 278781)

--- trunk/Source/WebCore/PAL/pal/spi/mac/QuickLookMacSPI.h	2021-06-11 20:44:21 UTC (rev 278780)
+++ trunk/Source/WebCore/PAL/pal/spi/mac/QuickLookMacSPI.h	2021-06-11 20:59:51 UTC (rev 278781)
@@ -62,6 +62,17 @@
 @property (nonatomic, copy) NSDictionary* previewOptions;
 @end
 
+#if HAVE(VK_IMAGE_ANALYSIS)
+
+typedef NS_ENUM(NSInteger, QLPreviewActivity) {
+QLPreviewActivityNone,
+QLPreviewActivityMarkup,
+QLPreviewActivityTrim,
+QLPreviewActivityVisualSearch
+};
+
+#endif
+
 #endif // USE(APPLE_INTERNAL_SDK)
 
 #if HAVE(QUICKLOOK_PREVIEW_ITEM_DATA_PROVIDER) || HAVE(VK_IMAGE_ANALYSIS)
@@ -73,17 +84,6 @@
 
 #endif
 
-#if HAVE(VK_IMAGE_ANALYSIS)
-
-typedef NS_ENUM(NSInteger, QLPreviewActivity) {
-QLPreviewActivityNone,
-QLPreviewActivityMarkup,
-QLPreviewActivityTrim,
-QLPreviewActivityVisualSearch
-};
-
-#endif
-
 #if HAVE(QUICKLOOK_ITEM_PREVIEW_OPTIONS)
 
 @interface QLItem (Staging_77864637)






___
webkit-changes mailing list
webkit-changes@lists.webkit.org
https://lists.webkit.org/mailman/listinfo/webkit-changes


[webkit-changes] [278780] trunk

2021-06-11 Thread jbedard
Title: [278780] trunk








Revision 278780
Author jbed...@apple.com
Date 2021-06-11 13:44:21 -0700 (Fri, 11 Jun 2021)


Log Message
[Monterey] Support building WebKit
https://bugs.webkit.org/show_bug.cgi?id=226846


Reviewed by Tim Horton.

Source/WebCore:

Covered by exisiting tests.

* testing/Internals.cpp:
(WebCore::Internals::installImageOverlay): Explicitly define second arugment
to avoid 'missing field' compilation error.

Source/WebCore/PAL:

* pal/spi/cocoa/CryptoKitCBridgingSPI.h: Add RSA BSSA declarations.
* pal/spi/mac/QuickLookMacSPI.h: Add Image Analysis declarations.

Source/WebKit:

* Platform/cocoa/TextRecognitionUtilities.mm: Import VisionKitSPI.h.
* Platform/spi/Cocoa/VisionKitSPI.h: Added.
* UIProcess/API/Cocoa/WKBrowsingContextController.mm:
(setUpPageLoaderClient): Allow deprecated declarations.
(setUpPagePolicyClient): Ditto.
* UIProcess/API/Cocoa/WKConnection.mm:
(setUpClient): Allow deprecated declarations.
* UIProcess/API/Cocoa/WKProcessGroup.mm:
(setUpConnectionClient): Allow deprecated declarations.
(setUpInjectedBundleClient): Ditto.
(setUpHistoryClient): Ditto.
* UIProcess/API/Cocoa/WKWebViewTesting.mm:
(-[WKWebView _createMediaSessionCoordinatorForTesting:completionHandler:]): Explicitly define second arugment
to avoid 'missing field' compilation error.
* UIProcess/Cocoa/WebViewImpl.mm: Import VisionKitSPI.h.
* UIProcess/ios/WKContentViewInteraction.mm: Ditto.
* WebKit.xcodeproj/project.pbxproj: Ditto.

Source/WTF:

* wtf/PlatformHave.h: Add HAVE(VK_IMAGE_ANALYSIS).
* wtf/spi/cocoa/SecuritySPI.h:

Tools:

* TestWebKitAPI/TestWebKitAPI.xcodeproj/project.pbxproj: Add CoreCryptoSPI.h.
* TestWebKitAPI/Tests/WebCore/cocoa/CoreCryptoSPI.h: Added.
* TestWebKitAPI/Tests/WebCore/cocoa/PrivateClickMeasurementCocoa.mm: Import CoreCryptoSPI.h.
* TestWebKitAPI/Tests/WebKitCocoa/EventAttribution.mm: Ditto.

Modified Paths

trunk/Source/WTF/ChangeLog
trunk/Source/WTF/wtf/PlatformHave.h
trunk/Source/WTF/wtf/spi/cocoa/SecuritySPI.h
trunk/Source/WebCore/ChangeLog
trunk/Source/WebCore/PAL/ChangeLog
trunk/Source/WebCore/PAL/pal/spi/cocoa/CryptoKitCBridgingSPI.h
trunk/Source/WebCore/PAL/pal/spi/mac/QuickLookMacSPI.h
trunk/Source/WebCore/testing/Internals.cpp
trunk/Source/WebKit/ChangeLog
trunk/Source/WebKit/Platform/cocoa/TextRecognitionUtilities.mm
trunk/Source/WebKit/UIProcess/API/Cocoa/WKBrowsingContextController.mm
trunk/Source/WebKit/UIProcess/API/Cocoa/WKConnection.mm
trunk/Source/WebKit/UIProcess/API/Cocoa/WKProcessGroup.mm
trunk/Source/WebKit/UIProcess/API/Cocoa/WKWebViewTesting.mm
trunk/Source/WebKit/UIProcess/Cocoa/WebViewImpl.mm
trunk/Source/WebKit/UIProcess/ios/WKContentViewInteraction.mm
trunk/Source/WebKit/WebKit.xcodeproj/project.pbxproj
trunk/Tools/ChangeLog
trunk/Tools/TestWebKitAPI/TestWebKitAPI.xcodeproj/project.pbxproj
trunk/Tools/TestWebKitAPI/Tests/WebCore/cocoa/PrivateClickMeasurementCocoa.mm
trunk/Tools/TestWebKitAPI/Tests/WebKitCocoa/EventAttribution.mm


Added Paths

trunk/Source/WebKit/Platform/spi/Cocoa/VisionKitSPI.h
trunk/Tools/TestWebKitAPI/Tests/WebCore/cocoa/CoreCryptoSPI.h




Diff

Modified: trunk/Source/WTF/ChangeLog (278779 => 278780)

--- trunk/Source/WTF/ChangeLog	2021-06-11 20:36:45 UTC (rev 278779)
+++ trunk/Source/WTF/ChangeLog	2021-06-11 20:44:21 UTC (rev 278780)
@@ -1,3 +1,14 @@
+2021-06-11  Jonathan Bedard  
+
+[Monterey] Support building WebKit
+https://bugs.webkit.org/show_bug.cgi?id=226846
+
+
+Reviewed by Tim Horton.
+
+* wtf/PlatformHave.h: Add HAVE(VK_IMAGE_ANALYSIS).
+* wtf/spi/cocoa/SecuritySPI.h:
+
 2021-06-09  Chris Dumez  
 
 Avoid some calls to StringView::toString() / StringView::toStringWithoutCopying()


Modified: trunk/Source/WTF/wtf/PlatformHave.h (278779 => 278780)

--- trunk/Source/WTF/wtf/PlatformHave.h	2021-06-11 20:36:45 UTC (rev 278779)
+++ trunk/Source/WTF/wtf/PlatformHave.h	2021-06-11 20:44:21 UTC (rev 278780)
@@ -1022,3 +1022,10 @@
 || (PLATFORM(MACCATALYST) && __IPHONE_OS_VERSION_MIN_REQUIRED >= 14))
 #define HAVE_CORE_TEXT_SBIX_IMAGE_SIZE_FUNCTIONS 1
 #endif
+
+#if (PLATFORM(MAC) && __MAC_OS_X_VERSION_MIN_REQUIRED >= 12) \
+|| ((PLATFORM(IOS) || PLATFORM(MACCATALYST)) && __IPHONE_OS_VERSION_MIN_REQUIRED >= 15)
+#if !defined(HAVE_VK_IMAGE_ANALYSIS)
+#define HAVE_VK_IMAGE_ANALYSIS 1
+#endif
+#endif


Modified: trunk/Source/WTF/wtf/spi/cocoa/SecuritySPI.h (278779 => 278780)

--- trunk/Source/WTF/wtf/spi/cocoa/SecuritySPI.h	2021-06-11 20:36:45 UTC (rev 278779)
+++ trunk/Source/WTF/wtf/spi/cocoa/SecuritySPI.h	2021-06-11 20:44:21 UTC (rev 278780)
@@ -81,11 +81,15 @@
 SecAccessControlRef SecAccessControlCreateFromData(CFAllocatorRef, CFDataRef, CFErrorRef*);
 CFDataRef SecAccessControlCopyData(SecAccessControlRef);
 
+CFDataRef SecKeyCopySubjectPublicKeyInfo(SecKeyRef);
+
 #if PLATFORM(MAC)
 #include 
 CFStringRef SecTaskCopySigningIdentifier(SecTaskRef, CFErrorRef *);
+ALLOW_DEPRECATED_DECLARATIONS_BEGIN
 extern const SecAsn1Template 

[webkit-changes] [278771] trunk/Tools

2021-06-11 Thread jbedard
Title: [278771] trunk/Tools








Revision 278771
Author jbed...@apple.com
Date 2021-06-11 11:37:27 -0700 (Fri, 11 Jun 2021)


Log Message
[check-webkit-style] failing in JS checker due to python byte string
https://bugs.webkit.org/show_bug.cgi?id=226925


Reviewed by Aakash Jain.

* Scripts/webkitpy/style/checkers/jstest.py:
(map_functions_to_dict): Use byte regexes.
(strip_trailing_blank_lines_and_comments): Ditto.
* Scripts/webkitpy/style/checkers/jstest_unittest.py:
(JSTestCheckerTestCase.test_map_functions_to_dict): Test content should be bytes.

Modified Paths

trunk/Tools/ChangeLog
trunk/Tools/Scripts/webkitpy/style/checkers/jstest.py
trunk/Tools/Scripts/webkitpy/style/checkers/jstest_unittest.py




Diff

Modified: trunk/Tools/ChangeLog (278770 => 278771)

--- trunk/Tools/ChangeLog	2021-06-11 18:36:22 UTC (rev 278770)
+++ trunk/Tools/ChangeLog	2021-06-11 18:37:27 UTC (rev 278771)
@@ -1,3 +1,17 @@
+2021-06-11  Jonathan Bedard  
+
+[check-webkit-style] failing in JS checker due to python byte string
+https://bugs.webkit.org/show_bug.cgi?id=226925
+
+
+Reviewed by Aakash Jain.
+
+* Scripts/webkitpy/style/checkers/jstest.py:
+(map_functions_to_dict): Use byte regexes.
+(strip_trailing_blank_lines_and_comments): Ditto.
+* Scripts/webkitpy/style/checkers/jstest_unittest.py:
+(JSTestCheckerTestCase.test_map_functions_to_dict): Test content should be bytes.
+
 2021-06-11  Truitt Savell  
 
 Remove ews129 instead of ews179


Modified: trunk/Tools/Scripts/webkitpy/style/checkers/jstest.py (278770 => 278771)

--- trunk/Tools/Scripts/webkitpy/style/checkers/jstest.py	2021-06-11 18:36:22 UTC (rev 278770)
+++ trunk/Tools/Scripts/webkitpy/style/checkers/jstest.py	2021-06-11 18:37:27 UTC (rev 278771)
@@ -25,6 +25,7 @@
 
 import re
 
+from webkitcorepy import string_utils
 from webkitpy.common.system.systemhost import SystemHost
 
 ALL_JS_TEST_FUNCTION_FILES = [
@@ -60,8 +61,8 @@
 Args:
   content: A multi-line string containing _javascript_ source to be split into individual function definitions.
 """
-functions = re.split(r'^function\s+', content, flags=re.MULTILINE)
-function_name_regex = re.compile(r'^(?P\w+)\s*\(', flags=re.MULTILINE)
+functions = re.split(br'^function\s+', content, flags=re.MULTILINE)
+function_name_regex = re.compile(br'^(?P\w+)\s*\(', flags=re.MULTILINE)
 result = {}
 for f in functions:
 match = function_name_regex.match(f)
@@ -77,11 +78,11 @@
 function: A multi-line string representing the source for one _javascript_ function, less the "function" keyword.
 """
 lines = function.splitlines(True)
-blank_line_regex = re.compile(r'^\s*$')
-comment_line_regex = re.compile(r'^\s*//.*$')
+blank_line_regex = re.compile(br'^\s*$')
+comment_line_regex = re.compile(br'^\s*//.*$')
 while blank_line_regex.search(lines[-1]) or comment_line_regex.search(lines[-1]):
 del lines[-1]
-return ''.join(lines)
+return b''.join(lines)
 
 
 class JSTestChecker(object):
@@ -136,5 +137,5 @@
 if function_name in baseline_function_map.keys() and function_name in test_function_map.keys():
 if baseline_function_map[function_name] != test_function_map[function_name]:
 error_message = "Changes to function {0}() should be kept in sync with {1}.".format(
-function_name, path)
+string_utils.decode(function_name), path)
 self._handle_style_error(0, 'jstest/function_equality', 5, error_message)


Modified: trunk/Tools/Scripts/webkitpy/style/checkers/jstest_unittest.py (278770 => 278771)

--- trunk/Tools/Scripts/webkitpy/style/checkers/jstest_unittest.py	2021-06-11 18:36:22 UTC (rev 278770)
+++ trunk/Tools/Scripts/webkitpy/style/checkers/jstest_unittest.py	2021-06-11 18:37:27 UTC (rev 278771)
@@ -36,7 +36,7 @@
 
 This also implicitly tests strip_trailing_blank_lines_and_comments().
 """
-file1 = """
+file1 = b"""
 function shouldBe() {}
 
 // Same as !shouldBe(), but output makes more sense.
@@ -53,7 +53,7 @@
 """
 result1 = map_functions_to_dict(file1)
 
-file2 = """function shouldBe() {}
+file2 = b"""function shouldBe() {}
 function shouldNotBe() {}
 function shouldThrow() {
 }






___
webkit-changes mailing list
webkit-changes@lists.webkit.org
https://lists.webkit.org/mailman/listinfo/webkit-changes


[webkit-changes] [278762] trunk/Tools

2021-06-11 Thread jbedard
Title: [278762] trunk/Tools








Revision 278762
Author jbed...@apple.com
Date 2021-06-11 08:34:23 -0700 (Fri, 11 Jun 2021)


Log Message
REGRESSION (r278454): [run-webkit-tests] worker is printed twice for each test in debug logging
https://bugs.webkit.org/show_bug.cgi?id=226895


Reviewed by Dewei Zhu.

* Scripts/webkitpy/layout_tests/controllers/layout_test_runner.py:
(Worker.run_tests): Strip process names from debug logs.
(Worker.stop): Ditto.
(Worker._kill_driver): Ditto.
(Worker._clean_up_after_test): Ditto.

Modified Paths

trunk/Tools/ChangeLog
trunk/Tools/Scripts/webkitpy/layout_tests/controllers/layout_test_runner.py




Diff

Modified: trunk/Tools/ChangeLog (278761 => 278762)

--- trunk/Tools/ChangeLog	2021-06-11 15:00:25 UTC (rev 278761)
+++ trunk/Tools/ChangeLog	2021-06-11 15:34:23 UTC (rev 278762)
@@ -1,3 +1,17 @@
+2021-06-11  Jonathan Bedard  
+
+REGRESSION (r278454): [run-webkit-tests] worker is printed twice for each test in debug logging
+https://bugs.webkit.org/show_bug.cgi?id=226895
+
+
+Reviewed by Dewei Zhu.
+
+* Scripts/webkitpy/layout_tests/controllers/layout_test_runner.py:
+(Worker.run_tests): Strip process names from debug logs.
+(Worker.stop): Ditto.
+(Worker._kill_driver): Ditto.
+(Worker._clean_up_after_test): Ditto.
+
 2021-06-10  Alex Christensen  
 
 Origin is null in http requests when baseURL has custom scheme on iOS 15.0


Modified: trunk/Tools/Scripts/webkitpy/layout_tests/controllers/layout_test_runner.py (278761 => 278762)

--- trunk/Tools/Scripts/webkitpy/layout_tests/controllers/layout_test_runner.py	2021-06-11 15:00:25 UTC (rev 278761)
+++ trunk/Tools/Scripts/webkitpy/layout_tests/controllers/layout_test_runner.py	2021-06-11 15:34:23 UTC (rev 278762)
@@ -312,7 +312,7 @@
 break
 Worker.instance.run_test(input, shard.name)
 
-_log.debug('{} finished test group'.format(TaskPool.Process.name))
+_log.debug('finished test group')
 
 if self._driver and self._driver.has_crashed():
 self._kill_driver()
@@ -364,7 +364,7 @@
 return additional_results
 
 def stop(self):
-_log.debug('{} cleaning up'.format(TaskPool.Process.name))
+_log.debug('cleaning up')
 self._kill_driver()
 
 def _timeout(self, test_input):
@@ -389,7 +389,7 @@
 driver = self._driver
 self._driver = None
 if driver:
-_log.debug('{} killing driver'.format(TaskPool.Process.name))
+_log.debug('killing driver')
 driver.stop()
 
 def _run_test_with_or_without_timeout(self, test_input, timeout, stop_when_done):
@@ -408,13 +408,13 @@
 self._batch_count = 0
 
 # Print the error message(s).
-_log.debug('{} {} failed:'.format(TaskPool.Process.name, test_name))
+_log.debug('{} failed:'.format(test_name))
 for f in result.failures:
-_log.debug('{}  {}'.format(TaskPool.Process.name, f.message()))
+_log.debug('{}'.format(f.message()))
 elif result.type == test_expectations.SKIP:
-_log.debug('{} {} skipped'.format(TaskPool.Process.name, test_name))
+_log.debug('{} skipped'.format(test_name))
 else:
-_log.debug("{} {} passed".format(TaskPool.Process.name, test_name))
+_log.debug("{} passed".format(test_name))
 
 def _run_test_in_another_thread(self, test_input, thread_timeout_sec, stop_when_done):
 """Run a test in a separate thread, enforcing a hard time limit.






___
webkit-changes mailing list
webkit-changes@lists.webkit.org
https://lists.webkit.org/mailman/listinfo/webkit-changes


[webkit-changes] [278732] trunk/Tools

2021-06-10 Thread jbedard
Title: [278732] trunk/Tools








Revision 278732
Author jbed...@apple.com
Date 2021-06-10 14:11:09 -0700 (Thu, 10 Jun 2021)


Log Message
[webkitcorepy] 6x performance improvement in Memoized
https://bugs.webkit.org/show_bug.cgi?id=226891


Reviewed by Stephanie Lewis.

* Scripts/libraries/webkitcorepy/setup.py: Bump version.
* Scripts/libraries/webkitcorepy/webkitcorepy/__init__.py: Ditto.
* Scripts/libraries/webkitcorepy/webkitcorepy/decorators.py:
(Memoize.__call__.decorator): inspect.getargspec retrieves many bits of
information about the function we don't care about. Retrieve arguments manually
(and only do it once) to increase performance of Memoized function calls.

Modified Paths

trunk/Tools/ChangeLog
trunk/Tools/Scripts/libraries/webkitcorepy/setup.py
trunk/Tools/Scripts/libraries/webkitcorepy/webkitcorepy/__init__.py
trunk/Tools/Scripts/libraries/webkitcorepy/webkitcorepy/decorators.py




Diff

Modified: trunk/Tools/ChangeLog (278731 => 278732)

--- trunk/Tools/ChangeLog	2021-06-10 21:03:00 UTC (rev 278731)
+++ trunk/Tools/ChangeLog	2021-06-10 21:11:09 UTC (rev 278732)
@@ -1,3 +1,18 @@
+2021-06-10  Jonathan Bedard  
+
+[webkitcorepy] 6x performance improvement in Memoized
+https://bugs.webkit.org/show_bug.cgi?id=226891
+
+
+Reviewed by Stephanie Lewis.
+
+* Scripts/libraries/webkitcorepy/setup.py: Bump version.
+* Scripts/libraries/webkitcorepy/webkitcorepy/__init__.py: Ditto.
+* Scripts/libraries/webkitcorepy/webkitcorepy/decorators.py:
+(Memoize.__call__.decorator): inspect.getargspec retrieves many bits of
+information about the function we don't care about. Retrieve arguments manually
+(and only do it once) to increase performance of Memoized function calls.
+
 2021-06-10  Philippe Normand  
 
 [WPE] Enable Cog for developer builds


Modified: trunk/Tools/Scripts/libraries/webkitcorepy/setup.py (278731 => 278732)

--- trunk/Tools/Scripts/libraries/webkitcorepy/setup.py	2021-06-10 21:03:00 UTC (rev 278731)
+++ trunk/Tools/Scripts/libraries/webkitcorepy/setup.py	2021-06-10 21:11:09 UTC (rev 278732)
@@ -30,7 +30,7 @@
 
 setup(
 name='webkitcorepy',
-version='0.5.16',
+version='0.5.17',
 description='Library containing various Python support classes and functions.',
 long_description=readme(),
 classifiers=[


Modified: trunk/Tools/Scripts/libraries/webkitcorepy/webkitcorepy/__init__.py (278731 => 278732)

--- trunk/Tools/Scripts/libraries/webkitcorepy/webkitcorepy/__init__.py	2021-06-10 21:03:00 UTC (rev 278731)
+++ trunk/Tools/Scripts/libraries/webkitcorepy/webkitcorepy/__init__.py	2021-06-10 21:11:09 UTC (rev 278732)
@@ -37,7 +37,7 @@
 from webkitcorepy.task_pool import TaskPool
 from webkitcorepy.credentials import credentials
 
-version = Version(0, 5, 16)
+version = Version(0, 5, 17)
 
 from webkitcorepy.autoinstall import Package, AutoInstall
 if sys.version_info > (3, 0):


Modified: trunk/Tools/Scripts/libraries/webkitcorepy/webkitcorepy/decorators.py (278731 => 278732)

--- trunk/Tools/Scripts/libraries/webkitcorepy/webkitcorepy/decorators.py	2021-06-10 21:03:00 UTC (rev 278731)
+++ trunk/Tools/Scripts/libraries/webkitcorepy/webkitcorepy/decorators.py	2021-06-10 21:11:09 UTC (rev 278732)
@@ -20,7 +20,6 @@
 # OR TORT (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY OUT OF THE USE
 # OF THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE.
 
-import inspect
 import time
 from collections import defaultdict
 
@@ -34,12 +33,14 @@
 
 def __call__(self, function):
 def decorator(*args, **kwargs):
+fargs = function.__code__.co_varnames[:function.__code__.co_argcount]
+
 timeout = self.timeout
-if 'timeout' not in inspect.getargspec(function).args:
+if 'timeout' not in fargs:
 timeout = kwargs.pop('timeout', timeout)
 
 cached = self.cached
-if 'cached' not in inspect.getargspec(function).args:
+if 'cached' not in fargs:
 cached = kwargs.pop('cached', cached)
 
 keyargs = args + tuple(sorted([(key, value) for key, value in kwargs.items()]))






___
webkit-changes mailing list
webkit-changes@lists.webkit.org
https://lists.webkit.org/mailman/listinfo/webkit-changes


[webkit-changes] [278454] trunk/Tools

2021-06-04 Thread jbedard
Title: [278454] trunk/Tools








Revision 278454
Author jbed...@apple.com
Date 2021-06-04 07:04:35 -0700 (Fri, 04 Jun 2021)


Log Message
[run-webkit-tests] Use webkitcorepy's TaskPool
https://bugs.webkit.org/show_bug.cgi?id=226234


Reviewed by Dewei Zhu.

* Scripts/run-webkit-tests: Stop using multiprocessing_bootstrap.
* Scripts/webkitpy/layout_tests/controllers/layout_test_runner.py:
(setup_shard): Run setup in Worker process.
(handle_started_test): Notify parent process that a test has started.
(run_shard): Run test shard in Worker process.
(handle_finished_test): Notify parent process that a test has finished.
(teardown_shard): Teardown worker process metadata.
(LayoutTestRunner.__init__): Make printer public.
(LayoutTestRunner.run_tests): Use TaskPool to spawn multiple workers.
(LayoutTestRunner.update_summary_with_result): Renamed from
_update_summary_with_result, strip unused arguments.
(LayoutTestRunner._annotate_results_with_additional_failures): Strip
unused arguments.
(LayoutTestRunner.start_servers): Make printer public.
(LayoutTestRunner.stop_servers): Ditto.
(Worker.setup): Instantiate singleton worker.
(Worker.teardown): Teardown singleton worker.
(Worker.__init__): Pass port object, remove unused variable.
(Worker.run_tests): Use TaskPool process name.
(Worker.stop): Ditto.
(Worker._kill_driver): Use port options, use TaskPool process name.
(Worker._run_test_with_or_without_timeout): Ditto.
(Worker._clean_up_after_test): Use TaskPool process name.
(Worker._run_test_in_another_thread): Ditto.
(Worker._run_test_in_this_thread): Ditto.
(Worker._run_single_test): Use port options.
(LayoutTestRunner._worker_factory): Deleted.
(LayoutTestRunner._handle_did_spawn_worker): Deleted.
(LayoutTestRunner._update_summary_with_result): Deleted.
(LayoutTestRunner.handle): Deleted.
(LayoutTestRunner._handle_started_test): Deleted.
(LayoutTestRunner._handle_finished_test): Deleted.
(LayoutTestRunner._handle_finished_test_group): Deleted.
(Worker.__del__): Deleted.
(Worker.start): Deleted.
(Worker.handle): Deleted.
(Worker._run_test): Deleted.
(Worker._finished_test_group): Deleted.
* Scripts/webkitpy/layout_tests/controllers/layout_test_runner_unittest.py:
(LayoutTestRunnerTests.test_update_summary_with_result): The runner keeps track of it's state.
* Scripts/webkitpy/layout_tests/run_webkit_tests.py: Remove call to main.
* Scripts/webkitpy/layout_tests/run_webkit_tests_integrationtest.py:
(RunTest.serial_test_basic): Run all tests in the same process.
(RunTest.test_hung_thread): Deleted.
* Scripts/webkitpy/port/base.py:
(Port.worker_startup_delay_secs): Deleted.
* Scripts/webkitpy/port/test.py:
(Port.worker_startup_delay_secs): Deleted.

Modified Paths

trunk/Tools/ChangeLog
trunk/Tools/Scripts/run-webkit-tests
trunk/Tools/Scripts/webkitpy/layout_tests/controllers/layout_test_runner.py
trunk/Tools/Scripts/webkitpy/layout_tests/controllers/layout_test_runner_unittest.py
trunk/Tools/Scripts/webkitpy/layout_tests/run_webkit_tests.py
trunk/Tools/Scripts/webkitpy/layout_tests/run_webkit_tests_integrationtest.py
trunk/Tools/Scripts/webkitpy/port/base.py
trunk/Tools/Scripts/webkitpy/port/test.py




Diff

Modified: trunk/Tools/ChangeLog (278453 => 278454)

--- trunk/Tools/ChangeLog	2021-06-04 12:04:59 UTC (rev 278453)
+++ trunk/Tools/ChangeLog	2021-06-04 14:04:35 UTC (rev 278454)
@@ -1,3 +1,60 @@
+2021-06-04  Jonathan Bedard  
+
+[run-webkit-tests] Use webkitcorepy's TaskPool
+https://bugs.webkit.org/show_bug.cgi?id=226234
+
+
+Reviewed by Dewei Zhu.
+
+* Scripts/run-webkit-tests: Stop using multiprocessing_bootstrap.
+* Scripts/webkitpy/layout_tests/controllers/layout_test_runner.py:
+(setup_shard): Run setup in Worker process.
+(handle_started_test): Notify parent process that a test has started.
+(run_shard): Run test shard in Worker process.
+(handle_finished_test): Notify parent process that a test has finished.
+(teardown_shard): Teardown worker process metadata.
+(LayoutTestRunner.__init__): Make printer public.
+(LayoutTestRunner.run_tests): Use TaskPool to spawn multiple workers.
+(LayoutTestRunner.update_summary_with_result): Renamed from
+_update_summary_with_result, strip unused arguments.
+(LayoutTestRunner._annotate_results_with_additional_failures): Strip
+unused arguments.
+(LayoutTestRunner.start_servers): Make printer public.
+(LayoutTestRunner.stop_servers): Ditto.
+(Worker.setup): Instantiate singleton worker.
+(Worker.teardown): Teardown singleton worker.
+(Worker.__init__): Pass port object, remove unused variable.
+(Worker.run_tests): Use TaskPool process name.
+(Worker.stop): Ditto.
+(Worker._kill_driver): Use port options, use TaskPool process name.
+(Worker._run_test_with_or_without_timeout): Ditto.
+(Worker._clean_up_after_test): Use TaskPool process name.
+

[webkit-changes] [278380] trunk/Tools

2021-06-02 Thread jbedard
Title: [278380] trunk/Tools








Revision 278380
Author jbed...@apple.com
Date 2021-06-02 16:10:10 -0700 (Wed, 02 Jun 2021)


Log Message
[webkitcorepy] TaskPool shouldn't fork when 1 process is needed
https://bugs.webkit.org/show_bug.cgi?id=226506


Reviewed by Dewei Zhu.

* Scripts/libraries/webkitcorepy/setup.py: Bump version.
* Scripts/libraries/webkitcorepy/webkitcorepy/__init__.py: Ditto.
* Scripts/libraries/webkitcorepy/webkitcorepy/task_pool.py:
(TaskPool.__init__): Allow user to force fork, even with a single process.
(TaskPool.__enter__): If only a single worker is needed and the caller is not forcing
a fork, run the setup function in the parent process.
(TaskPool.do): If no queue has been constructed, we're running in the parent process.
(TaskPool.wait): Nothing to wait for if we're running in the parent process.
(TaskPool.__exit__): If no queue has been constructed, we're running in the parent process,
so run the teardown in this process and reset the process name.
* Scripts/libraries/webkitcorepy/webkitcorepy/tests/task_pool_unittest.py:
(TaskPoolUnittest.test_single): Force fork.
(TaskPoolUnittest.test_single_no_fork):
(TaskPoolUnittest.test_exception): Force fork.
(TaskPoolUnittest.test_exception_no_fork):
(TaskPoolUnittest.test_invalid_shutdown): Force fork.

Modified Paths

trunk/Tools/ChangeLog
trunk/Tools/Scripts/libraries/webkitcorepy/setup.py
trunk/Tools/Scripts/libraries/webkitcorepy/webkitcorepy/__init__.py
trunk/Tools/Scripts/libraries/webkitcorepy/webkitcorepy/task_pool.py
trunk/Tools/Scripts/libraries/webkitcorepy/webkitcorepy/tests/task_pool_unittest.py




Diff

Modified: trunk/Tools/ChangeLog (278379 => 278380)

--- trunk/Tools/ChangeLog	2021-06-02 22:31:09 UTC (rev 278379)
+++ trunk/Tools/ChangeLog	2021-06-02 23:10:10 UTC (rev 278380)
@@ -1,3 +1,28 @@
+2021-06-02  Jonathan Bedard  
+
+[webkitcorepy] TaskPool shouldn't fork when 1 process is needed
+https://bugs.webkit.org/show_bug.cgi?id=226506
+
+
+Reviewed by Dewei Zhu.
+
+* Scripts/libraries/webkitcorepy/setup.py: Bump version.
+* Scripts/libraries/webkitcorepy/webkitcorepy/__init__.py: Ditto.
+* Scripts/libraries/webkitcorepy/webkitcorepy/task_pool.py:
+(TaskPool.__init__): Allow user to force fork, even with a single process.
+(TaskPool.__enter__): If only a single worker is needed and the caller is not forcing
+a fork, run the setup function in the parent process.
+(TaskPool.do): If no queue has been constructed, we're running in the parent process.
+(TaskPool.wait): Nothing to wait for if we're running in the parent process.
+(TaskPool.__exit__): If no queue has been constructed, we're running in the parent process,
+so run the teardown in this process and reset the process name.
+* Scripts/libraries/webkitcorepy/webkitcorepy/tests/task_pool_unittest.py:
+(TaskPoolUnittest.test_single): Force fork.
+(TaskPoolUnittest.test_single_no_fork):
+(TaskPoolUnittest.test_exception): Force fork.
+(TaskPoolUnittest.test_exception_no_fork):
+(TaskPoolUnittest.test_invalid_shutdown): Force fork.
+
 2021-06-02  W.D. Xiong  
 
 [resultsdbpy] "legend" is misspelled as "lengend"


Modified: trunk/Tools/Scripts/libraries/webkitcorepy/setup.py (278379 => 278380)

--- trunk/Tools/Scripts/libraries/webkitcorepy/setup.py	2021-06-02 22:31:09 UTC (rev 278379)
+++ trunk/Tools/Scripts/libraries/webkitcorepy/setup.py	2021-06-02 23:10:10 UTC (rev 278380)
@@ -30,7 +30,7 @@
 
 setup(
 name='webkitcorepy',
-version='0.5.15',
+version='0.5.16',
 description='Library containing various Python support classes and functions.',
 long_description=readme(),
 classifiers=[


Modified: trunk/Tools/Scripts/libraries/webkitcorepy/webkitcorepy/__init__.py (278379 => 278380)

--- trunk/Tools/Scripts/libraries/webkitcorepy/webkitcorepy/__init__.py	2021-06-02 22:31:09 UTC (rev 278379)
+++ trunk/Tools/Scripts/libraries/webkitcorepy/webkitcorepy/__init__.py	2021-06-02 23:10:10 UTC (rev 278380)
@@ -37,7 +37,7 @@
 from webkitcorepy.task_pool import TaskPool
 from webkitcorepy.credentials import credentials
 
-version = Version(0, 5, 15)
+version = Version(0, 5, 16)
 
 from webkitcorepy.autoinstall import Package, AutoInstall
 if sys.version_info > (3, 0):


Modified: trunk/Tools/Scripts/libraries/webkitcorepy/webkitcorepy/task_pool.py (278379 => 278380)

--- trunk/Tools/Scripts/libraries/webkitcorepy/webkitcorepy/task_pool.py	2021-06-02 22:31:09 UTC (rev 278379)
+++ trunk/Tools/Scripts/libraries/webkitcorepy/webkitcorepy/task_pool.py	2021-06-02 23:10:10 UTC (rev 278380)
@@ -159,6 +159,19 @@
 self.incoming.join_thread()
 
 
+class _DummyQueue(object):
+def send(self, object):
+if isinstance(object, _Message):
+object(None)
+return True
+
+def receive(self, blocking=True):
+pass
+
+def close(self):
+pass

[webkit-changes] [278353] trunk/Tools

2021-06-02 Thread jbedard
Title: [278353] trunk/Tools








Revision 278353
Author jbed...@apple.com
Date 2021-06-02 09:10:21 -0700 (Wed, 02 Jun 2021)


Log Message
[GitHub] Delete unused scripts
https://bugs.webkit.org/show_bug.cgi?id=226519

Reviewed by Aakash Jain.

* Scripts/configure-github-as-upstream: Removed.
* Scripts/sync-master-with-upstream: Removed.

Modified Paths

trunk/Tools/ChangeLog


Removed Paths

trunk/Tools/Scripts/configure-github-as-upstream
trunk/Tools/Scripts/sync-master-with-upstream




Diff

Modified: trunk/Tools/ChangeLog (278352 => 278353)

--- trunk/Tools/ChangeLog	2021-06-02 15:56:47 UTC (rev 278352)
+++ trunk/Tools/ChangeLog	2021-06-02 16:10:21 UTC (rev 278353)
@@ -1,3 +1,13 @@
+2021-06-02  Jonathan Bedard  
+
+[GitHub] Delete unused scripts
+https://bugs.webkit.org/show_bug.cgi?id=226519
+
+Reviewed by Aakash Jain.
+
+* Scripts/configure-github-as-upstream: Removed.
+* Scripts/sync-master-with-upstream: Removed.
+
 2021-05-23  Ryosuke Niwa  
 
 Add CheckedPtr


Deleted: trunk/Tools/Scripts/configure-github-as-upstream (278352 => 278353)

--- trunk/Tools/Scripts/configure-github-as-upstream	2021-06-02 15:56:47 UTC (rev 278352)
+++ trunk/Tools/Scripts/configure-github-as-upstream	2021-06-02 16:10:21 UTC (rev 278353)
@@ -1,35 +0,0 @@
-#!/usr/bin/env python
-
-# Copyright 2012 Google, Inc. All rights reserved.
-#
-# Redistribution and use in source and binary forms, with or without
-# modification, are permitted provided that the following conditions
-# are met:
-# 1. Redistributions of source code must retain the above copyright
-#notice, this list of conditions and the following disclaimer.
-# 2. Redistributions in binary form must reproduce the above copyright
-#notice, this list of conditions and the following disclaimer in the
-#documentation and/or other materials provided with the distribution.
-#
-# THIS SOFTWARE IS PROVIDED BY GOOGLE INC. ``AS IS'' AND ANY
-# EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT LIMITED TO, THE
-# IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS FOR A PARTICULAR
-# PURPOSE ARE DISCLAIMED.  IN NO EVENT SHALL APPLE INC. OR
-# CONTRIBUTORS BE LIABLE FOR ANY DIRECT, INDIRECT, INCIDENTAL, SPECIAL,
-# EXEMPLARY, OR CONSEQUENTIAL DAMAGES (INCLUDING, BUT NOT LIMITED TO,
-# PROCUREMENT OF SUBSTITUTE GOODS OR SERVICES; LOSS OF USE, DATA, OR
-# PROFITS; OR BUSINESS INTERRUPTION) HOWEVER CAUSED AND ON ANY THEORY
-# OF LIABILITY, WHETHER IN CONTRACT, STRICT LIABILITY, OR TORT
-# (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY OUT OF THE USE
-# OF THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE. 
-
-# This script is intended to support the GitHub workflow described here:
-# https://trac.webkit.org/wiki/UsingGitHub
-#
-# This script adds WebKit's "root" repository on GitHub as a remote named
-# "upstream".  You can use sync-master-with-upstream to keep your master
-# branch in sync with WebKit's "root" repository.
-
-import subprocess
-
-exit(subprocess.call(["git", "remote", "add", "upstream", "git://github.com/WebKit/webkit.git"]))


Deleted: trunk/Tools/Scripts/sync-master-with-upstream (278352 => 278353)

--- trunk/Tools/Scripts/sync-master-with-upstream	2021-06-02 15:56:47 UTC (rev 278352)
+++ trunk/Tools/Scripts/sync-master-with-upstream	2021-06-02 16:10:21 UTC (rev 278353)
@@ -1,46 +0,0 @@
-#!/usr/bin/env python
-
-# Copyright 2012 Google, Inc. All rights reserved.
-#
-# Redistribution and use in source and binary forms, with or without
-# modification, are permitted provided that the following conditions
-# are met:
-# 1. Redistributions of source code must retain the above copyright
-#notice, this list of conditions and the following disclaimer.
-# 2. Redistributions in binary form must reproduce the above copyright
-#notice, this list of conditions and the following disclaimer in the
-#documentation and/or other materials provided with the distribution.
-#
-# THIS SOFTWARE IS PROVIDED BY GOOGLE INC. ``AS IS'' AND ANY
-# EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT LIMITED TO, THE
-# IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS FOR A PARTICULAR
-# PURPOSE ARE DISCLAIMED.  IN NO EVENT SHALL APPLE INC. OR
-# CONTRIBUTORS BE LIABLE FOR ANY DIRECT, INDIRECT, INCIDENTAL, SPECIAL,
-# EXEMPLARY, OR CONSEQUENTIAL DAMAGES (INCLUDING, BUT NOT LIMITED TO,
-# PROCUREMENT OF SUBSTITUTE GOODS OR SERVICES; LOSS OF USE, DATA, OR
-# PROFITS; OR BUSINESS INTERRUPTION) HOWEVER CAUSED AND ON ANY THEORY
-# OF LIABILITY, WHETHER IN CONTRACT, STRICT LIABILITY, OR TORT
-# (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY OUT OF THE USE
-# OF THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE. 
-
-# This script is intended to support the GitHub workflow described here:
-# https://trac.webkit.org/wiki/UsingGitHub
-#
-# This script fetches the latest changes from upstream, and pushes those
-# changes to the master branch in origin (e.g., your GitHub fork of WebKit).
-#

[webkit-changes] [278332] trunk/Tools

2021-06-01 Thread jbedard
Title: [278332] trunk/Tools








Revision 278332
Author jbed...@apple.com
Date 2021-06-01 16:23:21 -0700 (Tue, 01 Jun 2021)


Log Message
[run-webkit-tests] Move helper out of Port instance
https://bugs.webkit.org/show_bug.cgi?id=226344


Reviewed by Dewei Zhu.

The "helper" is a popen object, which are not pickleable, and cannot
belong to an instantiated port object.

* Scripts/webkitpy/port/base.py:
(Port): Make helper class variable.
(Port.__init__):
(Port.stop_helper): All classes should share the same code to stop the helper process.
* Scripts/webkitpy/port/mac.py:
(MacPort.start_helper): Use class variable.
(MacPort.stop_helper): Moved to base class..

Modified Paths

trunk/Tools/ChangeLog
trunk/Tools/Scripts/webkitpy/layout_tests/controllers/manager.py
trunk/Tools/Scripts/webkitpy/port/base.py
trunk/Tools/Scripts/webkitpy/port/mac.py




Diff

Modified: trunk/Tools/ChangeLog (278331 => 278332)

--- trunk/Tools/ChangeLog	2021-06-01 22:36:56 UTC (rev 278331)
+++ trunk/Tools/ChangeLog	2021-06-01 23:23:21 UTC (rev 278332)
@@ -1,3 +1,22 @@
+2021-06-01  Jonathan Bedard  
+
+[run-webkit-tests] Move helper out of Port instance
+https://bugs.webkit.org/show_bug.cgi?id=226344
+
+
+Reviewed by Dewei Zhu.
+
+The "helper" is a popen object, which are not pickleable, and cannot
+belong to an instantiated port object.
+
+* Scripts/webkitpy/port/base.py:
+(Port): Make helper class variable.
+(Port.__init__):
+(Port.stop_helper): All classes should share the same code to stop the helper process.
+* Scripts/webkitpy/port/mac.py:
+(MacPort.start_helper): Use class variable.
+(MacPort.stop_helper): Moved to base class..
+
 2021-06-01  Fujii Hironori  
 
 Sync Tools/win/DLLLauncher/DLLLauncherMain.cpp with Source/_javascript_Core/shell/DLLLauncherMain.cpp


Modified: trunk/Tools/Scripts/webkitpy/layout_tests/controllers/manager.py (278331 => 278332)

--- trunk/Tools/Scripts/webkitpy/layout_tests/controllers/manager.py	2021-06-01 22:36:56 UTC (rev 278331)
+++ trunk/Tools/Scripts/webkitpy/layout_tests/controllers/manager.py	2021-06-01 23:23:21 UTC (rev 278332)
@@ -575,7 +575,6 @@
 return False
 
 _log.debug("Restarting helper")
-self._port.stop_helper()
 self._options.pixel_tests = True
 return self._port.start_helper(prefer_integrated_gpu=self._options.prefer_integrated_gpu)
 


Modified: trunk/Tools/Scripts/webkitpy/port/base.py (278331 => 278332)

--- trunk/Tools/Scripts/webkitpy/port/base.py	2021-06-01 22:36:56 UTC (rev 278331)
+++ trunk/Tools/Scripts/webkitpy/port/base.py	2021-06-01 23:23:21 UTC (rev 278332)
@@ -81,6 +81,8 @@
 DEVICE_TYPE = None
 DEFAULT_DEVICE_TYPES = []
 
+helper = None
+
 @classmethod
 def determine_full_port_name(cls, host, options, port_name):
 """Return a fully-specified port name that can be used to construct objects."""
@@ -115,7 +117,6 @@
 self._config = port_config.Config(self._executive, self._filesystem, self.port_name)
 self.pretty_patch = PrettyPatch(self._executive, self.path_from_webkit_base(), self._filesystem)
 
-self._helper = None
 self._http_server = None
 self._websocket_server = None
 self._websocket_secure_server = None
@@ -958,9 +959,16 @@
 
 def stop_helper(self):
 """Shut down the test helper if it is running. Do nothing if
-it isn't, or it isn't available. If a port overrides start_helper()
-it must override this routine as well."""
-pass
+it isn't, or it isn't available."""
+if Port.helper:
+_log.debug("Stopping LayoutTestHelper")
+try:
+Port.helper.stdin.write(b"x\n")
+Port.helper.stdin.close()
+Port.helper.wait()
+except IOError as e:
+_log.debug("IOError raised while stopping helper: %s" % str(e))
+Port.helper = None
 
 def stop_http_server(self):
 """Shut down the http server if it is running. Do nothing if it isn't."""


Modified: trunk/Tools/Scripts/webkitpy/port/mac.py (278331 => 278332)

--- trunk/Tools/Scripts/webkitpy/port/mac.py	2021-06-01 22:36:56 UTC (rev 278331)
+++ trunk/Tools/Scripts/webkitpy/port/mac.py	2021-06-01 23:23:21 UTC (rev 278332)
@@ -37,6 +37,7 @@
 from webkitpy.common.system.executive import ScriptError
 from webkitpy.common.version_name_map import PUBLIC_TABLE, INTERNAL_TABLE
 from webkitpy.common.version_name_map import VersionNameMap
+from webkitpy.port.base import Port
 from webkitpy.port.config import apple_additions, Config
 from webkitpy.port.darwin import DarwinPort
 
@@ -245,6 +246,8 @@
 return min(supportable_instances, default_count)
 
 def start_helper(self, pixel_tests=False, prefer_integrated_gpu=False):
+self.stop_helper()
+
 helper_path = self._path_to_helper()
 if not helper_path:

[webkit-changes] [278187] trunk/Tools

2021-05-28 Thread jbedard
Title: [278187] trunk/Tools








Revision 278187
Author jbed...@apple.com
Date 2021-05-27 19:26:59 -0700 (Thu, 27 May 2021)


Log Message
[webkitcorey] Gracefully handle CNTRL-C in TaskPool
https://bugs.webkit.org/show_bug.cgi?id=226238


Reviewed by Dewei Zhu.

* Scripts/libraries/webkitcorepy/setup.py: Bump version.
* Scripts/libraries/webkitcorepy/webkitcorepy/__init__.py: Ditto.
* Scripts/libraries/webkitcorepy/webkitcorepy/task_pool.py:
(_BiDirectionalQueue.close): Tear-down queue objects while suppressing any logging.
(_Process.handler): Both SIGTERM and SIGINT signals should stop worker processes.
(_Process.main): Add SIGINT handler, explicitly close queue.
(TaskPool.__init__): Defer worker and queue construction to context manager so that we
do not have an instantiated but invalid queue if pipes are broken by children processes.
(TaskPool.__enter__): Construct worker processes.
(TaskPool.do): Only catch Queue.Empty exception.
(TaskPool.__exit__): Explicitly close queue, reset workers and queue.

Modified Paths

trunk/Tools/ChangeLog
trunk/Tools/Scripts/libraries/webkitcorepy/setup.py
trunk/Tools/Scripts/libraries/webkitcorepy/webkitcorepy/__init__.py
trunk/Tools/Scripts/libraries/webkitcorepy/webkitcorepy/task_pool.py




Diff

Modified: trunk/Tools/ChangeLog (278186 => 278187)

--- trunk/Tools/ChangeLog	2021-05-28 02:08:19 UTC (rev 278186)
+++ trunk/Tools/ChangeLog	2021-05-28 02:26:59 UTC (rev 278187)
@@ -1,3 +1,23 @@
+2021-05-27  Jonathan Bedard  
+
+[webkitcorey] Gracefully handle CNTRL-C in TaskPool
+https://bugs.webkit.org/show_bug.cgi?id=226238
+
+
+Reviewed by Dewei Zhu.
+
+* Scripts/libraries/webkitcorepy/setup.py: Bump version.
+* Scripts/libraries/webkitcorepy/webkitcorepy/__init__.py: Ditto.
+* Scripts/libraries/webkitcorepy/webkitcorepy/task_pool.py:
+(_BiDirectionalQueue.close): Tear-down queue objects while suppressing any logging.
+(_Process.handler): Both SIGTERM and SIGINT signals should stop worker processes.
+(_Process.main): Add SIGINT handler, explicitly close queue.
+(TaskPool.__init__): Defer worker and queue construction to context manager so that we
+do not have an instantiated but invalid queue if pipes are broken by children processes.
+(TaskPool.__enter__): Construct worker processes.
+(TaskPool.do): Only catch Queue.Empty exception.
+(TaskPool.__exit__): Explicitly close queue, reset workers and queue.
+
 2021-05-27  Darin Adler  
 
 Next step toward using std::optional directly instead of through WTF::Optional typedef


Modified: trunk/Tools/Scripts/libraries/webkitcorepy/setup.py (278186 => 278187)

--- trunk/Tools/Scripts/libraries/webkitcorepy/setup.py	2021-05-28 02:08:19 UTC (rev 278186)
+++ trunk/Tools/Scripts/libraries/webkitcorepy/setup.py	2021-05-28 02:26:59 UTC (rev 278187)
@@ -30,7 +30,7 @@
 
 setup(
 name='webkitcorepy',
-version='0.5.14',
+version='0.5.15',
 description='Library containing various Python support classes and functions.',
 long_description=readme(),
 classifiers=[


Modified: trunk/Tools/Scripts/libraries/webkitcorepy/webkitcorepy/__init__.py (278186 => 278187)

--- trunk/Tools/Scripts/libraries/webkitcorepy/webkitcorepy/__init__.py	2021-05-28 02:08:19 UTC (rev 278186)
+++ trunk/Tools/Scripts/libraries/webkitcorepy/webkitcorepy/__init__.py	2021-05-28 02:26:59 UTC (rev 278187)
@@ -37,7 +37,7 @@
 from webkitcorepy.task_pool import TaskPool
 from webkitcorepy.credentials import credentials
 
-version = Version(0, 5, 14)
+version = Version(0, 5, 15)
 
 from webkitcorepy.autoinstall import Package, AutoInstall
 if sys.version_info > (3, 0):


Modified: trunk/Tools/Scripts/libraries/webkitcorepy/webkitcorepy/task_pool.py (278186 => 278187)

--- trunk/Tools/Scripts/libraries/webkitcorepy/webkitcorepy/task_pool.py	2021-05-28 02:08:19 UTC (rev 278186)
+++ trunk/Tools/Scripts/libraries/webkitcorepy/webkitcorepy/task_pool.py	2021-05-28 02:26:59 UTC (rev 278187)
@@ -27,6 +27,11 @@
 import signal
 import sys
 
+if sys.version_info < (3, 0):
+import Queue
+else:
+import queue as Queue
+
 from webkitcorepy import OutputCapture, Timeout, log
 
 
@@ -146,7 +151,14 @@
 return self.incoming.get(timeout=difference)
 return self.incoming.get()
 
+def close(self):
+with OutputCapture():
+self.outgoing.close()
+self.incoming.close()
+self.outgoing.join_thread()
+self.incoming.join_thread()
 
+
 class _Process(object):
 name = None
 working = False
@@ -228,7 +240,7 @@
 
 @classmethod
 def handler(cls, value, _):
-if value == getattr(signal, 'SIGTERM'):
+if value in (getattr(signal, 'SIGTERM'), getattr(signal, 'SIGINT')):
 cls.working = False
 
 @classmethod
@@ -246,6 +258,8 @@
 
 if getattr(signal, 'SIGTERM'):
 signal.signal(signal.SIGTERM, 

[webkit-changes] [278127] trunk/Tools

2021-05-26 Thread jbedard
Title: [278127] trunk/Tools








Revision 278127
Author jbed...@apple.com
Date 2021-05-26 15:08:05 -0700 (Wed, 26 May 2021)


Log Message
[webkitpy] Refactor SimulatorDevice (Follow-up fix)
https://bugs.webkit.org/show_bug.cgi?id=225158

Unreviewed follow-up fix.

* Scripts/webkitpy/xcode/simulated_device.py:
(SimulatedDevice.is_usable): When no UI Manager service is defined, we should early exit.

Modified Paths

trunk/Tools/ChangeLog
trunk/Tools/Scripts/webkitpy/xcode/simulated_device.py




Diff

Modified: trunk/Tools/ChangeLog (278126 => 278127)

--- trunk/Tools/ChangeLog	2021-05-26 21:34:41 UTC (rev 278126)
+++ trunk/Tools/ChangeLog	2021-05-26 22:08:05 UTC (rev 278127)
@@ -1,3 +1,13 @@
+2021-05-26  Jonathan Bedard  
+
+[webkitpy] Refactor SimulatorDevice (Follow-up fix)
+https://bugs.webkit.org/show_bug.cgi?id=225158
+
+Unreviewed follow-up fix.
+
+* Scripts/webkitpy/xcode/simulated_device.py:
+(SimulatedDevice.is_usable): When no UI Manager service is defined, we should early exit.
+
 2021-05-26  Aakash Jain  
 
 Do not skip SetCommitQueueMinusFlagOnPatch step on EWS test instances


Modified: trunk/Tools/Scripts/webkitpy/xcode/simulated_device.py (278126 => 278127)

--- trunk/Tools/Scripts/webkitpy/xcode/simulated_device.py	2021-05-26 21:34:41 UTC (rev 278126)
+++ trunk/Tools/Scripts/webkitpy/xcode/simulated_device.py	2021-05-26 22:08:05 UTC (rev 278127)
@@ -579,7 +579,7 @@
 return False
 
 service = self.UI_MANAGER_SERVICE.get(self.device_type.software_variant)
-if service:
+if not service:
 _log.debug(u'{} has no service to check if the device is usable'.format(self.device_type.software_variant))
 return True
 






___
webkit-changes mailing list
webkit-changes@lists.webkit.org
https://lists.webkit.org/mailman/listinfo/webkit-changes


[webkit-changes] [278120] trunk

2021-05-26 Thread jbedard
Title: [278120] trunk








Revision 278120
Author jbed...@apple.com
Date 2021-05-26 12:59:16 -0700 (Wed, 26 May 2021)


Log Message
[run-webkit-tests] Strip php support from webserver (Apache)
https://bugs.webkit.org/show_bug.cgi?id=226032


Reviewed by Adrian Perez de Castro.

Tools:

* Scripts/webkitpy/port/base.py:
(Port._apache_config_file_name_for_platform): Use explicit Darwin httpd.conf.
(Port._is_darwin_php_version_7): Deleted.
(Port._darwin_php_version): Deleted.

LayoutTests:

* http/conf/apache2.2-httpd.conf: Remove PHP.
* http/conf/apache2.4-darwin-httpd.conf: Copied from LayoutTests/http/conf/apache2.4-x-httpd.conf.
* http/conf/apache2.4-httpd.conf: Remove PHP.
* http/conf/apache2.4-php7-httpd.conf: Removed.
* http/conf/apache2.4-x-httpd.conf: Renamed apache2.4-darwin-httpd.conf.

Modified Paths

trunk/LayoutTests/ChangeLog
trunk/LayoutTests/http/conf/apache2.2-httpd.conf
trunk/LayoutTests/http/conf/apache2.4-httpd.conf
trunk/Tools/ChangeLog
trunk/Tools/Scripts/webkitpy/port/base.py


Added Paths

trunk/LayoutTests/http/conf/apache2.4-darwin-httpd.conf


Removed Paths

trunk/LayoutTests/http/conf/apache2.4-php7-httpd.conf
trunk/LayoutTests/http/conf/apache2.4-x-httpd.conf




Diff

Modified: trunk/LayoutTests/ChangeLog (278119 => 278120)

--- trunk/LayoutTests/ChangeLog	2021-05-26 19:19:28 UTC (rev 278119)
+++ trunk/LayoutTests/ChangeLog	2021-05-26 19:59:16 UTC (rev 278120)
@@ -1,5 +1,19 @@
 2021-05-26  Jonathan Bedard  
 
+[run-webkit-tests] Strip php support from webserver (Apache)
+https://bugs.webkit.org/show_bug.cgi?id=226032
+
+
+Reviewed by Adrian Perez de Castro.
+
+* http/conf/apache2.2-httpd.conf: Remove PHP.
+* http/conf/apache2.4-darwin-httpd.conf: Copied from LayoutTests/http/conf/apache2.4-x-httpd.conf.
+* http/conf/apache2.4-httpd.conf: Remove PHP.
+* http/conf/apache2.4-php7-httpd.conf: Removed.
+* http/conf/apache2.4-x-httpd.conf: Renamed apache2.4-darwin-httpd.conf.
+
+2021-05-26  Jonathan Bedard  
+
 [LayoutTests] Delete php tests from imported/blink
 https://bugs.webkit.org/show_bug.cgi?id=226177
 


Modified: trunk/LayoutTests/http/conf/apache2.2-httpd.conf (278119 => 278120)

--- trunk/LayoutTests/http/conf/apache2.2-httpd.conf	2021-05-26 19:19:28 UTC (rev 278119)
+++ trunk/LayoutTests/http/conf/apache2.2-httpd.conf	2021-05-26 19:59:16 UTC (rev 278120)
@@ -28,7 +28,6 @@
 LoadModule actions_module libexec/apache2/mod_actions.so
 LoadModule alias_module libexec/apache2/mod_alias.so
 LoadModule rewrite_module libexec/apache2/mod_rewrite.so
-LoadModule php5_modulelibexec/apache2/libphp5.so
 
 ServerName 127.0.0.1
 
@@ -117,19 +116,6 @@
 AddHandler send-as-is asis
 
 
-
-AddType application/x-httpd-php .php
-AddType application/x-httpd-php .bat
-AddType application/x-httpd-php-source .phps
-
-
-DirectoryIndex index.html index.php
-
-
-php_flag log_errors on
-php_flag short_open_tag on
-
-
 
 RewriteEngine On
 RewriteCond %{REQUEST_METHOD} ^TRACE


Copied: trunk/LayoutTests/http/conf/apache2.4-darwin-httpd.conf (from rev 278119, trunk/LayoutTests/http/conf/apache2.4-x-httpd.conf) (0 => 278120)

--- trunk/LayoutTests/http/conf/apache2.4-darwin-httpd.conf	(rev 0)
+++ trunk/LayoutTests/http/conf/apache2.4-darwin-httpd.conf	2021-05-26 19:59:16 UTC (rev 278120)
@@ -0,0 +1,155 @@
+ServerRoot "/usr"
+
+Mutex file:/tmp/WebKit
+PidFile "/tmp/WebKit/httpd.pid"
+ScoreBoardFile "/tmp/WebKit/httpd.scoreboard"
+
+Timeout 300
+KeepAlive On
+MaxKeepAliveRequests 100
+KeepAliveTimeout 15
+
+MinSpareServers 1
+MaxSpareServers 5
+StartServers 1
+MaxRequestWorkers 150
+MaxConnectionsPerChild 10
+
+LoadModule autoindex_module libexec/apache2/mod_autoindex.so
+LoadModule unixd_module libexec/apache2/mod_unixd.so
+LoadModule access_compat_module libexec/apache2/mod_access_compat.so
+LoadModule authn_core_module libexec/apache2/mod_authn_core.so
+LoadModule authz_core_module libexec/apache2/mod_authz_core.so
+LoadModule authz_host_module libexec/apache2/mod_authz_host.so
+LoadModule include_module libexec/apache2/mod_include.so
+LoadModule log_config_module libexec/apache2/mod_log_config.so
+LoadModule headers_module libexec/apache2/mod_headers.so
+LoadModule ssl_module libexec/apache2/mod_ssl.so
+LoadModule mime_module libexec/apache2/mod_mime.so
+LoadModule asis_module libexec/apache2/mod_asis.so
+LoadModule cgi_module libexec/apache2/mod_cgi.so
+LoadModule negotiation_module libexec/apache2/mod_negotiation.so
+#LoadModule imagemap_module libexec/apache2/mod_imagemap.so
+LoadModule actions_module libexec/apache2/mod_actions.so
+LoadModule alias_module libexec/apache2/mod_alias.so
+LoadModule rewrite_module libexec/apache2/mod_rewrite.so
+
+
+	LoadModule mpm_prefork_module libexec/apache2/mod_mpm_prefork.so
+
+
+ServerName 127.0.0.1
+
+
+Options Indexes FollowSymLinks MultiViews ExecCGI Includes
+AllowOverride 

[webkit-changes] [278092] trunk/LayoutTests

2021-05-26 Thread jbedard
Title: [278092] trunk/LayoutTests








Revision 278092
Author jbed...@apple.com
Date 2021-05-26 10:40:36 -0700 (Wed, 26 May 2021)


Log Message
[LayoutTests] Delete php tests from imported/blink
https://bugs.webkit.org/show_bug.cgi?id=226177


Reviewed by Stephanie Lewis.

* imported/blink/http/tests/css/remove-placeholder-styles-expected.txt: Removed.
* imported/blink/http/tests/css/remove-placeholder-styles.html: Removed.
* imported/blink/http/tests/css/resources: Removed.
* imported/blink/http/tests/resources: Removed.
* imported/blink/http/tests/security/referrer-policy-attribute-img-origin-expected.html: Removed.
* imported/blink/http/tests/security/referrer-policy-attribute-img-origin-when-crossorigin-expected.html: Removed.
* imported/blink/http/tests/security/referrer-policy-attribute-img-origin-when-crossorigin.html: Removed.
* imported/blink/http/tests/security/referrer-policy-attribute-img-origin.html: Removed.
* imported/blink/http/tests/security/referrer-policy-attribute-img-picture-expected.html: Removed.
* imported/blink/http/tests/security/referrer-policy-attribute-img-picture.html: Removed.
* imported/blink/http/tests/security/referrer-policy-attribute-img-removeattr-expected.html: Removed.
* imported/blink/http/tests/security/referrer-policy-attribute-img-removeattr.html: Removed.
* imported/blink/http/tests/security/referrer-policy-attribute-img-unsafe-url-expected.html: Removed.
* imported/blink/http/tests/security/referrer-policy-attribute-img-unsafe-url.html: Removed.
* imported/blink/http/tests/security/resources/green-if-no-referrer.php: Removed.
* imported/blink/http/tests/security/resources/green-if-referrer-is-full-url-origin-when-crossorigin.php: Removed.
* imported/blink/http/tests/security/resources/green-if-referrer-is-full-url.php: Removed.
* imported/blink/http/tests/security/resources/green-if-referrer-is-origin.php: Removed.
* imported/blink/http/tests/svg/image-fetch-fail-expected.txt: Removed.
* imported/blink/http/tests/svg/image-fetch-fail.svg: Removed.
* imported/blink/http/tests/svg/resources: Removed.
* platform/ios/TestExpectations:

Modified Paths

trunk/LayoutTests/ChangeLog
trunk/LayoutTests/platform/ios/TestExpectations


Removed Paths

trunk/LayoutTests/imported/blink/http/tests/css/
trunk/LayoutTests/imported/blink/http/tests/resources/
trunk/LayoutTests/imported/blink/http/tests/security/referrer-policy-attribute-img-origin-expected.html
trunk/LayoutTests/imported/blink/http/tests/security/referrer-policy-attribute-img-origin-when-crossorigin-expected.html
trunk/LayoutTests/imported/blink/http/tests/security/referrer-policy-attribute-img-origin-when-crossorigin.html
trunk/LayoutTests/imported/blink/http/tests/security/referrer-policy-attribute-img-origin.html
trunk/LayoutTests/imported/blink/http/tests/security/referrer-policy-attribute-img-picture-expected.html
trunk/LayoutTests/imported/blink/http/tests/security/referrer-policy-attribute-img-picture.html
trunk/LayoutTests/imported/blink/http/tests/security/referrer-policy-attribute-img-removeattr-expected.html
trunk/LayoutTests/imported/blink/http/tests/security/referrer-policy-attribute-img-removeattr.html
trunk/LayoutTests/imported/blink/http/tests/security/referrer-policy-attribute-img-unsafe-url-expected.html
trunk/LayoutTests/imported/blink/http/tests/security/referrer-policy-attribute-img-unsafe-url.html
trunk/LayoutTests/imported/blink/http/tests/security/resources/green-if-no-referrer.php
trunk/LayoutTests/imported/blink/http/tests/security/resources/green-if-referrer-is-full-url-origin-when-crossorigin.php
trunk/LayoutTests/imported/blink/http/tests/security/resources/green-if-referrer-is-full-url.php
trunk/LayoutTests/imported/blink/http/tests/security/resources/green-if-referrer-is-origin.php
trunk/LayoutTests/imported/blink/http/tests/svg/image-fetch-fail-expected.txt
trunk/LayoutTests/imported/blink/http/tests/svg/image-fetch-fail.svg
trunk/LayoutTests/imported/blink/http/tests/svg/resources/




Diff

Modified: trunk/LayoutTests/ChangeLog (278091 => 278092)

--- trunk/LayoutTests/ChangeLog	2021-05-26 17:34:02 UTC (rev 278091)
+++ trunk/LayoutTests/ChangeLog	2021-05-26 17:40:36 UTC (rev 278092)
@@ -1,3 +1,34 @@
+2021-05-26  Jonathan Bedard  
+
+[LayoutTests] Delete php tests from imported/blink
+https://bugs.webkit.org/show_bug.cgi?id=226177
+
+
+Reviewed by Stephanie Lewis.
+
+* imported/blink/http/tests/css/remove-placeholder-styles-expected.txt: Removed.
+* imported/blink/http/tests/css/remove-placeholder-styles.html: Removed.
+* imported/blink/http/tests/css/resources: Removed.
+* imported/blink/http/tests/resources: Removed.
+* imported/blink/http/tests/security/referrer-policy-attribute-img-origin-expected.html: Removed.
+* imported/blink/http/tests/security/referrer-policy-attribute-img-origin-when-crossorigin-expected.html: Removed.
+* 

[webkit-changes] [278083] trunk/Tools

2021-05-26 Thread jbedard
Title: [278083] trunk/Tools








Revision 278083
Author jbed...@apple.com
Date 2021-05-26 08:23:48 -0700 (Wed, 26 May 2021)


Log Message
[test-lldb-webkit] Update for Xcode 12.5
https://bugs.webkit.org/show_bug.cgi?id=226115


Reviewed by Darin Adler.

* lldb/lldb_webkit_unittest.py:
(TestSummaryProviders.serial_test_WTFStringImpl_SummaryProvider_8bit_string): Use unicode directly.
(TestSummaryProviders.serial_test_WTFStringImpl_SummaryProvider_16bit_string): Ditto.
(TestSummaryProviders.serial_test_WTFString_SummaryProvider_8bit_string): Ditto.
(TestSummaryProviders.serial_test_WTFString_SummaryProvider_16bit_string): Ditto.

Modified Paths

trunk/Tools/ChangeLog
trunk/Tools/lldb/lldb_webkit_unittest.py




Diff

Modified: trunk/Tools/ChangeLog (278082 => 278083)

--- trunk/Tools/ChangeLog	2021-05-26 15:15:22 UTC (rev 278082)
+++ trunk/Tools/ChangeLog	2021-05-26 15:23:48 UTC (rev 278083)
@@ -1,3 +1,17 @@
+2021-05-26  Jonathan Bedard  
+
+[test-lldb-webkit] Update for Xcode 12.5
+https://bugs.webkit.org/show_bug.cgi?id=226115
+
+
+Reviewed by Darin Adler.
+
+* lldb/lldb_webkit_unittest.py:
+(TestSummaryProviders.serial_test_WTFStringImpl_SummaryProvider_8bit_string): Use unicode directly.
+(TestSummaryProviders.serial_test_WTFStringImpl_SummaryProvider_16bit_string): Ditto.
+(TestSummaryProviders.serial_test_WTFString_SummaryProvider_8bit_string): Ditto.
+(TestSummaryProviders.serial_test_WTFString_SummaryProvider_16bit_string): Ditto.
+
 2021-05-26  Sam Sneddon  
 
 Fix remaining test-webkitpy{,-python2} --all --integration-tests failures


Modified: trunk/Tools/lldb/lldb_webkit_unittest.py (278082 => 278083)

--- trunk/Tools/lldb/lldb_webkit_unittest.py	2021-05-26 15:15:22 UTC (rev 278082)
+++ trunk/Tools/lldb/lldb_webkit_unittest.py	2021-05-26 15:23:48 UTC (rev 278083)
@@ -115,11 +115,11 @@
 
 def serial_test_WTFStringImpl_SummaryProvider_8bit_string(self):
 summary = lldb_webkit.WTFStringImpl_SummaryProvider(self._sbFrame.FindVariable('an8BitStringImpl'), {})
-self.assertEqual(summary, "{ length = 8, is8bit = 1, contents = 'r\\xe9sum\\xe9' }")
+self.assertEqual(summary, u"{ length = 8, is8bit = 1, contents = 'r\xe9sum\xe9' }")
 
 def serial_test_WTFStringImpl_SummaryProvider_16bit_string(self):
 summary = lldb_webkit.WTFStringImpl_SummaryProvider(self._sbFrame.FindVariable('a16BitStringImpl'), {})
-self.assertEqual(summary, u"{ length = 13, is8bit = 0, contents = '\\u1680Cappuccino\\u1680\\x00' }")
+self.assertEqual(summary, u"{ length = 13, is8bit = 0, contents = '\u1680Cappuccino\u1680\x00' }")
 
 # MARK: WTFString_SummaryProvider test cases
 
@@ -133,11 +133,11 @@
 
 def serial_test_WTFString_SummaryProvider_8bit_string(self):
 summary = lldb_webkit.WTFString_SummaryProvider(self._sbFrame.FindVariable('an8BitString'), {})
-self.assertEqual(summary, "{ length = 8, contents = 'r\\xe9sum\\xe9' }")
+self.assertEqual(summary, u"{ length = 8, contents = 'r\xe9sum\xe9' }")
 
 def serial_test_WTFString_SummaryProvider_16bit_string(self):
 summary = lldb_webkit.WTFString_SummaryProvider(self._sbFrame.FindVariable('a16BitString'), {})
-self.assertEqual(summary, u"{ length = 13, contents = '\\u1680Cappuccino\\u1680\\x00' }")
+self.assertEqual(summary, u"{ length = 13, contents = '\u1680Cappuccino\u1680\x00' }")
 
 # MARK: WTFVector_SummaryProvider test cases
 






___
webkit-changes mailing list
webkit-changes@lists.webkit.org
https://lists.webkit.org/mailman/listinfo/webkit-changes


[webkit-changes] [277966] trunk/LayoutTests

2021-05-24 Thread jbedard
Title: [277966] trunk/LayoutTests








Revision 277966
Author jbed...@apple.com
Date 2021-05-24 14:44:48 -0700 (Mon, 24 May 2021)


Log Message
[LayoutTests] Delete unused jquery resources
https://bugs.webkit.org/show_bug.cgi?id=226043


Reviewed by Dewei Zhu.

* jquery/resources/src/intro.js: Removed.
* jquery/resources/src/outro.js: Removed.
* jquery/resources/src/selector.js: Removed.
* jquery/resources/test/csp.php: Removed.
* jquery/resources/test/data/readywaitasset.js: Removed.
* jquery/resources/test/data/readywaitloader.js: Removed.
* jquery/resources/test/delegatetest.html: Removed.
* jquery/resources/test/localfile.html: Removed.
* jquery/resources/test/networkerror.html: Removed.
* jquery/resources/test/polluted.php: Removed.
* jquery/resources/test/readywait.html: Removed.
* jquery/resources/test/xhtml.php: Removed.

Modified Paths

trunk/LayoutTests/ChangeLog


Removed Paths

trunk/LayoutTests/jquery/resources/src/intro.js
trunk/LayoutTests/jquery/resources/src/outro.js
trunk/LayoutTests/jquery/resources/src/selector.js
trunk/LayoutTests/jquery/resources/test/csp.php
trunk/LayoutTests/jquery/resources/test/data/readywaitasset.js
trunk/LayoutTests/jquery/resources/test/data/readywaitloader.js
trunk/LayoutTests/jquery/resources/test/delegatetest.html
trunk/LayoutTests/jquery/resources/test/localfile.html
trunk/LayoutTests/jquery/resources/test/networkerror.html
trunk/LayoutTests/jquery/resources/test/polluted.php
trunk/LayoutTests/jquery/resources/test/readywait.html
trunk/LayoutTests/jquery/resources/test/xhtml.php




Diff

Modified: trunk/LayoutTests/ChangeLog (277965 => 277966)

--- trunk/LayoutTests/ChangeLog	2021-05-24 21:05:24 UTC (rev 277965)
+++ trunk/LayoutTests/ChangeLog	2021-05-24 21:44:48 UTC (rev 277966)
@@ -1,3 +1,24 @@
+2021-05-24  Jonathan Bedard  
+
+[LayoutTests] Delete unused jquery resources
+https://bugs.webkit.org/show_bug.cgi?id=226043
+
+
+Reviewed by Dewei Zhu.
+
+* jquery/resources/src/intro.js: Removed.
+* jquery/resources/src/outro.js: Removed.
+* jquery/resources/src/selector.js: Removed.
+* jquery/resources/test/csp.php: Removed.
+* jquery/resources/test/data/readywaitasset.js: Removed.
+* jquery/resources/test/data/readywaitloader.js: Removed.
+* jquery/resources/test/delegatetest.html: Removed.
+* jquery/resources/test/localfile.html: Removed.
+* jquery/resources/test/networkerror.html: Removed.
+* jquery/resources/test/polluted.php: Removed.
+* jquery/resources/test/readywait.html: Removed.
+* jquery/resources/test/xhtml.php: Removed.
+
 2021-05-24  Chris Gambrell  
 
 [LayoutTests] Remove straggling PHP references


Deleted: trunk/LayoutTests/jquery/resources/src/intro.js (277965 => 277966)

--- trunk/LayoutTests/jquery/resources/src/intro.js	2021-05-24 21:05:24 UTC (rev 277965)
+++ trunk/LayoutTests/jquery/resources/src/intro.js	2021-05-24 21:44:48 UTC (rev 277966)
@@ -1,19 +0,0 @@
-/*!
- * jQuery _javascript_ Library v@VERSION
- * http://jquery.com/
- *
- * Copyright 2011, John Resig
- * Dual licensed under the MIT or GPL Version 2 licenses.
- * http://jquery.org/license
- *
- * Includes Sizzle.js
- * http://sizzlejs.com/
- * Copyright 2011, The Dojo Foundation
- * Released under the MIT, BSD, and GPL Licenses.
- *
- * Date: @DATE
- */
-(function( window, undefined ) {
-
-// Use the correct document accordingly with window argument (sandbox)
-var document = window.document;


Deleted: trunk/LayoutTests/jquery/resources/src/outro.js (277965 => 277966)

--- trunk/LayoutTests/jquery/resources/src/outro.js	2021-05-24 21:05:24 UTC (rev 277965)
+++ trunk/LayoutTests/jquery/resources/src/outro.js	2021-05-24 21:44:48 UTC (rev 277966)
@@ -1,2 +0,0 @@
-window.jQuery = window.$ = jQuery;
-})(window);


Deleted: trunk/LayoutTests/jquery/resources/src/selector.js (277965 => 277966)

--- trunk/LayoutTests/jquery/resources/src/selector.js	2021-05-24 21:05:24 UTC (rev 277965)
+++ trunk/LayoutTests/jquery/resources/src/selector.js	2021-05-24 21:44:48 UTC (rev 277966)
@@ -1,1392 +0,0 @@
-/*!
- * Sizzle CSS Selector Engine
- *  Copyright 2011, The Dojo Foundation
- *  Released under the MIT, BSD, and GPL Licenses.
- *  More information: http://sizzlejs.com/
- */
-(function(){
-
-var chunker = /((?:\((?:\([^()]+\)|[^()]+)+\)|\[(?:\[[^\[\]]*\]|['"][^'"]*['"]|[^\[\]'"]+)+\]|\\.|[^ >+~,(\[\\]+)+|[>+~])(\s*,\s*)?((?:.|\r|\n)*)/g,
-	done = 0,
-	toString = Object.prototype.toString,
-	hasDuplicate = false,
-	baseHasDuplicate = true,
-	rBackslash = /\\/g,
-	rNonWord = /\W/;
-
-// Here we check if the _javascript_ engine is using some sort of
-// optimization where it does not always call our comparision
-// function. If that is the case, discard the hasDuplicate value.
-//   Thus far that includes Google Chrome.
-[0, 0].sort(function() {
-	baseHasDuplicate = false;
-	return 0;
-});
-
-var Sizzle = function( selector, context, results, seed ) {
-	

[webkit-changes] [277782] trunk/Tools

2021-05-20 Thread jbedard
Title: [277782] trunk/Tools








Revision 277782
Author jbed...@apple.com
Date 2021-05-20 07:45:30 -0700 (Thu, 20 May 2021)


Log Message
[webkitpy] Forward booted simulators to children processes
https://bugs.webkit.org/show_bug.cgi?id=225933


Rubber-stamped by Aakash Jain.

* Scripts/webkitpy/api_tests/runner.py:
(setup_shard): Set DeviceManager global variable from parent process.
(Runner.command_for_port): Use Port's device manager instead of simulated device manager.
(Runner.run): Pass DeviceManager details to children processes.

Modified Paths

trunk/Tools/ChangeLog
trunk/Tools/Scripts/webkitpy/api_tests/runner.py




Diff

Modified: trunk/Tools/ChangeLog (277781 => 277782)

--- trunk/Tools/ChangeLog	2021-05-20 13:48:42 UTC (rev 277781)
+++ trunk/Tools/ChangeLog	2021-05-20 14:45:30 UTC (rev 277782)
@@ -1,3 +1,16 @@
+2021-05-20  Jonathan Bedard  
+
+[webkitpy] Forward booted simulators to children processes
+https://bugs.webkit.org/show_bug.cgi?id=225933
+
+
+Rubber-stamped by Aakash Jain.
+
+* Scripts/webkitpy/api_tests/runner.py:
+(setup_shard): Set DeviceManager global variable from parent process.
+(Runner.command_for_port): Use Port's device manager instead of simulated device manager.
+(Runner.run): Pass DeviceManager details to children processes.
+
 2021-05-20  Sam Sneddon  
 
 Store whether a test is slow on TestInput


Modified: trunk/Tools/Scripts/webkitpy/api_tests/runner.py (277781 => 277782)

--- trunk/Tools/Scripts/webkitpy/api_tests/runner.py	2021-05-20 13:48:42 UTC (rev 277781)
+++ trunk/Tools/Scripts/webkitpy/api_tests/runner.py	2021-05-20 14:45:30 UTC (rev 277782)
@@ -29,12 +29,15 @@
 
 from webkitpy.common.iteration_compatibility import iteritems
 from webkitpy.port.server_process import ServerProcess, _log as server_process_logger
-from webkitpy.xcode.simulated_device import SimulatedDeviceManager
 
 _log = logging.getLogger(__name__)
 
 
-def setup_shard(port=None):
+def setup_shard(port=None, devices=None):
+if devices and getattr(port, 'DEVICE_MANAGER', None):
+port.DEVICE_MANAGER.AVAILABLE_DEVICES = devices.get('available_devices', [])
+port.DEVICE_MANAGER.INITIALIZED_DEVICES = devices.get('initialized_devices', None)
+
 return _Worker.setup(port=port)
 
 
@@ -85,9 +88,9 @@
 def command_for_port(port, args):
 if (port.get_option('force')):
 args.append('--gtest_also_run_disabled_tests=1')
-if 'simulator' in port.port_name:
-assert SimulatedDeviceManager.INITIALIZED_DEVICES
-return ['/usr/bin/xcrun', 'simctl', 'spawn', SimulatedDeviceManager.INITIALIZED_DEVICES[0].udid] + args
+if getattr(port, 'DEVICE_MANAGER', None):
+assert port.DEVICE_MANAGER.INITIALIZED_DEVICES
+return ['/usr/bin/xcrun', 'simctl', 'spawn', port.DEVICE_MANAGER.INITIALIZED_DEVICES[0].udid] + args
 elif 'device' in port.port_name:
 raise RuntimeError('Running api tests on {} is not supported'.format(port.port_name))
 elif port.host.platform.is_win():
@@ -120,10 +123,16 @@
 Runner.instance = self
 self._num_workers = min(num_workers, len(shards))
 
+devices = None
+if getattr(self.port, 'DEVICE_MANAGER', None):
+devices = dict(
+available_devices=self.port.DEVICE_MANAGER.AVAILABLE_DEVICES,
+initialized_devices=self.port.DEVICE_MANAGER.INITIALIZED_DEVICES,
+)
+
 with TaskPool(
 workers=self._num_workers,
-setup=setup_shard, setupkwargs=dict(port=self.port),
-teardown=teardown_shard,
+setup=setup_shard, setupkwargs=dict(port=self.port, devices=devices), teardown=teardown_shard,
 ) as pool:
 for name, tests in iteritems(shards):
 pool.do(run_shard, name, *tests)






___
webkit-changes mailing list
webkit-changes@lists.webkit.org
https://lists.webkit.org/mailman/listinfo/webkit-changes


[webkit-changes] [277735] trunk/Tools

2021-05-19 Thread jbedard
Title: [277735] trunk/Tools








Revision 277735
Author jbed...@apple.com
Date 2021-05-19 11:09:45 -0700 (Wed, 19 May 2021)


Log Message
[webkitpy] Deprecate webkitpy/tool/grammar.py
https://bugs.webkit.org/show_bug.cgi?id=225943


Reviewed by Stephanie Lewis.

* Scripts/bisect-builds:
* Scripts/webkitpy/layout_tests/controllers/layout_test_runner.py:
(LayoutTestRunner.run_tests):
* Scripts/webkitpy/layout_tests/controllers/manager.py:
* Scripts/webkitpy/layout_tests/views/printing.py:
(Printer.print_found):
(Printer.print_workers_and_shards):
(Printer._print_one_line_summary):
* Scripts/webkitpy/test/printer.py:
* Scripts/webkitpy/tool/bot/flakytestreporter.py:
(FlakyTestReporter._lookup_bug_for_flaky_test):
(FlakyTestReporter._create_bug_for_flaky_test):
* Scripts/webkitpy/tool/commands/download.py:
(AbstractPatchProcessingCommand.execute):
(ProcessBugsMixin._fetch_list_of_patches_to_process):
(ProcessURLsMixin._fetch_list_of_patches_to_process):
* Scripts/webkitpy/tool/commands/download_unittest.py:
* Scripts/webkitpy/tool/commands/queries.py:
* Scripts/webkitpy/tool/commands/suggestnominations.py:
(SuggestNominations._print_nominations):
(SuggestNominations._print_counts):
* Scripts/webkitpy/tool/commands/upload.py:
(CleanPendingCommit._flags_to_clear_on_patch):
(PostCommits.execute):
* Scripts/webkitpy/tool/grammar.py: Removed.
* Scripts/webkitpy/tool/grammar_unittest.py: Removed.
* Scripts/webkitpy/tool/multicommandtool.py:
* Scripts/webkitpy/tool/steps/obsoletepatches.py:
(ObsoletePatches.run):
* Scripts/webkitpy/tool/steps/preparechangelogforrevert.py:
(PrepareChangeLogForRevert._message_for_revert):
* Scripts/webkitpy/tool/steps/preparechangelogforrevert_unittest.py:
* Scripts/webkitpy/tool/steps/reopenbugafterrevert.py:
(ReopenBugAfterRevert.run):

Modified Paths

trunk/Tools/ChangeLog
trunk/Tools/Scripts/bisect-builds
trunk/Tools/Scripts/webkitpy/layout_tests/controllers/layout_test_runner.py
trunk/Tools/Scripts/webkitpy/layout_tests/controllers/manager.py
trunk/Tools/Scripts/webkitpy/layout_tests/views/printing.py
trunk/Tools/Scripts/webkitpy/test/printer.py
trunk/Tools/Scripts/webkitpy/tool/bot/flakytestreporter.py
trunk/Tools/Scripts/webkitpy/tool/commands/download.py
trunk/Tools/Scripts/webkitpy/tool/commands/download_unittest.py
trunk/Tools/Scripts/webkitpy/tool/commands/queries.py
trunk/Tools/Scripts/webkitpy/tool/commands/suggestnominations.py
trunk/Tools/Scripts/webkitpy/tool/commands/upload.py
trunk/Tools/Scripts/webkitpy/tool/multicommandtool.py
trunk/Tools/Scripts/webkitpy/tool/steps/obsoletepatches.py
trunk/Tools/Scripts/webkitpy/tool/steps/preparechangelogforrevert.py
trunk/Tools/Scripts/webkitpy/tool/steps/preparechangelogforrevert_unittest.py
trunk/Tools/Scripts/webkitpy/tool/steps/reopenbugafterrevert.py


Removed Paths

trunk/Tools/Scripts/webkitpy/tool/grammar.py
trunk/Tools/Scripts/webkitpy/tool/grammar_unittest.py




Diff

Modified: trunk/Tools/ChangeLog (277734 => 277735)

--- trunk/Tools/ChangeLog	2021-05-19 18:09:30 UTC (rev 277734)
+++ trunk/Tools/ChangeLog	2021-05-19 18:09:45 UTC (rev 277735)
@@ -1,3 +1,46 @@
+2021-05-19  Jonathan Bedard  
+
+[webkitpy] Deprecate webkitpy/tool/grammar.py
+https://bugs.webkit.org/show_bug.cgi?id=225943
+
+
+Reviewed by Stephanie Lewis.
+
+* Scripts/bisect-builds:
+* Scripts/webkitpy/layout_tests/controllers/layout_test_runner.py:
+(LayoutTestRunner.run_tests):
+* Scripts/webkitpy/layout_tests/controllers/manager.py:
+* Scripts/webkitpy/layout_tests/views/printing.py:
+(Printer.print_found):
+(Printer.print_workers_and_shards):
+(Printer._print_one_line_summary):
+* Scripts/webkitpy/test/printer.py:
+* Scripts/webkitpy/tool/bot/flakytestreporter.py:
+(FlakyTestReporter._lookup_bug_for_flaky_test):
+(FlakyTestReporter._create_bug_for_flaky_test):
+* Scripts/webkitpy/tool/commands/download.py:
+(AbstractPatchProcessingCommand.execute):
+(ProcessBugsMixin._fetch_list_of_patches_to_process):
+(ProcessURLsMixin._fetch_list_of_patches_to_process):
+* Scripts/webkitpy/tool/commands/download_unittest.py:
+* Scripts/webkitpy/tool/commands/queries.py:
+* Scripts/webkitpy/tool/commands/suggestnominations.py:
+(SuggestNominations._print_nominations):
+(SuggestNominations._print_counts):
+* Scripts/webkitpy/tool/commands/upload.py:
+(CleanPendingCommit._flags_to_clear_on_patch):
+(PostCommits.execute):
+* Scripts/webkitpy/tool/grammar.py: Removed.
+* Scripts/webkitpy/tool/grammar_unittest.py: Removed.
+* Scripts/webkitpy/tool/multicommandtool.py:
+* Scripts/webkitpy/tool/steps/obsoletepatches.py:
+(ObsoletePatches.run):
+* Scripts/webkitpy/tool/steps/preparechangelogforrevert.py:
+(PrepareChangeLogForRevert._message_for_revert):
+* 

[webkit-changes] [277675] trunk/Tools

2021-05-18 Thread jbedard
Title: [277675] trunk/Tools








Revision 277675
Author jbed...@apple.com
Date 2021-05-18 13:58:33 -0700 (Tue, 18 May 2021)


Log Message
[webkitpy] Forward booted simulators to children processes
https://bugs.webkit.org/show_bug.cgi?id=225933


Rubber-stamped by Aakash Jain.

* Scripts/webkitpy/api_tests/runner.py:
(setup_shard): Set DeviceManager global variable from parent process.
(Runner.command_for_port): Use Port's device manager instead of simulated device manager.
(Runner.run): Pass DeviceManager details to children processes.

Modified Paths

trunk/Tools/ChangeLog
trunk/Tools/Scripts/webkitpy/api_tests/runner.py




Diff

Modified: trunk/Tools/ChangeLog (277674 => 277675)

--- trunk/Tools/ChangeLog	2021-05-18 20:49:25 UTC (rev 277674)
+++ trunk/Tools/ChangeLog	2021-05-18 20:58:33 UTC (rev 277675)
@@ -1,3 +1,16 @@
+2021-05-18  Jonathan Bedard  
+
+[webkitpy] Forward booted simulators to children processes
+https://bugs.webkit.org/show_bug.cgi?id=225933
+
+
+Rubber-stamped by Aakash Jain.
+
+* Scripts/webkitpy/api_tests/runner.py:
+(setup_shard): Set DeviceManager global variable from parent process.
+(Runner.command_for_port): Use Port's device manager instead of simulated device manager.
+(Runner.run): Pass DeviceManager details to children processes.
+
 2021-05-18  Aakash Jain  
 
 [ews] Style fixes in steps_unittest.py


Modified: trunk/Tools/Scripts/webkitpy/api_tests/runner.py (277674 => 277675)

--- trunk/Tools/Scripts/webkitpy/api_tests/runner.py	2021-05-18 20:49:25 UTC (rev 277674)
+++ trunk/Tools/Scripts/webkitpy/api_tests/runner.py	2021-05-18 20:58:33 UTC (rev 277675)
@@ -29,12 +29,15 @@
 
 from webkitpy.common.iteration_compatibility import iteritems
 from webkitpy.port.server_process import ServerProcess, _log as server_process_logger
-from webkitpy.xcode.simulated_device import SimulatedDeviceManager
 
 _log = logging.getLogger(__name__)
 
 
-def setup_shard(port=None):
+def setup_shard(port=None, devices=None):
+devices = devices or dict()
+port.DEVICE_MANAGER.AVAILABLE_DEVICES = devices.get('available_devices', [])
+port.DEVICE_MANAGER.INITIALIZED_DEVICES = devices.get('initialized_devices', None)
+
 return _Worker.setup(port=port)
 
 
@@ -86,8 +89,8 @@
 if (port.get_option('force')):
 args.append('--gtest_also_run_disabled_tests=1')
 if 'simulator' in port.port_name:
-assert SimulatedDeviceManager.INITIALIZED_DEVICES
-return ['/usr/bin/xcrun', 'simctl', 'spawn', SimulatedDeviceManager.INITIALIZED_DEVICES[0].udid] + args
+assert port.DEVICE_MANAGER.INITIALIZED_DEVICES
+return ['/usr/bin/xcrun', 'simctl', 'spawn', port.DEVICE_MANAGER.INITIALIZED_DEVICES[0].udid] + args
 elif 'device' in port.port_name:
 raise RuntimeError('Running api tests on {} is not supported'.format(port.port_name))
 elif port.host.platform.is_win():
@@ -122,8 +125,10 @@
 
 with TaskPool(
 workers=self._num_workers,
-setup=setup_shard, setupkwargs=dict(port=self.port),
-teardown=teardown_shard,
+setup=setup_shard, setupkwargs=dict(port=self.port, devices=dict(
+available_devices=self.port.DEVICE_MANAGER.AVAILABLE_DEVICES,
+initialized_devices=self.port.DEVICE_MANAGER.INITIALIZED_DEVICES,
+)), teardown=teardown_shard,
 ) as pool:
 for name, tests in iteritems(shards):
 pool.do(run_shard, name, *tests)






___
webkit-changes mailing list
webkit-changes@lists.webkit.org
https://lists.webkit.org/mailman/listinfo/webkit-changes


[webkit-changes] [277668] trunk/Tools

2021-05-18 Thread jbedard
Title: [277668] trunk/Tools








Revision 277668
Author jbed...@apple.com
Date 2021-05-18 12:03:20 -0700 (Tue, 18 May 2021)


Log Message
[lint-test-expectations] Change shebang to Python 3
https://bugs.webkit.org/show_bug.cgi?id=225898


Reviewed by Aakash Jain.

* Scripts/lint-test-expectations: Change shebang, remove version check.

Modified Paths

trunk/Tools/ChangeLog
trunk/Tools/Scripts/lint-test-expectations




Diff

Modified: trunk/Tools/ChangeLog (277667 => 277668)

--- trunk/Tools/ChangeLog	2021-05-18 18:59:29 UTC (rev 277667)
+++ trunk/Tools/ChangeLog	2021-05-18 19:03:20 UTC (rev 277668)
@@ -1,3 +1,13 @@
+2021-05-18  Jonathan Bedard  
+
+[lint-test-expectations] Change shebang to Python 3
+https://bugs.webkit.org/show_bug.cgi?id=225898
+
+
+Reviewed by Aakash Jain.
+
+* Scripts/lint-test-expectations: Change shebang, remove version check.
+
 2021-05-18  Yoshiaki Jitsukawa  
 
 [PlayStation] Fix PlayStation port


Modified: trunk/Tools/Scripts/lint-test-expectations (277667 => 277668)

--- trunk/Tools/Scripts/lint-test-expectations	2021-05-18 18:59:29 UTC (rev 277667)
+++ trunk/Tools/Scripts/lint-test-expectations	2021-05-18 19:03:20 UTC (rev 277668)
@@ -1,4 +1,4 @@
-#!/usr/bin/env python
+#!/usr/bin/env python3
 # Copyright (C) 2012 Google Inc. All rights reserved.
 #
 # Redistribution and use in source and binary forms, with or without
@@ -29,7 +29,6 @@
 
 import sys
 
-from webkitpy.common import version_check
 from webkitpy.layout_tests import lint_test_expectations
 
 






___
webkit-changes mailing list
webkit-changes@lists.webkit.org
https://lists.webkit.org/mailman/listinfo/webkit-changes


[webkit-changes] [277615] trunk/Tools

2021-05-17 Thread jbedard
Title: [277615] trunk/Tools








Revision 277615
Author jbed...@apple.com
Date 2021-05-17 16:45:13 -0700 (Mon, 17 May 2021)


Log Message
[webkitscmpy] Support testing on machines without svn installed
https://bugs.webkit.org/show_bug.cgi?id=225891


Reviewed by Dewei Zhu.

* Scripts/libraries/webkitscmpy/setup.py: Bump version.
* Scripts/libraries/webkitscmpy/webkitscmpy/__init__.py:
* Scripts/libraries/webkitscmpy/webkitscmpy/local/scm.py:
(Scm.executable): Ensure whichcraft import support mock.
* Scripts/libraries/webkitscmpy/webkitscmpy/mocks/local/git.py:
(Git.__enter__): Mock git executable location.
* Scripts/libraries/webkitscmpy/webkitscmpy/mocks/local/svn.py:
(Svn.__enter__): Mock svn executable location.

Modified Paths

trunk/Tools/ChangeLog
trunk/Tools/Scripts/libraries/webkitscmpy/setup.py
trunk/Tools/Scripts/libraries/webkitscmpy/webkitscmpy/__init__.py
trunk/Tools/Scripts/libraries/webkitscmpy/webkitscmpy/local/scm.py
trunk/Tools/Scripts/libraries/webkitscmpy/webkitscmpy/mocks/local/git.py
trunk/Tools/Scripts/libraries/webkitscmpy/webkitscmpy/mocks/local/svn.py




Diff

Modified: trunk/Tools/ChangeLog (277614 => 277615)

--- trunk/Tools/ChangeLog	2021-05-17 23:24:23 UTC (rev 277614)
+++ trunk/Tools/ChangeLog	2021-05-17 23:45:13 UTC (rev 277615)
@@ -1,3 +1,20 @@
+2021-05-17  Jonathan Bedard  
+
+[webkitscmpy] Support testing on machines without svn installed
+https://bugs.webkit.org/show_bug.cgi?id=225891
+
+
+Reviewed by Dewei Zhu.
+
+* Scripts/libraries/webkitscmpy/setup.py: Bump version.
+* Scripts/libraries/webkitscmpy/webkitscmpy/__init__.py:
+* Scripts/libraries/webkitscmpy/webkitscmpy/local/scm.py:
+(Scm.executable): Ensure whichcraft import support mock.
+* Scripts/libraries/webkitscmpy/webkitscmpy/mocks/local/git.py:
+(Git.__enter__): Mock git executable location.
+* Scripts/libraries/webkitscmpy/webkitscmpy/mocks/local/svn.py:
+(Svn.__enter__): Mock svn executable location.
+
 2021-05-17  Alex Christensen  
 
 Remove API::Object::Type::BundlePageGroup


Modified: trunk/Tools/Scripts/libraries/webkitscmpy/setup.py (277614 => 277615)

--- trunk/Tools/Scripts/libraries/webkitscmpy/setup.py	2021-05-17 23:24:23 UTC (rev 277614)
+++ trunk/Tools/Scripts/libraries/webkitscmpy/setup.py	2021-05-17 23:45:13 UTC (rev 277615)
@@ -29,7 +29,7 @@
 
 setup(
 name='webkitscmpy',
-version='0.14.1',
+version='0.14.2',
 description='Library designed to interact with git and svn repositories.',
 long_description=readme(),
 classifiers=[


Modified: trunk/Tools/Scripts/libraries/webkitscmpy/webkitscmpy/__init__.py (277614 => 277615)

--- trunk/Tools/Scripts/libraries/webkitscmpy/webkitscmpy/__init__.py	2021-05-17 23:24:23 UTC (rev 277614)
+++ trunk/Tools/Scripts/libraries/webkitscmpy/webkitscmpy/__init__.py	2021-05-17 23:45:13 UTC (rev 277615)
@@ -46,7 +46,7 @@
 "Please install webkitcorepy with `pip install webkitcorepy --extra-index-url `"
 )
 
-version = Version(0, 14, 1)
+version = Version(0, 14, 2)
 
 AutoInstall.register(Package('fasteners', Version(0, 15, 0)))
 AutoInstall.register(Package('monotonic', Version(1, 5)))


Modified: trunk/Tools/Scripts/libraries/webkitscmpy/webkitscmpy/local/scm.py (277614 => 277615)

--- trunk/Tools/Scripts/libraries/webkitscmpy/webkitscmpy/local/scm.py	2021-05-17 23:24:23 UTC (rev 277614)
+++ trunk/Tools/Scripts/libraries/webkitscmpy/webkitscmpy/local/scm.py	2021-05-17 23:45:13 UTC (rev 277615)
@@ -28,8 +28,6 @@
 from webkitcorepy import run
 from webkitscmpy import ScmBase
 
-# TODO: Use shutil directly when Python 2.7 is removed
-from whichcraft import which
 
 class Scm(ScmBase):
 # Projects can define for themselves what constitutes a development vs a production branch,
@@ -39,6 +37,8 @@
 
 @classmethod
 def executable(cls, program):
+# TODO: Use shutil directly when Python 2.7 is removed
+from whichcraft import which
 path = which(program)
 if path is None:
 raise OSError("Cannot find '{}' program".format(program))


Modified: trunk/Tools/Scripts/libraries/webkitscmpy/webkitscmpy/mocks/local/git.py (277614 => 277615)

--- trunk/Tools/Scripts/libraries/webkitscmpy/webkitscmpy/mocks/local/git.py	2021-05-17 23:24:23 UTC (rev 277614)
+++ trunk/Tools/Scripts/libraries/webkitscmpy/webkitscmpy/mocks/local/git.py	2021-05-17 23:45:13 UTC (rev 277615)
@@ -26,6 +26,8 @@
 import time
 
 from datetime import datetime
+from mock import patch
+
 from webkitcorepy import mocks, OutputCapture, StringIO
 from webkitscmpy import local, Commit, Contributor
 from webkitscmpy.program.canonicalize.committer import main as committer_main
@@ -328,6 +330,12 @@
 ), *git_svn_routes
 )
 
+def __enter__(self):
+# TODO: Use shutil directly when Python 2.7 is removed
+from whichcraft import which
+self.patches.append(patch('whichcraft.which', 

[webkit-changes] [277533] trunk/Tools

2021-05-14 Thread jbedard
Title: [277533] trunk/Tools








Revision 277533
Author jbed...@apple.com
Date 2021-05-14 22:02:06 -0700 (Fri, 14 May 2021)


Log Message
[WebKitTestRunner] Forward WebContent termination reason
https://bugs.webkit.org/show_bug.cgi?id=225818


Reviewed by Chris Dumez.

* WebKitTestRunner/TestController.cpp:
(WTR::TestController::createOtherPage): Use didTerminate callback instead of didCrash callback.
(WTR::TestController::createWebViewWithOptions): Ditto.
(WTR::TestController::webProcessDidTerminate):
(WTR::TestController::processDidCrash): Renamed webProcessDidTerminate.
* WebKitTestRunner/TestController.h: Replace processDidCrash with webProcessDidTerminate.
* WebKitTestRunner/win/TestControllerWin.cpp:
(WTR::TestController::platformRunUntil):

Modified Paths

trunk/Tools/ChangeLog
trunk/Tools/WebKitTestRunner/TestController.cpp
trunk/Tools/WebKitTestRunner/TestController.h
trunk/Tools/WebKitTestRunner/win/TestControllerWin.cpp




Diff

Modified: trunk/Tools/ChangeLog (277532 => 277533)

--- trunk/Tools/ChangeLog	2021-05-15 04:59:10 UTC (rev 277532)
+++ trunk/Tools/ChangeLog	2021-05-15 05:02:06 UTC (rev 277533)
@@ -1,5 +1,22 @@
 2021-05-14  Jonathan Bedard  
 
+[WebKitTestRunner] Forward WebContent termination reason
+https://bugs.webkit.org/show_bug.cgi?id=225818
+
+
+Reviewed by Chris Dumez.
+
+* WebKitTestRunner/TestController.cpp:
+(WTR::TestController::createOtherPage): Use didTerminate callback instead of didCrash callback.
+(WTR::TestController::createWebViewWithOptions): Ditto.
+(WTR::TestController::webProcessDidTerminate):
+(WTR::TestController::processDidCrash): Renamed webProcessDidTerminate.
+* WebKitTestRunner/TestController.h: Replace processDidCrash with webProcessDidTerminate.
+* WebKitTestRunner/win/TestControllerWin.cpp:
+(WTR::TestController::platformRunUntil):
+
+2021-05-14  Jonathan Bedard  
+
 [run-webkit-tests] Handle missing simulator state plist
 https://bugs.webkit.org/show_bug.cgi?id=225833
 


Modified: trunk/Tools/WebKitTestRunner/TestController.cpp (277532 => 277533)

--- trunk/Tools/WebKitTestRunner/TestController.cpp	2021-05-15 04:59:10 UTC (rev 277532)
+++ trunk/Tools/WebKitTestRunner/TestController.cpp	2021-05-15 05:02:06 UTC (rev 277533)
@@ -468,13 +468,13 @@
 nullptr, // renderingProgressDidChange
 canAuthenticateAgainstProtectionSpace,
 didReceiveAuthenticationChallenge,
-processDidCrash,
+nullptr, // webProcessDidCrash
 copyWebCryptoMasterKey,
 didBeginNavigationGesture,
 willEndNavigationGesture,
 didEndNavigationGesture,
 didRemoveNavigationGestureSnapshot,
-nullptr, // webProcessDidTerminate
+webProcessDidTerminate, // webProcessDidTerminate
 nullptr, // contentRuleListNotification
 copySignedPublicKeyAndChallengeString,
 navigationActionDidBecomeDownload,
@@ -810,13 +810,13 @@
 nullptr, // renderingProgressDidChange
 canAuthenticateAgainstProtectionSpace,
 didReceiveAuthenticationChallenge,
-processDidCrash,
+nullptr,
 copyWebCryptoMasterKey,
 didBeginNavigationGesture,
 willEndNavigationGesture,
 didEndNavigationGesture,
 didRemoveNavigationGestureSnapshot,
-nullptr, // webProcessDidTerminate
+webProcessDidTerminate, // webProcessDidTerminate
 nullptr, // contentRuleListNotification
 copySignedPublicKeyAndChallengeString,
 navigationActionDidBecomeDownload,
@@ -1862,9 +1862,9 @@
 static_cast(const_cast(clientInfo))->didReceiveAuthenticationChallenge(page, /*frame,*/ authenticationChallenge);
 }
 
-void TestController::processDidCrash(WKPageRef page, const void* clientInfo)
+void TestController::webProcessDidTerminate(WKPageRef page, WKProcessTerminationReason reason, const void* clientInfo)
 {
-static_cast(const_cast(clientInfo))->processDidCrash();
+static_cast(const_cast(clientInfo))->webProcessDidTerminate(reason);
 }
 
 void TestController::didBeginNavigationGesture(WKPageRef page, const void *clientInfo)
@@ -2154,12 +2154,35 @@
 static_cast(const_cast(clientInfo))->didReceiveAuthenticationChallenge(nullptr, authenticationChallenge);
 }
 
-void TestController::processDidCrash()
+void TestController::webProcessDidTerminate(WKProcessTerminationReason reason)
 {
 // This function can be called multiple times when crash logs are being saved on Windows, so
 // ensure we only print the crashed message once.
 if (!m_didPrintWebProcessCrashedMessage) {
 pid_t pid = WKPageGetProcessIdentifier(m_mainWebView->page());
+fprintf(stderr, "%s terminated (pid %ld) ", webProcessName(), static_cast(pid));
+switch (reason) {
+case kWKProcessTerminationReasonExceededMemoryLimit:
+fprintf(stderr, "because the memory limit was exceeded\n");
+

[webkit-changes] [277531] trunk/Tools

2021-05-14 Thread jbedard
Title: [277531] trunk/Tools








Revision 277531
Author jbed...@apple.com
Date 2021-05-14 21:58:16 -0700 (Fri, 14 May 2021)


Log Message
[run-webkit-tests] Handle missing simulator state plist
https://bugs.webkit.org/show_bug.cgi?id=225833


Rubber-stamped by Aakash Jain.

* Scripts/webkitpy/xcode/simulated_device.py:
(SimulatedDevice.state): If no device plist is found, assume the device is shut down.
* Scripts/webkitpy/xcode/simulated_device_unittest.py:

Modified Paths

trunk/Tools/ChangeLog
trunk/Tools/Scripts/webkitpy/xcode/simulated_device.py
trunk/Tools/Scripts/webkitpy/xcode/simulated_device_unittest.py




Diff

Modified: trunk/Tools/ChangeLog (277530 => 277531)

--- trunk/Tools/ChangeLog	2021-05-15 04:18:38 UTC (rev 277530)
+++ trunk/Tools/ChangeLog	2021-05-15 04:58:16 UTC (rev 277531)
@@ -1,5 +1,17 @@
 2021-05-14  Jonathan Bedard  
 
+[run-webkit-tests] Handle missing simulator state plist
+https://bugs.webkit.org/show_bug.cgi?id=225833
+
+
+Rubber-stamped by Aakash Jain.
+
+* Scripts/webkitpy/xcode/simulated_device.py:
+(SimulatedDevice.state): If no device plist is found, assume the device is shut down.
+* Scripts/webkitpy/xcode/simulated_device_unittest.py:
+
+2021-05-14  Jonathan Bedard  
+
 Fix iOS 14.5 embedded build
 https://bugs.webkit.org/show_bug.cgi?id=225835
 


Modified: trunk/Tools/Scripts/webkitpy/xcode/simulated_device.py (277530 => 277531)

--- trunk/Tools/Scripts/webkitpy/xcode/simulated_device.py	2021-05-15 04:18:38 UTC (rev 277530)
+++ trunk/Tools/Scripts/webkitpy/xcode/simulated_device.py	2021-05-15 04:58:16 UTC (rev 277531)
@@ -561,7 +561,11 @@
 return self._state
 
 device_plist = self.filesystem.expanduser(self.filesystem.join(SimulatedDeviceManager.simulator_device_path, self.udid, 'device.plist'))
-self._state = int(readPlist(self.filesystem.open_binary_file_for_reading(device_plist))['state'])
+try:
+self._state = int(readPlist(self.filesystem.open_binary_file_for_reading(device_plist))['state'])
+except IOError:
+self._state = SimulatedDevice.DeviceState.SHUTTING_DOWN
+
 self._last_updated_state = time.time()
 return self._state
 


Modified: trunk/Tools/Scripts/webkitpy/xcode/simulated_device_unittest.py (277530 => 277531)

--- trunk/Tools/Scripts/webkitpy/xcode/simulated_device_unittest.py	2021-05-15 04:18:38 UTC (rev 277530)
+++ trunk/Tools/Scripts/webkitpy/xcode/simulated_device_unittest.py	2021-05-15 04:58:16 UTC (rev 277531)
@@ -678,3 +678,12 @@
 SimulatedDeviceTest.change_state_to(SimulatedDeviceManager.INITIALIZED_DEVICES[0], SimulatedDevice.DeviceState.SHUT_DOWN)
 SimulatedDeviceManager.tear_down(host)
 self.assertIsNone(SimulatedDeviceManager.INITIALIZED_DEVICES)
+
+def test_no_state_files(self):
+SimulatedDeviceTest.reset_simulated_device_manager()
+host = SimulatedDeviceTest.mock_host_for_simctl()
+host.filesystem = MockFileSystem()
+devices = SimulatedDeviceManager.available_devices(host)
+
+for device in devices:
+self.assertEquals(SimulatedDevice.DeviceState.SHUT_DOWN, device.state(force_update=True))






___
webkit-changes mailing list
webkit-changes@lists.webkit.org
https://lists.webkit.org/mailman/listinfo/webkit-changes


[webkit-changes] [277526] trunk

2021-05-14 Thread jbedard
Title: [277526] trunk








Revision 277526
Author jbed...@apple.com
Date 2021-05-14 18:50:00 -0700 (Fri, 14 May 2021)


Log Message
Fix iOS 14.5 embedded build
https://bugs.webkit.org/show_bug.cgi?id=225835


Reviewed by Dewei Zhu.

Source/WebKit:

No new tests, build fix.

* WebProcess/cocoa/WebProcessCocoa.mm: Import mach.h.

Tools:

* Scripts/configure-xcode-for-embedded-development: Add mach.h, mach_error.h and task.h.

Modified Paths

trunk/Source/WebKit/ChangeLog
trunk/Source/WebKit/WebProcess/cocoa/WebProcessCocoa.mm
trunk/Tools/ChangeLog
trunk/Tools/Scripts/configure-xcode-for-embedded-development




Diff

Modified: trunk/Source/WebKit/ChangeLog (277525 => 277526)

--- trunk/Source/WebKit/ChangeLog	2021-05-15 00:59:56 UTC (rev 277525)
+++ trunk/Source/WebKit/ChangeLog	2021-05-15 01:50:00 UTC (rev 277526)
@@ -1,3 +1,15 @@
+2021-05-14  Jonathan Bedard  
+
+Fix iOS 14.5 embedded build
+https://bugs.webkit.org/show_bug.cgi?id=225835
+
+
+Reviewed by Dewei Zhu.
+
+No new tests, build fix.
+
+* WebProcess/cocoa/WebProcessCocoa.mm: Import mach.h.
+
 2021-05-14  Sam Weinig  
 
 Use PixelBufferFormat to specify ImageBuffer::getPixelBuffer destination format allowing for more control over data conversion


Modified: trunk/Source/WebKit/WebProcess/cocoa/WebProcessCocoa.mm (277525 => 277526)

--- trunk/Source/WebKit/WebProcess/cocoa/WebProcessCocoa.mm	2021-05-15 00:59:56 UTC (rev 277525)
+++ trunk/Source/WebKit/WebProcess/cocoa/WebProcessCocoa.mm	2021-05-15 01:50:00 UTC (rev 277526)
@@ -80,6 +80,7 @@
 #import 
 #import 
 #import 
+#import 
 #import 
 #import 
 #import 


Modified: trunk/Tools/ChangeLog (277525 => 277526)

--- trunk/Tools/ChangeLog	2021-05-15 00:59:56 UTC (rev 277525)
+++ trunk/Tools/ChangeLog	2021-05-15 01:50:00 UTC (rev 277526)
@@ -1,3 +1,13 @@
+2021-05-14  Jonathan Bedard  
+
+Fix iOS 14.5 embedded build
+https://bugs.webkit.org/show_bug.cgi?id=225835
+
+
+Reviewed by Dewei Zhu.
+
+* Scripts/configure-xcode-for-embedded-development: Add mach.h, mach_error.h and task.h.
+
 2021-05-14  Devin Rousso  
 
 Sampled Page Top Color: move logic out of `Document`


Modified: trunk/Tools/Scripts/configure-xcode-for-embedded-development (277525 => 277526)

--- trunk/Tools/Scripts/configure-xcode-for-embedded-development	2021-05-15 00:59:56 UTC (rev 277525)
+++ trunk/Tools/Scripts/configure-xcode-for-embedded-development	2021-05-15 01:50:00 UTC (rev 277526)
@@ -40,9 +40,12 @@
 
 MISSING_HEADERS = [
 "usr/include/libxslt",
+"usr/include/mach/mach.h",
+"usr/include/mach/mach_error.h",
 "usr/include/mach/mach_types.defs",
 "usr/include/mach/machine/machine_types.defs",
 "usr/include/mach/std_types.defs",
+"usr/include/mach/task.h",
 "usr/include/objc/Protocol.h",
 "usr/include/objc/objc-class.h",
 "usr/include/objc/objc-runtime.h",






___
webkit-changes mailing list
webkit-changes@lists.webkit.org
https://lists.webkit.org/mailman/listinfo/webkit-changes


[webkit-changes] [277496] trunk/Tools

2021-05-14 Thread jbedard
Title: [277496] trunk/Tools








Revision 277496
Author jbed...@apple.com
Date 2021-05-14 10:15:47 -0700 (Fri, 14 May 2021)


Log Message
[run-api-tests] Use Python 3 (Part 2)
https://bugs.webkit.org/show_bug.cgi?id=225427


Reviewed by Aakash Jain.

* Scripts/run-api-tests: Change she-bang to Python 3.

Modified Paths

trunk/Tools/ChangeLog
trunk/Tools/Scripts/run-api-tests




Diff

Modified: trunk/Tools/ChangeLog (277495 => 277496)

--- trunk/Tools/ChangeLog	2021-05-14 17:15:35 UTC (rev 277495)
+++ trunk/Tools/ChangeLog	2021-05-14 17:15:47 UTC (rev 277496)
@@ -1,3 +1,13 @@
+2021-05-14  Jonathan Bedard  
+
+[run-api-tests] Use Python 3 (Part 2)
+https://bugs.webkit.org/show_bug.cgi?id=225427
+
+
+Reviewed by Aakash Jain.
+
+* Scripts/run-api-tests: Change she-bang to Python 3.
+
 2021-05-14  Chris Dumez  
 
 Rename FileSystem::getFileSize() to FileSystem::fileSize()


Modified: trunk/Tools/Scripts/run-api-tests (277495 => 277496)

--- trunk/Tools/Scripts/run-api-tests	2021-05-14 17:15:35 UTC (rev 277495)
+++ trunk/Tools/Scripts/run-api-tests	2021-05-14 17:15:47 UTC (rev 277496)
@@ -1,4 +1,4 @@
-#!/usr/bin/env python
+#!/usr/bin/env python3
 
 # Copyright (C) 2018-2021 Apple Inc. All rights reserved.
 #






___
webkit-changes mailing list
webkit-changes@lists.webkit.org
https://lists.webkit.org/mailman/listinfo/webkit-changes


[webkit-changes] [277490] trunk/Tools

2021-05-14 Thread jbedard
Title: [277490] trunk/Tools








Revision 277490
Author jbed...@apple.com
Date 2021-05-14 08:54:10 -0700 (Fri, 14 May 2021)


Log Message
[webkitpy] Remove unused imports
https://bugs.webkit.org/show_bug.cgi?id=225776


Reviewed by Dewei Zhu.

* Scripts/webkitpy/benchmark_runner/benchmark_json_merge.py:
* Scripts/webkitpy/benchmark_runner/http_server_driver/simple_http_server_driver.py:
* Scripts/webkitpy/browserperfdash/browserperfdash_runner.py:
* Scripts/webkitpy/common/config/ports.py:
* Scripts/webkitpy/common/net/bugzilla/bugzilla_mock.py:
* Scripts/webkitpy/common/net/layouttestresults_unittest.py:
* Scripts/webkitpy/common/net/networktransaction_unittest.py:
* Scripts/webkitpy/common/system/zipfileset_unittest.py:
* Scripts/webkitpy/common/test_expectations_unittest.py:
* Scripts/webkitpy/inspector/main.py:
* Scripts/webkitpy/layout_tests/controllers/layout_test_finder.py:
* Scripts/webkitpy/layout_tests/controllers/layout_test_runner.py:
* Scripts/webkitpy/layout_tests/controllers/manager.py:
* Scripts/webkitpy/layout_tests/layout_package/json_layout_results_generator.py:
* Scripts/webkitpy/layout_tests/layout_package/json_results_generator.py:
* Scripts/webkitpy/layout_tests/models/test_expectations.py:
* Scripts/webkitpy/layout_tests/models/test_run_results.py:
* Scripts/webkitpy/layout_tests/servers/websocket_server.py:
* Scripts/webkitpy/layout_tests/views/printing.py:
* Scripts/webkitpy/minibrowser/run_webkit_app.py:
* Scripts/webkitpy/performance_tests/perftest.py:
* Scripts/webkitpy/port/base.py:
* Scripts/webkitpy/port/builders.py:
* Scripts/webkitpy/port/config_unittest.py:
* Scripts/webkitpy/results/upload_unittest.py:
* Scripts/webkitpy/style/checkers/test_expectations.py:
* Scripts/webkitpy/style/checkers/test_expectations_unittest.py:
* Scripts/webkitpy/style/checkers/text_unittest.py:
* Scripts/webkitpy/style/filereader_unittest.py:
* Scripts/webkitpy/style/optparser.py:
* Scripts/webkitpy/test/printer.py:
* Scripts/webkitpy/tool/bot/flakytestreporter_unittest.py:
* Scripts/webkitpy/tool/bot/retrylogic_unittest.py:
* Scripts/webkitpy/tool/commands/queuestest.py:
* Scripts/webkitpy/tool/commands/rebaselineserver.py:
* Scripts/webkitpy/tool/commands/setupgitclone.py:
* Scripts/webkitpy/tool/commands/suggestnominations.py:
* Scripts/webkitpy/tool/commands/upload.py:
* Scripts/webkitpy/tool/main.py:
* Scripts/webkitpy/tool/mocktool.py:
* Scripts/webkitpy/tool/multicommandtool_unittest.py:
* Scripts/webkitpy/tool/servers/gardeningserver.py:
* Scripts/webkitpy/tool/servers/gardeningserver_unittest.py:
* Scripts/webkitpy/tool/servers/reflectionhandler.py:
* Scripts/webkitpy/tool/steps/updatechangelogswithreviewer.py:
* Scripts/webkitpy/tool/steps/wptchangeexport.py:
* Scripts/webkitpy/w3c/wpt_runner.py:
* Scripts/webkitpy/webdriver_tests/pytest_runner.py:
* Scripts/webkitpy/webdriver_tests/webdriver_selenium_executor.py:
* Scripts/webkitpy/webdriver_tests/webdriver_test_result.py:
* Scripts/webkitpy/webdriver_tests/webdriver_test_runner_selenium.py:
* Scripts/webkitpy/webdriver_tests/webdriver_test_runner_w3c.py:

Modified Paths

trunk/Tools/ChangeLog
trunk/Tools/Scripts/webkitpy/benchmark_runner/benchmark_json_merge.py
trunk/Tools/Scripts/webkitpy/benchmark_runner/http_server_driver/simple_http_server_driver.py
trunk/Tools/Scripts/webkitpy/browserperfdash/browserperfdash_runner.py
trunk/Tools/Scripts/webkitpy/common/config/ports.py
trunk/Tools/Scripts/webkitpy/common/net/bugzilla/bugzilla_mock.py
trunk/Tools/Scripts/webkitpy/common/net/layouttestresults_unittest.py
trunk/Tools/Scripts/webkitpy/common/net/networktransaction_unittest.py
trunk/Tools/Scripts/webkitpy/common/system/zipfileset_unittest.py
trunk/Tools/Scripts/webkitpy/common/test_expectations_unittest.py
trunk/Tools/Scripts/webkitpy/inspector/main.py
trunk/Tools/Scripts/webkitpy/layout_tests/controllers/layout_test_finder.py
trunk/Tools/Scripts/webkitpy/layout_tests/controllers/layout_test_runner.py
trunk/Tools/Scripts/webkitpy/layout_tests/controllers/manager.py
trunk/Tools/Scripts/webkitpy/layout_tests/layout_package/json_layout_results_generator.py
trunk/Tools/Scripts/webkitpy/layout_tests/layout_package/json_results_generator.py
trunk/Tools/Scripts/webkitpy/layout_tests/models/test_expectations.py
trunk/Tools/Scripts/webkitpy/layout_tests/models/test_run_results.py
trunk/Tools/Scripts/webkitpy/layout_tests/servers/websocket_server.py
trunk/Tools/Scripts/webkitpy/layout_tests/views/printing.py
trunk/Tools/Scripts/webkitpy/minibrowser/run_webkit_app.py
trunk/Tools/Scripts/webkitpy/performance_tests/perftest.py
trunk/Tools/Scripts/webkitpy/port/base.py
trunk/Tools/Scripts/webkitpy/port/builders.py
trunk/Tools/Scripts/webkitpy/port/config_unittest.py
trunk/Tools/Scripts/webkitpy/results/upload_unittest.py
trunk/Tools/Scripts/webkitpy/style/checkers/test_expectations.py
trunk/Tools/Scripts/webkitpy/style/checkers/test_expectations_unittest.py
trunk/Tools/Scripts/webkitpy/style/checkers/text_unittest.py

[webkit-changes] [277489] trunk/Tools

2021-05-14 Thread jbedard
Title: [277489] trunk/Tools








Revision 277489
Author jbed...@apple.com
Date 2021-05-14 08:51:07 -0700 (Fri, 14 May 2021)


Log Message
test-lldb-webkit failing with import of lldb
https://bugs.webkit.org/show_bug.cgi?id=225792


Reviewed by Dewei Zhu.

* CISupport/build-webkit-org/steps.py:
(RunLLDBWebKitTests): Invoke test-lldb-webkit with Python 3.
* CISupport/build-webkit-org/steps_unittest.py:
* Scripts/test-lldb-webkit: Change shebang to Python 3.

Modified Paths

trunk/Tools/CISupport/build-webkit-org/steps.py
trunk/Tools/CISupport/build-webkit-org/steps_unittest.py
trunk/Tools/ChangeLog
trunk/Tools/Scripts/test-lldb-webkit




Diff

Modified: trunk/Tools/CISupport/build-webkit-org/steps.py (277488 => 277489)

--- trunk/Tools/CISupport/build-webkit-org/steps.py	2021-05-14 14:36:00 UTC (rev 277488)
+++ trunk/Tools/CISupport/build-webkit-org/steps.py	2021-05-14 15:51:07 UTC (rev 277489)
@@ -737,7 +737,7 @@
 description = ["lldb-webkit-tests running"]
 descriptionDone = ["lldb-webkit-tests"]
 command = [
-"python",
+"python3",
 "./Tools/Scripts/test-lldb-webkit",
 "--verbose",
 "--no-build",


Modified: trunk/Tools/CISupport/build-webkit-org/steps_unittest.py (277488 => 277489)

--- trunk/Tools/CISupport/build-webkit-org/steps_unittest.py	2021-05-14 14:36:00 UTC (rev 277488)
+++ trunk/Tools/CISupport/build-webkit-org/steps_unittest.py	2021-05-14 15:51:07 UTC (rev 277489)
@@ -702,7 +702,7 @@
 workdir='wkdir',
 timeout=1200,
 logEnviron=True,
-command=['python', './Tools/Scripts/test-lldb-webkit', '--verbose', '--no-build', '--release'],
+command=['python3', './Tools/Scripts/test-lldb-webkit', '--verbose', '--no-build', '--release'],
 ) + 0,
 )
 self.expectOutcome(result=SUCCESS, state_string='lldb-webkit-test')
@@ -716,7 +716,7 @@
 workdir='wkdir',
 timeout=1200,
 logEnviron=True,
-command=['python', './Tools/Scripts/test-lldb-webkit', '--verbose', '--no-build', '--release'],
+command=['python3', './Tools/Scripts/test-lldb-webkit', '--verbose', '--no-build', '--release'],
 ) + 2,
 )
 self.expectOutcome(result=FAILURE, state_string='lldb-webkit-test (failure)')
@@ -730,7 +730,7 @@
 workdir='wkdir',
 timeout=1200,
 logEnviron=True,
-command=['python', './Tools/Scripts/test-lldb-webkit', '--verbose', '--no-build', '--release'],
+command=['python3', './Tools/Scripts/test-lldb-webkit', '--verbose', '--no-build', '--release'],
 ) + 2
 + ExpectShell.log('stdio', stdout='FAILED (failures=2, errors=0)'),
 )
@@ -745,7 +745,7 @@
 workdir='wkdir',
 timeout=1200,
 logEnviron=True,
-command=['python', './Tools/Scripts/test-lldb-webkit', '--verbose', '--no-build', '--release'],
+command=['python3', './Tools/Scripts/test-lldb-webkit', '--verbose', '--no-build', '--release'],
 ) + 2
 + ExpectShell.log('stdio', stdout='FAILED (failures=0, errors=2)'),
 )
@@ -760,7 +760,7 @@
 workdir='wkdir',
 timeout=1200,
 logEnviron=True,
-command=['python', './Tools/Scripts/test-lldb-webkit', '--verbose', '--no-build', '--release'],
+command=['python3', './Tools/Scripts/test-lldb-webkit', '--verbose', '--no-build', '--release'],
 ) + 2
 + ExpectShell.log('stdio', stdout='FAILED (failures=30, errors=2)'),
 )


Modified: trunk/Tools/ChangeLog (277488 => 277489)

--- trunk/Tools/ChangeLog	2021-05-14 14:36:00 UTC (rev 277488)
+++ trunk/Tools/ChangeLog	2021-05-14 15:51:07 UTC (rev 277489)
@@ -1,3 +1,16 @@
+2021-05-14  Jonathan Bedard  
+
+test-lldb-webkit failing with import of lldb
+https://bugs.webkit.org/show_bug.cgi?id=225792
+
+
+Reviewed by Dewei Zhu.
+
+* CISupport/build-webkit-org/steps.py:
+(RunLLDBWebKitTests): Invoke test-lldb-webkit with Python 3.
+* CISupport/build-webkit-org/steps_unittest.py:
+* Scripts/test-lldb-webkit: Change shebang to Python 3.
+
 2021-05-14  Carlos Garcia Campos  
 
 Unreviewed. [GTK] Fix make distcheck


Modified: trunk/Tools/Scripts/test-lldb-webkit (277488 => 277489)

--- trunk/Tools/Scripts/test-lldb-webkit	2021-05-14 14:36:00 UTC (rev 277488)
+++ trunk/Tools/Scripts/test-lldb-webkit	2021-05-14 15:51:07 UTC (rev 277489)
@@ -1,4 +1,4 @@
-#!/usr/bin/env python
+#!/usr/bin/env python3
 # Copyright (c) 2019 Apple Inc. All rights reserved.
 #
 # Redistribution and use in source and binary forms, with or without






___
webkit-changes mailing list
webkit-changes@lists.webkit.org

[webkit-changes] [277444] trunk/Tools

2021-05-13 Thread jbedard
Title: [277444] trunk/Tools








Revision 277444
Author jbed...@apple.com
Date 2021-05-13 12:23:58 -0700 (Thu, 13 May 2021)


Log Message
[run-api-tests] Use Python 3 (Part 1)
https://bugs.webkit.org/show_bug.cgi?id=225427


Reviewed by Aakash Jain.

* CISupport/build-webkit-org/steps.py:
(RunAPITests): Use Python3 to invoke run-api-tests.
* CISupport/ews-build/steps.py:
(RunAPITests): Use Python3 to invoke run-api-tests.
* CISupport/ews-build/steps_unittest.py:

Modified Paths

trunk/Tools/CISupport/build-webkit-org/steps.py
trunk/Tools/CISupport/ews-build/steps.py
trunk/Tools/CISupport/ews-build/steps_unittest.py
trunk/Tools/ChangeLog




Diff

Modified: trunk/Tools/CISupport/build-webkit-org/steps.py (277443 => 277444)

--- trunk/Tools/CISupport/build-webkit-org/steps.py	2021-05-13 18:48:32 UTC (rev 277443)
+++ trunk/Tools/CISupport/build-webkit-org/steps.py	2021-05-13 19:23:58 UTC (rev 277444)
@@ -644,7 +644,7 @@
 jsonFileName = "api_test_results.json"
 logfiles = {"json": jsonFileName}
 command = [
-"python",
+"python3",
 "./Tools/Scripts/run-api-tests",
 "--no-build",
 "--json-output={0}".format(jsonFileName),


Modified: trunk/Tools/CISupport/ews-build/steps.py (277443 => 277444)

--- trunk/Tools/CISupport/ews-build/steps.py	2021-05-13 18:48:32 UTC (rev 277443)
+++ trunk/Tools/CISupport/ews-build/steps.py	2021-05-13 19:23:58 UTC (rev 277444)
@@ -2765,7 +2765,7 @@
 descriptionDone = ['api-tests']
 jsonFileName = 'api_test_results.json'
 logfiles = {'json': jsonFileName}
-command = ['python', 'Tools/Scripts/run-api-tests', '--no-build',
+command = ['python3', 'Tools/Scripts/run-api-tests', '--no-build',
WithProperties('--%(configuration)s'), '--verbose', '--json-output={0}'.format(jsonFileName)]
 failedTestsFormatString = '%d api test%s failed or timed out'
 


Modified: trunk/Tools/CISupport/ews-build/steps_unittest.py (277443 => 277444)

--- trunk/Tools/CISupport/ews-build/steps_unittest.py	2021-05-13 18:48:32 UTC (rev 277443)
+++ trunk/Tools/CISupport/ews-build/steps_unittest.py	2021-05-13 19:23:58 UTC (rev 277444)
@@ -3181,7 +3181,7 @@
 self.expectRemoteCommands(
 ExpectShell(workdir='wkdir',
 logEnviron=False,
-command=['python', 'Tools/Scripts/run-api-tests', '--no-build', '--release', '--verbose', '--json-output={0}'.format(self.jsonFileName)],
+command=['python3', 'Tools/Scripts/run-api-tests', '--no-build', '--release', '--verbose', '--json-output={0}'.format(self.jsonFileName)],
 logfiles={'json': self.jsonFileName},
 )
 + ExpectShell.log('stdio', stdout='''...
@@ -3209,7 +3209,7 @@
 self.expectRemoteCommands(
 ExpectShell(workdir='wkdir',
 logEnviron=False,
-command=['python', 'Tools/Scripts/run-api-tests', '--no-build', '--debug', '--verbose', '--json-output={0}'.format(self.jsonFileName), '--ios-simulator'],
+command=['python3', 'Tools/Scripts/run-api-tests', '--no-build', '--debug', '--verbose', '--json-output={0}'.format(self.jsonFileName), '--ios-simulator'],
 logfiles={'json': self.jsonFileName},
 )
 + ExpectShell.log('stdio', stdout='''...
@@ -3270,7 +3270,7 @@
 self.expectRemoteCommands(
 ExpectShell(workdir='wkdir',
 logEnviron=False,
-command=['python', 'Tools/Scripts/run-api-tests', '--no-build', '--debug', '--verbose', '--json-output={0}'.format(self.jsonFileName)],
+command=['python3', 'Tools/Scripts/run-api-tests', '--no-build', '--debug', '--verbose', '--json-output={0}'.format(self.jsonFileName)],
 logfiles={'json': self.jsonFileName},
 )
 + ExpectShell.log('stdio', stdout='''
@@ -3312,7 +3312,7 @@
 self.expectRemoteCommands(
 ExpectShell(workdir='wkdir',
 logEnviron=False,
-command=['python', 'Tools/Scripts/run-api-tests', '--no-build', '--debug', '--verbose', '--json-output={0}'.format(self.jsonFileName)],
+command=['python3', 'Tools/Scripts/run-api-tests', '--no-build', '--debug', '--verbose', '--json-output={0}'.format(self.jsonFileName)],
 logfiles={'json': self.jsonFileName},
 )
 + ExpectShell.log('stdio', stdout='''...
@@ -3368,7 +3368,7 @@
 self.expectRemoteCommands(
 ExpectShell(workdir='wkdir',
 logEnviron=False,
-command=['python', 'Tools/Scripts/run-api-tests', '--no-build', '--debug', '--verbose', '--json-output={0}'.format(self.jsonFileName)],
+command=['python3', 

[webkit-changes] [277440] trunk/Tools

2021-05-13 Thread jbedard
Title: [277440] trunk/Tools








Revision 277440
Author jbed...@apple.com
Date 2021-05-13 10:36:04 -0700 (Thu, 13 May 2021)


Log Message
Few webkitpy unit-tests fails in non-PST timezones
https://bugs.webkit.org/show_bug.cgi?id=225741

Reviewed by Aakash Jain.

* Scripts/libraries/webkitscmpy/setup.py: Bump version.
* Scripts/libraries/webkitscmpy/webkitscmpy/__init__.py:
* Scripts/libraries/webkitscmpy/webkitscmpy/mocks/remote/svn.py: Ditto.
(Svn.request): Serve SVN content from California time (like our SVN server)

Modified Paths

trunk/Tools/ChangeLog
trunk/Tools/Scripts/libraries/webkitscmpy/setup.py
trunk/Tools/Scripts/libraries/webkitscmpy/webkitscmpy/__init__.py
trunk/Tools/Scripts/libraries/webkitscmpy/webkitscmpy/mocks/remote/svn.py




Diff

Modified: trunk/Tools/ChangeLog (277439 => 277440)

--- trunk/Tools/ChangeLog	2021-05-13 17:35:23 UTC (rev 277439)
+++ trunk/Tools/ChangeLog	2021-05-13 17:36:04 UTC (rev 277440)
@@ -1,3 +1,15 @@
+2021-05-13  Jonathan Bedard  
+
+Few webkitpy unit-tests fails in non-PST timezones
+https://bugs.webkit.org/show_bug.cgi?id=225741
+
+Reviewed by Aakash Jain.
+
+* Scripts/libraries/webkitscmpy/setup.py: Bump version.
+* Scripts/libraries/webkitscmpy/webkitscmpy/__init__.py:
+* Scripts/libraries/webkitscmpy/webkitscmpy/mocks/remote/svn.py: Ditto.
+(Svn.request): Serve SVN content from California time (like our SVN server)
+
 2021-05-13  Darin Adler  
 
 Remove StringBuilder::appendNumber


Modified: trunk/Tools/Scripts/libraries/webkitscmpy/setup.py (277439 => 277440)

--- trunk/Tools/Scripts/libraries/webkitscmpy/setup.py	2021-05-13 17:35:23 UTC (rev 277439)
+++ trunk/Tools/Scripts/libraries/webkitscmpy/setup.py	2021-05-13 17:36:04 UTC (rev 277440)
@@ -29,7 +29,7 @@
 
 setup(
 name='webkitscmpy',
-version='0.14.0',
+version='0.14.1',
 description='Library designed to interact with git and svn repositories.',
 long_description=readme(),
 classifiers=[


Modified: trunk/Tools/Scripts/libraries/webkitscmpy/webkitscmpy/__init__.py (277439 => 277440)

--- trunk/Tools/Scripts/libraries/webkitscmpy/webkitscmpy/__init__.py	2021-05-13 17:35:23 UTC (rev 277439)
+++ trunk/Tools/Scripts/libraries/webkitscmpy/webkitscmpy/__init__.py	2021-05-13 17:36:04 UTC (rev 277440)
@@ -46,7 +46,7 @@
 "Please install webkitcorepy with `pip install webkitcorepy --extra-index-url `"
 )
 
-version = Version(0, 14, 0)
+version = Version(0, 14, 1)
 
 AutoInstall.register(Package('fasteners', Version(0, 15, 0)))
 AutoInstall.register(Package('monotonic', Version(1, 5)))


Modified: trunk/Tools/Scripts/libraries/webkitscmpy/webkitscmpy/mocks/remote/svn.py (277439 => 277440)

--- trunk/Tools/Scripts/libraries/webkitscmpy/webkitscmpy/mocks/remote/svn.py	2021-05-13 17:35:23 UTC (rev 277439)
+++ trunk/Tools/Scripts/libraries/webkitscmpy/webkitscmpy/mocks/remote/svn.py	2021-05-13 17:36:04 UTC (rev 277440)
@@ -278,7 +278,7 @@
 '{}\n'
 '{}{}\n'.format(
 commit.revision,
-datetime.fromtimestamp(commit.timestamp).strftime('%Y-%m-%dT%H:%M:%S.103754Z'),
+datetime.utcfromtimestamp(commit.timestamp - timedelta(hours=7).seconds).strftime('%Y-%m-%dT%H:%M:%S.103754Z'),
 '' if data['S:log-report'].get('S:revpro') else '{}\n'
 '{}\n'.format(
 commit.message,






___
webkit-changes mailing list
webkit-changes@lists.webkit.org
https://lists.webkit.org/mailman/listinfo/webkit-changes


[webkit-changes] [277387] trunk/Tools

2021-05-12 Thread jbedard
Title: [277387] trunk/Tools








Revision 277387
Author jbed...@apple.com
Date 2021-05-12 13:40:51 -0700 (Wed, 12 May 2021)


Log Message
[TestWebKitAPI] Explicitly exit after completing tests
https://bugs.webkit.org/show_bug.cgi?id=225703


Reviewed by Alexey Proskuryakov.

* TestWebKitAPI/ios/mainIOS.mm:
(main): Explicitly exit the testing process.

Modified Paths

trunk/Tools/ChangeLog
trunk/Tools/TestWebKitAPI/ios/mainIOS.mm




Diff

Modified: trunk/Tools/ChangeLog (277386 => 277387)

--- trunk/Tools/ChangeLog	2021-05-12 20:40:15 UTC (rev 277386)
+++ trunk/Tools/ChangeLog	2021-05-12 20:40:51 UTC (rev 277387)
@@ -1,3 +1,14 @@
+2021-05-12  Jonathan Bedard  
+
+[TestWebKitAPI] Explicitly exit after completing tests
+https://bugs.webkit.org/show_bug.cgi?id=225703
+
+
+Reviewed by Alexey Proskuryakov.
+
+* TestWebKitAPI/ios/mainIOS.mm:
+(main): Explicitly exit the testing process.
+
 2021-05-12  Chris Dumez  
 
 Queue notification permission requests for the same origin on WebKit side


Modified: trunk/Tools/TestWebKitAPI/ios/mainIOS.mm (277386 => 277387)

--- trunk/Tools/TestWebKitAPI/ios/mainIOS.mm	2021-05-12 20:40:15 UTC (rev 277386)
+++ trunk/Tools/TestWebKitAPI/ios/mainIOS.mm	2021-05-12 20:40:51 UTC (rev 277387)
@@ -53,5 +53,6 @@
 passed = TestWebKitAPI::TestsController::singleton().run(argc, argv);
 }
 
-return passed ? EXIT_SUCCESS : EXIT_FAILURE;
+// FIXME: Work-around for 
+exit(passed ? EXIT_SUCCESS : EXIT_FAILURE);
 }






___
webkit-changes mailing list
webkit-changes@lists.webkit.org
https://lists.webkit.org/mailman/listinfo/webkit-changes


[webkit-changes] [277115] trunk/Tools

2021-05-06 Thread jbedard
Title: [277115] trunk/Tools








Revision 277115
Author jbed...@apple.com
Date 2021-05-06 13:42:42 -0700 (Thu, 06 May 2021)


Log Message
[webkit-patch] setup-git-clone uses master instead of main
https://bugs.webkit.org/show_bug.cgi?id=225460


Reviewed by Aakash Jain.

* Scripts/webkitpy/tool/commands/setupgitclone.py:
(SetupGitClone.execute): Pair the remote branch ref with the Svn remote.

Modified Paths

trunk/Tools/ChangeLog
trunk/Tools/Scripts/webkitpy/tool/commands/setupgitclone.py




Diff

Modified: trunk/Tools/ChangeLog (277114 => 277115)

--- trunk/Tools/ChangeLog	2021-05-06 20:40:56 UTC (rev 277114)
+++ trunk/Tools/ChangeLog	2021-05-06 20:42:42 UTC (rev 277115)
@@ -1,3 +1,14 @@
+2021-05-06  Jonathan Bedard  
+
+[webkit-patch] setup-git-clone uses master instead of main
+https://bugs.webkit.org/show_bug.cgi?id=225460
+
+
+Reviewed by Aakash Jain.
+
+* Scripts/webkitpy/tool/commands/setupgitclone.py:
+(SetupGitClone.execute): Pair the remote branch ref with the Svn remote.
+
 2021-05-06  Chris Dumez  
 
 Add API test for FileSystem::fileExists() on a broken symbolic link


Modified: trunk/Tools/Scripts/webkitpy/tool/commands/setupgitclone.py (277114 => 277115)

--- trunk/Tools/Scripts/webkitpy/tool/commands/setupgitclone.py	2021-05-06 20:40:56 UTC (rev 277114)
+++ trunk/Tools/Scripts/webkitpy/tool/commands/setupgitclone.py	2021-05-06 20:42:42 UTC (rev 277115)
@@ -46,12 +46,13 @@
 return
 
 username, email = self._get_username_and_email(tool)
+remote_branch = tool.scm().remote_branch_ref()
 
 # FIXME: We shouldn't be using a private method.
 run_git = tool.scm()._run_git
 run_git(["pull"])
 run_git(["svn", "init", "--prefix=origin/", "-T", "trunk", "https://svn.webkit.org/repository/webkit"])
-run_git(["config", "--replace", "svn-remote.svn.fetch", "trunk:refs/remotes/origin/master"])
+run_git(["config", "--replace", "svn-remote.svn.fetch", "trunk:{}".format(remote_branch)])
 run_git(["svn", "fetch"])
 
 run_git(["config", "user.name", username])






___
webkit-changes mailing list
webkit-changes@lists.webkit.org
https://lists.webkit.org/mailman/listinfo/webkit-changes


[webkit-changes] [277102] trunk/Tools

2021-05-06 Thread jbedard
Title: [277102] trunk/Tools








Revision 277102
Author jbed...@apple.com
Date 2021-05-06 11:32:40 -0700 (Thu, 06 May 2021)


Log Message
[webkitcorepy] Add API to efficiently create a sequence of commits
https://bugs.webkit.org/show_bug.cgi?id=224890


Rubber-stamped by Aakash Jain.

While it is possible to simple iterate through a range of commits to define them,
every API we use to define commits has much more efficient techniques.

* Scripts/libraries/webkitscmpy/setup.py: Bump version.
* Scripts/libraries/webkitscmpy/webkitscmpy/__init__.py: Ditto.
* Scripts/libraries/webkitscmpy/webkitscmpy/contributor.py:
(Contributor): Add revision to SVN_AUTHOR_RE and add regex without lines.
(Contributor.from_scm_log): Strip leading whitespace from author.
* Scripts/libraries/webkitscmpy/webkitscmpy/local/git.py:
(Git._args_from_content):
(Git.commits): Use `git log` to efficiently compute a range of commits.
* Scripts/libraries/webkitscmpy/webkitscmpy/local/svn.py:
(Svn._args_from_content):
(Svn.commits): Use `svn log` to efficiently compute a range of commits.
* Scripts/libraries/webkitscmpy/webkitscmpy/mocks/local/git.py:
(Git.__init__): Add `git log` mock.
* Scripts/libraries/webkitscmpy/webkitscmpy/mocks/local/svn.py:
(Svn.__init__): Add `svn log` mock and more explicit `svn info` mock.
(Svn._log_range):
* Scripts/libraries/webkitscmpy/webkitscmpy/mocks/remote/git_hub.py:
(GitHub._commits_response): Return all parent commits to provided ref.
(GitHub.request):
* Scripts/libraries/webkitscmpy/webkitscmpy/mocks/remote/svn.py:
(Svn.range): More efficiently compute the range.
(Svn.request):
* Scripts/libraries/webkitscmpy/webkitscmpy/remote/git_hub.py:
(GitHub.request): Allow caller to disable pagination.
(GitHub.commit): Reduce number of requests required to compute order.
(GitHub.commits): Using the `commits` endpoint, more efficiently
compute a range of commits.
* Scripts/libraries/webkitscmpy/webkitscmpy/remote/svn.py:
(Svn): Generalize HISTORY_RE to match any single-line SVN XML response.
(Svn._cache_revisions): Replace HISTORY_RE with DATA_RE.
(Svn.commits): Use svn/rvr to efficiently compute a range of commits.
* Scripts/libraries/webkitscmpy/webkitscmpy/scm_base.py:
(ScmBase._commit_range): Return a pair of commits representing the range
the caller is requesting, and preform some basic sanity checks.
(ScmBase.commits): Declare function implemented by decedents.
* Scripts/libraries/webkitscmpy/webkitscmpy/test/find_unittest.py:
* Scripts/libraries/webkitscmpy/webkitscmpy/test/git_unittest.py:
(TestGit.test_commits):
(TestGit.test_commits_branch):
(TestGitHub.test_commits):
(TestGitHub.test_commits_branch):
* Scripts/libraries/webkitscmpy/webkitscmpy/test/svn_unittest.py:
(TestLocalSvn.test_commits):
(TestLocalSvn.test_commits_branch):
(TestRemoteSvn.test_commits):
(TestRemoteSvn.test_commits_branch):

Modified Paths

trunk/Tools/ChangeLog
trunk/Tools/Scripts/libraries/webkitscmpy/setup.py
trunk/Tools/Scripts/libraries/webkitscmpy/webkitscmpy/__init__.py
trunk/Tools/Scripts/libraries/webkitscmpy/webkitscmpy/contributor.py
trunk/Tools/Scripts/libraries/webkitscmpy/webkitscmpy/local/git.py
trunk/Tools/Scripts/libraries/webkitscmpy/webkitscmpy/local/svn.py
trunk/Tools/Scripts/libraries/webkitscmpy/webkitscmpy/mocks/local/git.py
trunk/Tools/Scripts/libraries/webkitscmpy/webkitscmpy/mocks/local/svn.py
trunk/Tools/Scripts/libraries/webkitscmpy/webkitscmpy/mocks/remote/git_hub.py
trunk/Tools/Scripts/libraries/webkitscmpy/webkitscmpy/mocks/remote/svn.py
trunk/Tools/Scripts/libraries/webkitscmpy/webkitscmpy/remote/git_hub.py
trunk/Tools/Scripts/libraries/webkitscmpy/webkitscmpy/remote/svn.py
trunk/Tools/Scripts/libraries/webkitscmpy/webkitscmpy/scm_base.py
trunk/Tools/Scripts/libraries/webkitscmpy/webkitscmpy/test/find_unittest.py
trunk/Tools/Scripts/libraries/webkitscmpy/webkitscmpy/test/git_unittest.py
trunk/Tools/Scripts/libraries/webkitscmpy/webkitscmpy/test/svn_unittest.py




Diff

Modified: trunk/Tools/ChangeLog (277101 => 277102)

--- trunk/Tools/ChangeLog	2021-05-06 17:20:55 UTC (rev 277101)
+++ trunk/Tools/ChangeLog	2021-05-06 18:32:40 UTC (rev 277102)
@@ -1,3 +1,61 @@
+2021-05-06  Jonathan Bedard  
+
+[webkitcorepy] Add API to efficiently create a sequence of commits
+https://bugs.webkit.org/show_bug.cgi?id=224890
+
+
+Rubber-stamped by Aakash Jain.
+
+While it is possible to simple iterate through a range of commits to define them,
+every API we use to define commits has much more efficient techniques.
+
+* Scripts/libraries/webkitscmpy/setup.py: Bump version.
+* Scripts/libraries/webkitscmpy/webkitscmpy/__init__.py: Ditto.
+* Scripts/libraries/webkitscmpy/webkitscmpy/contributor.py:
+(Contributor): Add revision to SVN_AUTHOR_RE and add regex without lines.
+(Contributor.from_scm_log): Strip leading whitespace from author.
+* Scripts/libraries/webkitscmpy/webkitscmpy/local/git.py:
+

[webkit-changes] [277061] trunk/Tools

2021-05-05 Thread jbedard
Title: [277061] trunk/Tools








Revision 277061
Author jbed...@apple.com
Date 2021-05-05 17:22:16 -0700 (Wed, 05 May 2021)


Log Message
[run-api-tests] Use webkitcorepy's TaskPool
https://bugs.webkit.org/show_bug.cgi?id=225221


Reviewed by Dewei Zhu.

* Scripts/libraries/webkitcorepy/setup.py: Bump version.
* Scripts/libraries/webkitcorepy/webkitcorepy/__init__.py: Ditto.
* Scripts/libraries/webkitcorepy/webkitcorepy/task_pool.py:
(TaskPool.__enter__): Ensure that mock has been imported before spawning child processes.
* Scripts/run-api-tests: Moved from webkitpy/api_tests/run_api_tests.py.
* Scripts/webkitpy/api_tests/run_api_tests.py: Moved to run-api-tests.
* Scripts/webkitpy/api_tests/runner.py:
(_Worker): Representation of Worker process.
(_Worker.setup): Pass port object to worker process.
(_Worker.teardown): Un-set port object on worker process.
(_Worker.__init__): Construct object to hold a Worker process's variables.
(_Worker._run_single_test): Log test results, post results to parent.
(_Worker.run): Run shard with and post results to parent process.
(setup_shard): Run setup in Worker process.
(run_shard): Run test shard in Worker process.
(report_result): Receive result in the parent process.
((teardown_shard): Tear down Worker process.
(Runner.__init__):
(Runner.command_for_port):
(Runner._shard_tests): Split tests into shards to be efficiently run.
(Runner.run): Use TaskPool to run tests in sub processes.
(Runner.callback): Save results in parent process.
(Runner.result_map_by_status):
(Runner.handle): Deleted.
(_Worker._run_shard_with_binary): Deleted.
(_Worker.post): Deleted.
(_Worker.handle): Deleted.

Modified Paths

trunk/Tools/ChangeLog
trunk/Tools/Scripts/libraries/webkitcorepy/setup.py
trunk/Tools/Scripts/libraries/webkitcorepy/webkitcorepy/__init__.py
trunk/Tools/Scripts/libraries/webkitcorepy/webkitcorepy/task_pool.py
trunk/Tools/Scripts/run-api-tests
trunk/Tools/Scripts/webkitpy/api_tests/runner.py


Removed Paths

trunk/Tools/Scripts/webkitpy/api_tests/run_api_tests.py




Diff

Modified: trunk/Tools/ChangeLog (277060 => 277061)

--- trunk/Tools/ChangeLog	2021-05-06 00:19:10 UTC (rev 277060)
+++ trunk/Tools/ChangeLog	2021-05-06 00:22:16 UTC (rev 277061)
@@ -1,3 +1,39 @@
+2021-05-05  Jonathan Bedard  
+
+[run-api-tests] Use webkitcorepy's TaskPool
+https://bugs.webkit.org/show_bug.cgi?id=225221
+
+
+Reviewed by Dewei Zhu.
+
+* Scripts/libraries/webkitcorepy/setup.py: Bump version.
+* Scripts/libraries/webkitcorepy/webkitcorepy/__init__.py: Ditto.
+* Scripts/libraries/webkitcorepy/webkitcorepy/task_pool.py:
+(TaskPool.__enter__): Ensure that mock has been imported before spawning child processes.
+* Scripts/run-api-tests: Moved from webkitpy/api_tests/run_api_tests.py.
+* Scripts/webkitpy/api_tests/run_api_tests.py: Moved to run-api-tests.
+* Scripts/webkitpy/api_tests/runner.py:
+(_Worker): Representation of Worker process.
+(_Worker.setup): Pass port object to worker process.
+(_Worker.teardown): Un-set port object on worker process.
+(_Worker.__init__): Construct object to hold a Worker process's variables.
+(_Worker._run_single_test): Log test results, post results to parent.
+(_Worker.run): Run shard with and post results to parent process.
+(setup_shard): Run setup in Worker process.
+(run_shard): Run test shard in Worker process.
+(report_result): Receive result in the parent process.
+((teardown_shard): Tear down Worker process.
+(Runner.__init__):
+(Runner.command_for_port):
+(Runner._shard_tests): Split tests into shards to be efficiently run.
+(Runner.run): Use TaskPool to run tests in sub processes.
+(Runner.callback): Save results in parent process.
+(Runner.result_map_by_status):
+(Runner.handle): Deleted.
+(_Worker._run_shard_with_binary): Deleted.
+(_Worker.post): Deleted.
+(_Worker.handle): Deleted.
+
 2021-05-05  Devin Rousso  
 
 Sampled Page Top Color: don't snapshot if the hit test location is an image or has an animation


Modified: trunk/Tools/Scripts/libraries/webkitcorepy/setup.py (277060 => 277061)

--- trunk/Tools/Scripts/libraries/webkitcorepy/setup.py	2021-05-06 00:19:10 UTC (rev 277060)
+++ trunk/Tools/Scripts/libraries/webkitcorepy/setup.py	2021-05-06 00:22:16 UTC (rev 277061)
@@ -30,7 +30,7 @@
 
 setup(
 name='webkitcorepy',
-version='0.5.13',
+version='0.5.14',
 description='Library containing various Python support classes and functions.',
 long_description=readme(),
 classifiers=[


Modified: trunk/Tools/Scripts/libraries/webkitcorepy/webkitcorepy/__init__.py (277060 => 277061)

--- trunk/Tools/Scripts/libraries/webkitcorepy/webkitcorepy/__init__.py	2021-05-06 00:19:10 UTC (rev 277060)
+++ trunk/Tools/Scripts/libraries/webkitcorepy/webkitcorepy/__init__.py	2021-05-06 

[webkit-changes] [276997] trunk/Tools

2021-05-04 Thread jbedard
Title: [276997] trunk/Tools








Revision 276997
Author jbed...@apple.com
Date 2021-05-04 17:00:14 -0700 (Tue, 04 May 2021)


Log Message
[webkitscmpy] Scope classes used in TaskPool to object
https://bugs.webkit.org/show_bug.cgi?id=225361


Reviewed by Dewei Zhu.

The classes used by TaskPool must be stand-alone because they are passed between processes.
However, it makes sense that those classes are scoped to the TaskPool object since their
usage should always be associated with the TaskPool object

* Scripts/libraries/webkitcorepy/setup.py:
* Scripts/libraries/webkitcorepy/webkitcorepy/__init__.py:
* Scripts/libraries/webkitcorepy/webkitcorepy/task_pool.py:
(_Message): Renamed from Message.
(_Task): Renamed from Task.
(_Result): Renamed from Result.
(_Log): Renamed from Log.
(_Print): Renamed from Print.
(_State): Renamed from State.
(_ChildException): Renamed from ChildException.
(_BiDirectionalQueue): Renamed from BiDirectionalQueue.
(_Process): Renamed from Process.
(TaskPool):
(TaskPool.do):
(Message): Renamed to _Message..
(Task): Renamed to _Task.
(Result): Renamed to _Result.
(Log): Renamed to _Log.
(Print): Renamed to _Print.
(State): Renamed to _State.
(ChildException): Renamed to _ChildException.
(BiDirectionalQueue): Renamed to _BiDirectionalQueue.
(Process): Renamed to _Process.

Modified Paths

trunk/Tools/ChangeLog
trunk/Tools/Scripts/libraries/webkitcorepy/setup.py
trunk/Tools/Scripts/libraries/webkitcorepy/webkitcorepy/__init__.py
trunk/Tools/Scripts/libraries/webkitcorepy/webkitcorepy/task_pool.py




Diff

Modified: trunk/Tools/ChangeLog (276996 => 276997)

--- trunk/Tools/ChangeLog	2021-05-04 23:58:22 UTC (rev 276996)
+++ trunk/Tools/ChangeLog	2021-05-05 00:00:14 UTC (rev 276997)
@@ -1,3 +1,39 @@
+2021-05-04  Jonathan Bedard  
+
+[webkitscmpy] Scope classes used in TaskPool to object
+https://bugs.webkit.org/show_bug.cgi?id=225361
+
+
+Reviewed by Dewei Zhu.
+
+The classes used by TaskPool must be stand-alone because they are passed between processes.
+However, it makes sense that those classes are scoped to the TaskPool object since their
+usage should always be associated with the TaskPool object
+
+* Scripts/libraries/webkitcorepy/setup.py:
+* Scripts/libraries/webkitcorepy/webkitcorepy/__init__.py:
+* Scripts/libraries/webkitcorepy/webkitcorepy/task_pool.py:
+(_Message): Renamed from Message.
+(_Task): Renamed from Task.
+(_Result): Renamed from Result.
+(_Log): Renamed from Log.
+(_Print): Renamed from Print.
+(_State): Renamed from State.
+(_ChildException): Renamed from ChildException.
+(_BiDirectionalQueue): Renamed from BiDirectionalQueue.
+(_Process): Renamed from Process.
+(TaskPool):
+(TaskPool.do):
+(Message): Renamed to _Message..
+(Task): Renamed to _Task.
+(Result): Renamed to _Result.
+(Log): Renamed to _Log.
+(Print): Renamed to _Print.
+(State): Renamed to _State.
+(ChildException): Renamed to _ChildException.
+(BiDirectionalQueue): Renamed to _BiDirectionalQueue.
+(Process): Renamed to _Process.
+
 2021-05-04  Chris Dumez  
 
 Unreviewed, try and re-enable AppleLanguagesTest.UpdateAppleLanguages on Apple Silicon.


Modified: trunk/Tools/Scripts/libraries/webkitcorepy/setup.py (276996 => 276997)

--- trunk/Tools/Scripts/libraries/webkitcorepy/setup.py	2021-05-04 23:58:22 UTC (rev 276996)
+++ trunk/Tools/Scripts/libraries/webkitcorepy/setup.py	2021-05-05 00:00:14 UTC (rev 276997)
@@ -30,7 +30,7 @@
 
 setup(
 name='webkitcorepy',
-version='0.5.12',
+version='0.5.13',
 description='Library containing various Python support classes and functions.',
 long_description=readme(),
 classifiers=[


Modified: trunk/Tools/Scripts/libraries/webkitcorepy/webkitcorepy/__init__.py (276996 => 276997)

--- trunk/Tools/Scripts/libraries/webkitcorepy/webkitcorepy/__init__.py	2021-05-04 23:58:22 UTC (rev 276996)
+++ trunk/Tools/Scripts/libraries/webkitcorepy/webkitcorepy/__init__.py	2021-05-05 00:00:14 UTC (rev 276997)
@@ -37,7 +37,7 @@
 from webkitcorepy.task_pool import TaskPool
 from webkitcorepy.credentials import credentials
 
-version = Version(0, 5, 12)
+version = Version(0, 5, 13)
 
 from webkitcorepy.autoinstall import Package, AutoInstall
 if sys.version_info > (3, 0):


Modified: trunk/Tools/Scripts/libraries/webkitcorepy/webkitcorepy/task_pool.py (276996 => 276997)

--- trunk/Tools/Scripts/libraries/webkitcorepy/webkitcorepy/task_pool.py	2021-05-04 23:58:22 UTC (rev 276996)
+++ trunk/Tools/Scripts/libraries/webkitcorepy/webkitcorepy/task_pool.py	2021-05-05 00:00:14 UTC (rev 276997)
@@ -30,17 +30,17 @@
 from webkitcorepy import OutputCapture, Timeout, log
 
 
-class Message(object):
+class _Message(object):
 def __init__(self, who=None):
-self.who = who or Process.name
+self.who = who 

[webkit-changes] [276935] trunk/Tools

2021-05-03 Thread jbedard
Title: [276935] trunk/Tools








Revision 276935
Author jbed...@apple.com
Date 2021-05-03 16:41:50 -0700 (Mon, 03 May 2021)


Log Message
[webkitpy] Support pickling platforminfo
https://bugs.webkit.org/show_bug.cgi?id=225230


Rubber-stamped by Aakash Jain.

* Scripts/webkitpy/common/system/platforminfo.py:
(PlatformInfo.__init__): Define default arguments.
(PlatformInfo.display_name): Use default platform module if platform_module undefined.
(PlatformInfo._win_version_str): Ditto.
* Scripts/webkitpy/common/system/platforminfo_unittest.py:
(TestPlatformInfo.test_real_code):
* Scripts/webkitpy/common/system/systemhost.py:
(SystemHost.__init__): Use default platforminfo sys and platform modules.

Modified Paths

trunk/Tools/ChangeLog
trunk/Tools/Scripts/webkitpy/common/system/platforminfo.py
trunk/Tools/Scripts/webkitpy/common/system/platforminfo_unittest.py
trunk/Tools/Scripts/webkitpy/common/system/systemhost.py




Diff

Modified: trunk/Tools/ChangeLog (276934 => 276935)

--- trunk/Tools/ChangeLog	2021-05-03 23:25:05 UTC (rev 276934)
+++ trunk/Tools/ChangeLog	2021-05-03 23:41:50 UTC (rev 276935)
@@ -1,3 +1,20 @@
+2021-05-03  Jonathan Bedard  
+
+[webkitpy] Support pickling platforminfo
+https://bugs.webkit.org/show_bug.cgi?id=225230
+
+
+Rubber-stamped by Aakash Jain.
+
+* Scripts/webkitpy/common/system/platforminfo.py:
+(PlatformInfo.__init__): Define default arguments.
+(PlatformInfo.display_name): Use default platform module if platform_module undefined.
+(PlatformInfo._win_version_str): Ditto.
+* Scripts/webkitpy/common/system/platforminfo_unittest.py:
+(TestPlatformInfo.test_real_code):
+* Scripts/webkitpy/common/system/systemhost.py:
+(SystemHost.__init__): Use default platforminfo sys and platform modules.
+
 2021-05-03  Alex Christensen  
 
 WKWebView: WKURLSchemeHandler request don't have Range headers for custom scheme videos


Modified: trunk/Tools/Scripts/webkitpy/common/system/platforminfo.py (276934 => 276935)

--- trunk/Tools/Scripts/webkitpy/common/system/platforminfo.py	2021-05-03 23:25:05 UTC (rev 276934)
+++ trunk/Tools/Scripts/webkitpy/common/system/platforminfo.py	2021-05-03 23:41:50 UTC (rev 276935)
@@ -37,7 +37,7 @@
 
 from webkitpy.common.memoized import memoized
 from webkitpy.common.version_name_map import PUBLIC_TABLE, INTERNAL_TABLE, VersionNameMap
-from webkitpy.common.system.executive import ScriptError
+from webkitpy.common.system.executive import Executive, ScriptError
 from webkitpy.port.config import apple_additions
 
 
@@ -59,8 +59,9 @@
 newer than one known to the code.
 """
 
-def __init__(self, sys_module, platform_module, executive):
-self._executive = executive
+def __init__(self, sys_module=None, platform_module=None, executive=None):
+sys_module = sys_module or sys
+self._executive = executive or Executive()
 self._platform_module = platform_module
 self.os_name = self._determine_os_name(sys_module.platform)
 self.os_version = None
@@ -77,7 +78,7 @@
 self.os_version = self._win_version()
 else:
 # Most other platforms (namely iOS) return conforming version strings.
-version = re.search(r'\d+.\d+(.\d+)?', platform_module.release())
+version = re.search(r'\d+.\d+(.\d+)?', (platform_module or platform).release())
 if version:
 self.os_version = Version.from_string(version.group(0))
 else:
@@ -134,12 +135,12 @@
 def display_name(self):
 # platform.platform() returns Darwin information for Mac, which is just confusing.
 if self.is_mac():
-return "Mac OS X %s" % self._platform_module.mac_ver()[0]
+return "Mac OS X %s" % (self._platform_module or platform).mac_ver()[0]
 
 # Returns strings like:
 # Linux-2.6.18-194.3.1.el5-i686-with-redhat-5.5-Final
 # Windows-2008ServerR2-6.1.7600
-return self._platform_module.platform()
+return (self._platform_module or platform).platform()
 
 def os_version_name(self, table=None):
 if not self.os_version:
@@ -246,7 +247,7 @@
 return Version.from_iterable(match_object.groups())
 
 def _win_version_str(self):
-version = self._platform_module.win32_ver()[1]
+version = (self._platform_module or platform).win32_ver()[1]
 if version:
 return version
 # Note that this should only ever be called on windows, so this should always work.


Modified: trunk/Tools/Scripts/webkitpy/common/system/platforminfo_unittest.py (276934 => 276935)

--- trunk/Tools/Scripts/webkitpy/common/system/platforminfo_unittest.py	2021-05-03 23:25:05 UTC (rev 276934)
+++ trunk/Tools/Scripts/webkitpy/common/system/platforminfo_unittest.py	2021-05-03 23:41:50 UTC (rev 276935)
@@ -75,7 +75,7 @@
 # yet run by default and there's no reason not to run this 

[webkit-changes] [276911] trunk/Tools

2021-05-03 Thread jbedard
Title: [276911] trunk/Tools








Revision 276911
Author jbed...@apple.com
Date 2021-05-03 11:22:27 -0700 (Mon, 03 May 2021)


Log Message
[webkitcorepy] Pass logging level to child processes
https://bugs.webkit.org/show_bug.cgi?id=225311


Reviewed by Stephanie Lewis.

* Scripts/libraries/webkitcorepy/setup.py: Bump version.
* Scripts/libraries/webkitcorepy/webkitcorepy/__init__.py: Ditto.
* Scripts/libraries/webkitcorepy/webkitcorepy/task_pool.py:
(Process.main): Set root logging level.
(TaskPool.__init__): Pass logging level to child process.

Modified Paths

trunk/Tools/ChangeLog
trunk/Tools/Scripts/libraries/webkitcorepy/setup.py
trunk/Tools/Scripts/libraries/webkitcorepy/webkitcorepy/__init__.py
trunk/Tools/Scripts/libraries/webkitcorepy/webkitcorepy/task_pool.py




Diff

Modified: trunk/Tools/ChangeLog (276910 => 276911)

--- trunk/Tools/ChangeLog	2021-05-03 18:14:22 UTC (rev 276910)
+++ trunk/Tools/ChangeLog	2021-05-03 18:22:27 UTC (rev 276911)
@@ -1,3 +1,17 @@
+2021-05-03  Jonathan Bedard  
+
+[webkitcorepy] Pass logging level to child processes
+https://bugs.webkit.org/show_bug.cgi?id=225311
+
+
+Reviewed by Stephanie Lewis.
+
+* Scripts/libraries/webkitcorepy/setup.py: Bump version.
+* Scripts/libraries/webkitcorepy/webkitcorepy/__init__.py: Ditto.
+* Scripts/libraries/webkitcorepy/webkitcorepy/task_pool.py:
+(Process.main): Set root logging level.
+(TaskPool.__init__): Pass logging level to child process.
+
 2021-05-03  Chris Dumez  
 
 Restore pre-r276879 behavior for FileSystem::deleteFile() and FileSystem::deleteEmptyDirectory()


Modified: trunk/Tools/Scripts/libraries/webkitcorepy/setup.py (276910 => 276911)

--- trunk/Tools/Scripts/libraries/webkitcorepy/setup.py	2021-05-03 18:14:22 UTC (rev 276910)
+++ trunk/Tools/Scripts/libraries/webkitcorepy/setup.py	2021-05-03 18:22:27 UTC (rev 276911)
@@ -30,7 +30,7 @@
 
 setup(
 name='webkitcorepy',
-version='0.5.11',
+version='0.5.12',
 description='Library containing various Python support classes and functions.',
 long_description=readme(),
 classifiers=[


Modified: trunk/Tools/Scripts/libraries/webkitcorepy/webkitcorepy/__init__.py (276910 => 276911)

--- trunk/Tools/Scripts/libraries/webkitcorepy/webkitcorepy/__init__.py	2021-05-03 18:14:22 UTC (rev 276910)
+++ trunk/Tools/Scripts/libraries/webkitcorepy/webkitcorepy/__init__.py	2021-05-03 18:22:27 UTC (rev 276911)
@@ -37,7 +37,7 @@
 from webkitcorepy.task_pool import TaskPool
 from webkitcorepy.credentials import credentials
 
-version = Version(0, 5, 11)
+version = Version(0, 5, 12)
 
 from webkitcorepy.autoinstall import Package, AutoInstall
 if sys.version_info > (3, 0):


Modified: trunk/Tools/Scripts/libraries/webkitcorepy/webkitcorepy/task_pool.py (276910 => 276911)

--- trunk/Tools/Scripts/libraries/webkitcorepy/webkitcorepy/task_pool.py	2021-05-03 18:14:22 UTC (rev 276910)
+++ trunk/Tools/Scripts/libraries/webkitcorepy/webkitcorepy/task_pool.py	2021-05-03 18:22:27 UTC (rev 276911)
@@ -231,7 +231,7 @@
 cls.working = False
 
 @classmethod
-def main(cls, name, setup, setupargs, setupkwargs, queue, teardown, teardownargs, teardownkwargs):
+def main(cls, name, loglevel, setup, setupargs, setupkwargs, queue, teardown, teardownargs, teardownkwargs):
 from tblib import pickling_support
 
 cls.name = name
@@ -250,6 +250,7 @@
 for handler in logger.handlers:
 logger.removeHandler(handler)
 logger.addHandler(cls.LogHandler(queue))
+logger.setLevel(loglevel)
 
 queue.send(State(State.STARTING))
 
@@ -304,7 +305,7 @@
 self.workers = [multiprocessing.Process(
 target=Process.main,
 args=(
-'{}/{}'.format(name, count),
+'{}/{}'.format(name, count), logging.getLogger().getEffectiveLevel(),
 setup, setupargs, setupkwargs,
 BiDirectionalQueue(outgoing=self.queue.incoming, incoming=self.queue.outgoing),
 teardown, teardownargs, teardownkwargs,






___
webkit-changes mailing list
webkit-changes@lists.webkit.org
https://lists.webkit.org/mailman/listinfo/webkit-changes


[webkit-changes] [276856] trunk/Tools

2021-04-30 Thread jbedard
Title: [276856] trunk/Tools








Revision 276856
Author jbed...@apple.com
Date 2021-04-30 15:24:13 -0700 (Fri, 30 Apr 2021)


Log Message
[webkitcmpy] Better document inner-workings of identifier generation
https://bugs.webkit.org/show_bug.cgi?id=225241

Reviewed by Dewei Zhu.

* Scripts/libraries/webkitscmpy/webkitscmpy/local/git.py:
(Git.commit):
(Git.find):
* Scripts/libraries/webkitscmpy/webkitscmpy/local/svn.py:
(Svn.commit):
* Scripts/libraries/webkitscmpy/webkitscmpy/remote/bitbucket.py:
(BitBucket.commit):
* Scripts/libraries/webkitscmpy/webkitscmpy/remote/git_hub.py:
(GitHub.commit):

Modified Paths

trunk/Tools/ChangeLog
trunk/Tools/Scripts/libraries/webkitscmpy/webkitscmpy/local/git.py
trunk/Tools/Scripts/libraries/webkitscmpy/webkitscmpy/local/svn.py
trunk/Tools/Scripts/libraries/webkitscmpy/webkitscmpy/remote/bitbucket.py
trunk/Tools/Scripts/libraries/webkitscmpy/webkitscmpy/remote/git_hub.py




Diff

Modified: trunk/Tools/ChangeLog (276855 => 276856)

--- trunk/Tools/ChangeLog	2021-04-30 21:50:21 UTC (rev 276855)
+++ trunk/Tools/ChangeLog	2021-04-30 22:24:13 UTC (rev 276856)
@@ -1,3 +1,20 @@
+2021-04-30  Jonathan Bedard  
+
+[webkitcmpy] Better document inner-workings of identifier generation
+https://bugs.webkit.org/show_bug.cgi?id=225241
+
+Reviewed by Dewei Zhu.
+
+* Scripts/libraries/webkitscmpy/webkitscmpy/local/git.py:
+(Git.commit):
+(Git.find):
+* Scripts/libraries/webkitscmpy/webkitscmpy/local/svn.py:
+(Svn.commit):
+* Scripts/libraries/webkitscmpy/webkitscmpy/remote/bitbucket.py:
+(BitBucket.commit):
+* Scripts/libraries/webkitscmpy/webkitscmpy/remote/git_hub.py:
+(GitHub.commit):
+
 2021-04-30  Wenson Hsieh  
 
 [iOS] Add a heuristic to determine whether a synthetic click triggered any meaningful changes


Modified: trunk/Tools/Scripts/libraries/webkitscmpy/webkitscmpy/local/git.py (276855 => 276856)

--- trunk/Tools/Scripts/libraries/webkitscmpy/webkitscmpy/local/git.py	2021-04-30 21:50:21 UTC (rev 276855)
+++ trunk/Tools/Scripts/libraries/webkitscmpy/webkitscmpy/local/git.py	2021-04-30 22:24:13 UTC (rev 276856)
@@ -151,8 +151,11 @@
 return sorted(set(['/'.join(branch.split('/')[2:]) if branch.startswith('remotes/origin/') else branch for branch in result]))
 
 def commit(self, hash=None, revision=None, identifier=None, branch=None, tag=None, include_log=True, include_identifier=True):
+# Only git-svn checkouts can convert revisions to fully qualified commits
 if revision and not self.is_svn:
 raise self.Exception('This git checkout does not support SVN revisions')
+
+# Determine the hash for a provided Subversion revision
 elif revision:
 if hash:
 raise ValueError('Cannot define both hash and revision')
@@ -173,6 +176,7 @@
 parsed_branch_point = None
 log_format = ['-1'] if include_log else ['-1', '--format=short']
 
+# Determine the `git log` output and branch for a given identifier
 if identifier is not None:
 if revision:
 raise ValueError('Cannot define both revision and identifier')
@@ -218,6 +222,7 @@
 if identifier < 0:
 identifier = None
 
+# Determine the `git log` output for a given branch or tag
 elif branch or tag:
 if hash:
 raise ValueError('Cannot define both tag/branch and hash')
@@ -228,6 +233,7 @@
 if log.returncode:
 raise self.Exception("Failed to retrieve commit information for '{}'".format(branch or tag))
 
+# Determine the `git log` output for a given hash
 else:
 hash = Commit._parse_hash(hash, do_assert=True)
 log = run([self.executable(), 'log', hash or 'HEAD'] + log_format, cwd=self.root_path, capture_output=True, encoding='utf-8')
@@ -234,23 +240,30 @@
 if log.returncode:
 raise self.Exception("Failed to retrieve commit information for '{}'".format(hash or 'HEAD'))
 
+# Fully define the hash from the `git log` output
 match = self.GIT_COMMIT.match(log.stdout.splitlines()[0])
 if not match:
 raise self.Exception('Invalid commit hash in git log')
 hash = match.group('hash')
 
+# A commit is often on multiple branches, the canonical branch is the one with the highest priority
 branch = self.prioritize_branches(self._branches_for(hash))
 
+# Compute the identifier if the function did not receive one and we were asked to
 if not identifier and include_identifier:
 identifier = self._commit_count(hash if branch == default_branch else '{}..{}'.format(default_branch, hash))
+
+# Only compute the branch point we're on something other than the default branch
 branch_point = None if not include_identifier or branch == default_branch else 

<    1   2   3   4   5   6   7   8   9   10   >