WebKit Bugzilla
New
Browse
Search+
Log In
×
Sign in with GitHub
or
Remember my login
Create Account
·
Forgot Password
Forgotten password account recovery
RESOLVED FIXED
89564
Add master.cfg unittest to help migration - pass BuildStep instances instead of BuildStep subclasses
https://bugs.webkit.org/show_bug.cgi?id=89564
Summary
Add master.cfg unittest to help migration - pass BuildStep instances instead ...
Csaba Osztrogonác
Reported
2012-06-20 06:25:48 PDT
See
https://bugs.webkit.org/show_bug.cgi?id=89001
for details.
Attachments
Patch
(2.90 KB, patch)
2012-06-20 06:28 PDT
,
Csaba Osztrogonác
no flags
Details
Formatted Diff
Diff
Patch
(2.95 KB, patch)
2012-06-20 06:41 PDT
,
Csaba Osztrogonác
no flags
Details
Formatted Diff
Diff
Show Obsolete
(1)
View All
Add attachment
proposed patch, testcase, etc.
Csaba Osztrogonác
Comment 1
2012-06-20 06:28:52 PDT
Created
attachment 148551
[details]
Patch
Csaba Osztrogonác
Comment 2
2012-06-20 06:34:42 PDT
Here is an example why this unittest useful. Let's try to fix CheckOutSource buildstep: - self.addStep(CheckOutSource) + self.addStep(CheckOutSource()) We will get the following error message: ====================================================================== FAIL: test_builder00_step01 (__main__.BuildStepsConstructorTest) ---------------------------------------------------------------------- Traceback (most recent call last): File "./mastercfg_unittest.py", line 351, in doTest self.fail("Error during instantiation %s buildstep for %s builder: %s\n" % (buildStepName, builder['name'].encode('ascii', 'ignore'), e)) AssertionError: Error during instantiation CheckOutSource buildstep for Apple SnowLeopard Release (Build) builder: __init__() got multiple values for keyword argument 'mode' ====================================================================== FAIL: test_builder01_step01 (__main__.BuildStepsConstructorTest) ---------------------------------------------------------------------- Traceback (most recent call last): File "./mastercfg_unittest.py", line 351, in doTest self.fail("Error during instantiation %s buildstep for %s builder: %s\n" % (buildStepName, builder['name'].encode('ascii', 'ignore'), e)) AssertionError: Error during instantiation CheckOutSource buildstep for Apple SnowLeopard Debug (Build) builder: __init__() got multiple values for keyword argument 'mode' ... [snip] ... FAILED (failures=42) It means we handle mode incorrect in CheckoutSource's constructor. And here is the solution which pass unittests too:
https://bugs.webkit.org/show_bug.cgi?id=89215
Csaba Osztrogonác
Comment 3
2012-06-20 06:41:47 PDT
Created
attachment 148555
[details]
Patch Minor fix: Don't pass the whole builder object to doTest, but only the name of the builder.
Csaba Osztrogonác
Comment 4
2012-06-26 08:06:47 PDT
ping review?
Tony Chang
Comment 5
2012-06-26 13:38:15 PDT
Comment on
attachment 148555
[details]
Patch I don't really know the history of this unit test file, but the code seems fine.
Tony Chang
Comment 6
2012-06-26 13:39:15 PDT
Comment on
attachment 148555
[details]
Patch View in context:
https://bugs.webkit.org/attachment.cgi?id=148555&action=review
> Tools/BuildSlaveSupport/build.webkit.org-config/mastercfg_unittest.py:348 > + (buildStepFactory, kwargs) = step
Nit: no () on the left side of the assignment.
Csaba Osztrogonác
Comment 7
2012-06-27 01:27:33 PDT
Committed
r121328
: <
http://trac.webkit.org/changeset/121328
>
Csaba Osztrogonác
Comment 8
2012-06-27 01:28:15 PDT
Comment on
attachment 148555
[details]
Patch Landed with the nit fix.
Note
You need to
log in
before you can comment on or make changes to this bug.
Top of Page
Format For Printing
XML
Clone This Bug