Skip to content

Commit

Permalink
[EWS] ShowIdentifier should support pull-requests
Browse files Browse the repository at this point in the history
https://bugs.webkit.org/show_bug.cgi?id=235252
<rdar://problem/87618736>

Reviewed by Aakash Jain.

* Tools/CISupport/ews-build/steps.py:
(ShowIdentifier.start): Extract revision from diverse set of properties.
(ShowIdentifier.evaluateCommand):
* Tools/CISupport/ews-build/steps_unittest.py:


Canonical link: https://commits.webkit.org/246066@main
git-svn-id: https://svn.webkit.org/repository/webkit/trunk@288040 268f45cc-cd09-0410-ab3c-d52691b4dbfc
  • Loading branch information
JonWBedard committed Jan 15, 2022
1 parent 62fce01 commit 8aab75a
Show file tree
Hide file tree
Showing 3 changed files with 55 additions and 3 deletions.
12 changes: 9 additions & 3 deletions Tools/CISupport/ews-build/steps.py
Original file line number Diff line number Diff line change
Expand Up @@ -407,9 +407,15 @@ def __init__(self, **kwargs):
def start(self):
self.log_observer = logobserver.BufferLogObserver()
self.addLogObserver('stdio', self.log_observer)
revision = self.getProperty('ews_revision', self.getProperty('got_revision'))
if not revision:
revision = 'HEAD'

revision = 'HEAD'
# Note that these properties are delibrately in priority order.
for property_ in ['ews_revision', 'github.base.sha', 'got_revision']:
candidate = self.getProperty(property_)
if candidate:
revision = candidate
break

self.setCommand(['python3', 'Tools/Scripts/git-webkit', 'find', revision])
return shell.ShellCommand.start(self)

Expand Down
33 changes: 33 additions & 0 deletions Tools/CISupport/ews-build/steps_unittest.py
Original file line number Diff line number Diff line change
Expand Up @@ -4852,6 +4852,39 @@ def test_success(self):
self.assertEqual(self.getProperty('identifier'), '233175@main')
return rc

def test_success_pull_request(self):
self.setupStep(ShowIdentifier())
self.setProperty('github.base.sha', '51a6aec9f664')
self.expectRemoteCommands(
ExpectShell(workdir='wkdir',
timeout=300,
logEnviron=False,
command=['python3', 'Tools/Scripts/git-webkit', 'find', '51a6aec9f664']) +
ExpectShell.log('stdio', stdout='Identifier: 233175@main') +
0,
)
self.expectOutcome(result=SUCCESS, state_string='Identifier: 233175@main')
rc = self.runStep()
self.assertEqual(self.getProperty('identifier'), '233175@main')
return rc

def test_prioritized(self):
self.setupStep(ShowIdentifier())
self.setProperty('ews_revision', '51a6aec9f664')
self.setProperty('github.base.sha', '9f66451a6aec')
self.expectRemoteCommands(
ExpectShell(workdir='wkdir',
timeout=300,
logEnviron=False,
command=['python3', 'Tools/Scripts/git-webkit', 'find', '51a6aec9f664']) +
ExpectShell.log('stdio', stdout='Identifier: 233175@main') +
0,
)
self.expectOutcome(result=SUCCESS, state_string='Identifier: 233175@main')
rc = self.runStep()
self.assertEqual(self.getProperty('identifier'), '233175@main')
return rc

def test_failure(self):
self.setupStep(ShowIdentifier())
self.expectRemoteCommands(
Expand Down
13 changes: 13 additions & 0 deletions Tools/ChangeLog
Original file line number Diff line number Diff line change
@@ -1,3 +1,16 @@
2022-01-14 Jonathan Bedard <jbedard@apple.com>

[EWS] ShowIdentifier should support pull-requests
https://bugs.webkit.org/show_bug.cgi?id=235252
<rdar://problem/87618736>

Reviewed by Aakash Jain.

* CISupport/ews-build/steps.py:
(ShowIdentifier.start): Extract revision from diverse set of properties.
(ShowIdentifier.evaluateCommand):
* CISupport/ews-build/steps_unittest.py:

2022-01-14 Wenson Hsieh <wenson_hsieh@apple.com>

[iOS] Occasional crash under -[UITargetedPreview initWithView:parameters:target:] when focusing form controls
Expand Down

0 comments on commit 8aab75a

Please sign in to comment.