Bug 229319 - [ews-build.webkit.org] Add unit test with the expected build steps for each queue
Summary: [ews-build.webkit.org] Add unit test with the expected build steps for each q...
Status: RESOLVED FIXED
Alias: None
Product: WebKit
Classification: Unclassified
Component: Tools / Tests (show other bugs)
Version: WebKit Nightly Build
Hardware: Unspecified Unspecified
: P2 Normal
Assignee: Carlos Alberto Lopez Perez
URL:
Keywords: InRadar
Depends on:
Blocks:
 
Reported: 2021-08-19 18:03 PDT by Carlos Alberto Lopez Perez
Modified: 2022-03-01 02:24 PST (History)
7 users (show)

See Also:


Attachments
Patch (20.66 KB, patch)
2021-08-19 18:07 PDT, Carlos Alberto Lopez Perez
no flags Details | Formatted Diff | Diff
Patch (59.70 KB, patch)
2021-08-19 21:55 PDT, Carlos Alberto Lopez Perez
aakash_jain: review+
Details | Formatted Diff | Diff

Note You need to log in before you can comment on or make changes to this bug.
Description Carlos Alberto Lopez Perez 2021-08-19 18:03:57 PDT
Add a unit test for ews-build.webkit.org like the one added in bug 229311 for build.webkit.org
Comment 1 Carlos Alberto Lopez Perez 2021-08-19 18:07:10 PDT
Created attachment 435931 [details]
Patch
Comment 2 Aakash Jain 2021-08-19 18:13:27 PDT
Comment on attachment 435931 [details]
Patch

This was fast!

Should we delete all the existing unit-test in this file (since each queue/factory would now be covered by two separate unit-tests, and any change in a factory would require updating two similar unit-tests), or do you see any value in retaining them?
Comment 3 Carlos Alberto Lopez Perez 2021-08-19 21:40:19 PDT
(In reply to Aakash Jain from comment #2)
> Comment on attachment 435931 [details]
> Patch
> 
> This was fast!
> 
> Should we delete all the existing unit-test in this file (since each
> queue/factory would now be covered by two separate unit-tests, and any
> change in a factory would require updating two similar unit-tests), or do
> you see any value in retaining them?

I have doubts regarding that so I took the more conservative approach.
It seems the test functionality is kind of duplicated now, so I guess that deleting the previous ones makes sense to avoid having to maintain the two
Comment 4 Carlos Alberto Lopez Perez 2021-08-19 21:55:04 PDT
Created attachment 435940 [details]
Patch
Comment 5 Aakash Jain 2021-08-20 05:18:51 PDT
Comment on attachment 435940 [details]
Patch

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

> Tools/CISupport/ews-build/factories_unittest.py:32
> +        "Style-EWS": [

Nit: we prefer using single quotes, but might be ok for now, we can change it later as well.

> Tools/CISupport/ews-build/factories_unittest.py:572
> +            self.assertListEqual(self.expected_steps[builder['name']], buildSteps, msg="Expected results don't match for builder %s" % builder['name'])

Nit: "results" => "steps"
Comment 6 Carlos Alberto Lopez Perez 2021-08-20 10:06:35 PDT
(In reply to Aakash Jain from comment #5)
> Comment on attachment 435940 [details]
> Patch
> 
> View in context:
> https://bugs.webkit.org/attachment.cgi?id=435940&action=review
> 
> > Tools/CISupport/ews-build/factories_unittest.py:32
> > +        "Style-EWS": [
> 
> Nit: we prefer using single quotes, but might be ok for now, we can change
> it later as well.
> 
> > Tools/CISupport/ews-build/factories_unittest.py:572
> > +            self.assertListEqual(self.expected_steps[builder['name']], buildSteps, msg="Expected results don't match for builder %s" % builder['name'])
> 
> Nit: "results" => "steps"

Ok. Changing that here and also on the equivalent test for build.webkit.org for consistency
Comment 7 Carlos Alberto Lopez Perez 2021-08-20 10:12:51 PDT
Committed r281322 (240739@main): <https://commits.webkit.org/240739@main>
Comment 8 Radar WebKit Bug Importer 2021-08-20 10:13:21 PDT
<rdar://problem/82175147>