Bug 224886

Summary: Get webkitpy.common.checkout.scm.scm_unittest passing
Product: WebKit Reporter: Sam Sneddon [:gsnedders] <gsnedders>
Component: Tools / TestsAssignee: Sam Sneddon [:gsnedders] <gsnedders>
Status: RESOLVED FIXED    
Severity: Normal CC: ews-watchlist, glenn, jbedard, webkit-bug-importer
Priority: P2 Keywords: InRadar
Version: WebKit Nightly Build   
Hardware: Unspecified   
OS: Unspecified   
Attachments:
Description Flags
Patch none

Description Sam Sneddon [:gsnedders] 2021-04-21 12:23:06 PDT
Our tests should pass.

This is potentially the first step before enabling them on EWS, even if we keep them disabled (for being slow) by default.
Comment 1 Sam Sneddon [:gsnedders] 2021-04-21 12:25:11 PDT
Created attachment 426727 [details]
Patch
Comment 2 Jonathan Bedard 2021-04-21 13:10:05 PDT
Comment on attachment 426727 [details]
Patch

View in context: https://bugs.webkit.org/attachment.cgi?id=426727&action=review

> Tools/Scripts/webkitpy/test/markers.py:26
> +def xfail(*args, **kwargs):

What other decorators do we intend to add to this file? I like this API, and like the fact that we are matching pytest.xfail (potentially replacing this in the future?) I wonder if this should live in webkitcorepy, though, so we could use this in testing that doesn't depend on webkitpy.
Comment 3 Sam Sneddon [:gsnedders] 2021-04-22 06:43:41 PDT
(In reply to Jonathan Bedard from comment #2)
> Comment on attachment 426727 [details]
> Patch
> 
> View in context:
> https://bugs.webkit.org/attachment.cgi?id=426727&action=review
> 
> > Tools/Scripts/webkitpy/test/markers.py:26
> > +def xfail(*args, **kwargs):
> 
> What other decorators do we intend to add to this file? I like this API, and
> like the fact that we are matching pytest.xfail (potentially replacing this
> in the future?) I wonder if this should live in webkitcorepy, though, so we
> could use this in testing that doesn't depend on webkitpy.

I could foresee us re-introducing various skip markers (especially for tests where we simply disable entire modules currently on certain OSes).

And yes, that we match pytest.mark.xfail is completely deliberate to allow for future migration through simply removing our wrapper.

I put this in webkitpy mostly because that's where the old skip_if decorator was; no other reason for it to be there! Happy to move it webkitcorepy if you want?
Comment 4 Jonathan Bedard 2021-04-22 07:56:42 PDT
(In reply to Sam Sneddon [:gsnedders] from comment #3)
> (In reply to Jonathan Bedard from comment #2)
> > Comment on attachment 426727 [details]
> > Patch
> > 
> > View in context:
> > https://bugs.webkit.org/attachment.cgi?id=426727&action=review
> > 
> > > Tools/Scripts/webkitpy/test/markers.py:26
> > > +def xfail(*args, **kwargs):
> > 
> > What other decorators do we intend to add to this file? I like this API, and
> > like the fact that we are matching pytest.xfail (potentially replacing this
> > in the future?) I wonder if this should live in webkitcorepy, though, so we
> > could use this in testing that doesn't depend on webkitpy.
> 
> I could foresee us re-introducing various skip markers (especially for tests
> where we simply disable entire modules currently on certain OSes).
> 
> And yes, that we match pytest.mark.xfail is completely deliberate to allow
> for future migration through simply removing our wrapper.
> 
> I put this in webkitpy mostly because that's where the old skip_if decorator
> was; no other reason for it to be there! Happy to move it webkitcorepy if
> you want?

Let's land this as is now, and discuss moving later. I think we do want something like this in webkitcorepy ultimately. I've explored this idea before, in particular, resultsdbpy has some interesting testing decorators that do things like run the same test with in-memory database mocks and actual databases.
Comment 5 EWS 2021-04-22 08:18:03 PDT
Committed r276436 (236899@main): <https://commits.webkit.org/236899@main>

All reviewed patches have been landed. Closing bug and clearing flags on attachment 426727 [details].
Comment 6 Radar WebKit Bug Importer 2021-04-22 12:32:40 PDT
<rdar://problem/77032460>