Modified: trunk/Tools/CISupport/ews-build/steps_unittest.py (295633 => 295634)
--- trunk/Tools/CISupport/ews-build/steps_unittest.py 2022-06-17 13:35:02 UTC (rev 295633)
+++ trunk/Tools/CISupport/ews-build/steps_unittest.py 2022-06-17 15:22:00 UTC (rev 295634)
@@ -81,6 +81,7 @@
'[email protected]': {'name': 'WebKit Committer', 'status': 'committer', 'email': '[email protected]'},
'webkit-commit-queue': {'name': 'WebKit Committer', 'status': 'committer', 'email': '[email protected]'},
'WebKit Committer': {'status': 'committer'},
+ 'Myles C. Maxfield': {'status': 'reviewer'},
}, []
@@ -5967,7 +5968,7 @@
+ 0, ExpectShell(workdir='wkdir',
logEnviron=False,
timeout=60,
- command=['/bin/sh', '-c', "git log HEAD ^origin/main | grep '\\(Reviewed by\\|Rubber-stamped by\\|Rubber stamped by\\)'"])
+ command=['/bin/sh', '-c', "git log HEAD ^origin/main | grep '\\(Reviewed by\\|Rubber-stamped by\\|Rubber stamped by\\)' || true"])
+ 0
+ ExpectShell.log('stdio', stdout=' Reviewed by WebKit Reviewer.\n'),
)
@@ -5992,7 +5993,7 @@
+ 0, ExpectShell(workdir='wkdir',
logEnviron=False,
timeout=60,
- command=['/bin/sh', '-c', "git log eng/pull-request-branch ^main | grep '\\(Reviewed by\\|Rubber-stamped by\\|Rubber stamped by\\)'"])
+ command=['/bin/sh', '-c', "git log eng/pull-request-branch ^main | grep '\\(Reviewed by\\|Rubber-stamped by\\|Rubber stamped by\\)' || true"])
+ 0
+ ExpectShell.log('stdio', stdout=' Reviewed by WebKit Reviewer.\n'),
)
@@ -5999,6 +6000,31 @@
self.expectOutcome(result=SUCCESS, state_string='Validated commit message')
return self.runStep()
+ def test_success_period(self):
+ self.setupStep(ValidateCommitMessage())
+ ValidateCommitMessage._files = lambda x: ['+++ Tools/CISupport/ews-build/steps.py']
+ self.setProperty('github.number', '1234')
+ self.setProperty('github.base.ref', 'main')
+ self.setProperty('github.head.ref', 'eng/pull-request-branch')
+ self.expectRemoteCommands(
+ ExpectShell(workdir='wkdir',
+ logEnviron=False,
+ timeout=60,
+ command=['/bin/sh', '-c', "git log eng/pull-request-branch ^main | grep -q 'OO*PP*S!' && echo 'Commit message contains (OOPS!)' || test $? -eq 1"])
+ + 0, ExpectShell(workdir='wkdir',
+ logEnviron=False,
+ timeout=60,
+ command=['/bin/sh', '-c', "git log eng/pull-request-branch ^main | grep -q '\\(Reviewed by\\|Rubber-stamped by\\|Rubber stamped by\\|Unreviewed\\)' || echo 'No reviewer information in commit message'"])
+ + 0, ExpectShell(workdir='wkdir',
+ logEnviron=False,
+ timeout=60,
+ command=['/bin/sh', '-c', "git log eng/pull-request-branch ^main | grep '\\(Reviewed by\\|Rubber-stamped by\\|Rubber stamped by\\)' || true"])
+ + 0
+ + ExpectShell.log('stdio', stdout=' Reviewed by Myles C. Maxfield.\n'),
+ )
+ self.expectOutcome(result=SUCCESS, state_string='Validated commit message')
+ return self.runStep()
+
def test_failure_oops(self):
self.setupStep(ValidateCommitMessage())
ValidateCommitMessage._files = lambda x: ['+++ Tools/CISupport/ews-build/steps.py']
@@ -6036,7 +6062,7 @@
+ 0, ExpectShell(workdir='wkdir',
logEnviron=False,
timeout=60,
- command=['/bin/sh', '-c', "git log eng/pull-request-branch ^main | grep '\\(Reviewed by\\|Rubber-stamped by\\|Rubber stamped by\\)'"])
+ command=['/bin/sh', '-c', "git log eng/pull-request-branch ^main | grep '\\(Reviewed by\\|Rubber-stamped by\\|Rubber stamped by\\)' || true"])
+ 0
+ ExpectShell.log('stdio', stdout='No reviewer information in commit message\n'),
)
@@ -6063,7 +6089,7 @@
+ 0, ExpectShell(workdir='wkdir',
logEnviron=False,
timeout=60,
- command=['/bin/sh', '-c', "git log eng/pull-request-branch ^main | grep '\\(Reviewed by\\|Rubber-stamped by\\|Rubber stamped by\\)'"])
+ command=['/bin/sh', '-c', "git log eng/pull-request-branch ^main | grep '\\(Reviewed by\\|Rubber-stamped by\\|Rubber stamped by\\)' || true"])
+ 0
+ ExpectShell.log('stdio', stdout=' Reviewed by WebKit Reviewer.\n'),
)
@@ -6088,7 +6114,7 @@
+ 0, ExpectShell(workdir='wkdir',
logEnviron=False,
timeout=60,
- command=['/bin/sh', '-c', "git log eng/pull-request-branch ^main | grep '\\(Reviewed by\\|Rubber-stamped by\\|Rubber stamped by\\)'"])
+ command=['/bin/sh', '-c', "git log eng/pull-request-branch ^main | grep '\\(Reviewed by\\|Rubber-stamped by\\|Rubber stamped by\\)' || true"])
+ 0
+ ExpectShell.log('stdio', stdout=' Reviewed by WebKit Contributor.\n'),
)
@@ -6114,7 +6140,7 @@
+ 0, ExpectShell(workdir='wkdir',
logEnviron=False,
timeout=60,
- command=['/bin/sh', '-c', "git log eng/pull-request-branch ^main | grep '\\(Reviewed by\\|Rubber-stamped by\\|Rubber stamped by\\)'"])
+ command=['/bin/sh', '-c', "git log eng/pull-request-branch ^main | grep '\\(Reviewed by\\|Rubber-stamped by\\|Rubber stamped by\\)' || true"])
+ 0
+ ExpectShell.log('stdio', stdout=' Reviewed by WebKit Reviewer.\n'),
)