Bug 142219

Summary: [buildbot] mastercfg_unittest.py should be runnable easily
Product: WebKit Reporter: Csaba Osztrogonác <ossy>
Component: Tools / TestsAssignee: Csaba Osztrogonác <ossy>
Status: RESOLVED FIXED    
Severity: Normal CC: ap, cdumez, commit-queue, glenn, lforschler, mmirman, ossy, rniwa
Priority: P2    
Version: 528+ (Nightly build)   
Hardware: Unspecified   
OS: Unspecified   
Attachments:
Description Flags
Patch none

Description Csaba Osztrogonác 2015-03-03 09:30:36 PST
Now mastercfg_unittest.py isn't runnable out-of-the-box, because newer 
twisted moved NoResource from twisted.web.error to twisted.web.resource .

The short term fix is to autoinstall the twisted version 
used by build.webkit.org buildmaster - Twisted 12.1.0 .

I'm on it, patch is coming soon.
Comment 1 Csaba Osztrogonác 2015-03-04 23:54:17 PST
Created attachment 247935 [details]
Patch

With this fix mastercfg_unittest.py works out-of-the-box on Linux and Mac too. The next step will be to run it automatically on the bots.
Comment 2 Alexey Proskuryakov 2015-03-05 00:32:09 PST
For the ignorant among us, how does one run a python unit test "out of the box"? Is there a specific command?

The only thing I know how to use is test-webkitpy, and then (barely) buildbot's checkconfig.
Comment 3 Csaba Osztrogonác 2015-03-05 00:37:08 PST
(In reply to comment #2)
> For the ignorant among us, how does one run a python unit test "out of the
> box"? Is there a specific command?
> 
> The only thing I know how to use is test-webkitpy, and then (barely)
> buildbot's checkconfig.

cd Tools/BuildSlaveSupport/build.webkit.org-config
./mastercfg_unittest.py

Unfortunately test-webkitpy can't run unit tests in build.webkit.org-config
for some reason, for example "." and "-" characters in the directory name.

I tried to rename the directory and add it to test-webkitpy,
but it isn't enough, there are more issues should be fixed.
Comment 4 Csaba Osztrogonác 2015-03-05 00:41:11 PST
One more thing: You can't run each unittest in webkitpy by hand, because
they don't have this code at the end and don't have execute bit:

if __name__ == '__main__':
    unittest.main()

test-webkitpy collects/executes unit tests parallel in a different way.
Comment 5 Chris Dumez 2015-03-05 10:39:05 PST
I tested this patch and was able to run mastercfg_unittest.py on Mac.
Comment 6 Chris Dumez 2015-03-05 10:46:46 PST
Comment on attachment 247935 [details]
Patch

r=me.
Comment 7 WebKit Commit Bot 2015-03-05 11:33:30 PST
Comment on attachment 247935 [details]
Patch

Clearing flags on attachment: 247935

Committed r181088: <http://trac.webkit.org/changeset/181088>
Comment 8 WebKit Commit Bot 2015-03-05 11:33:35 PST
All reviewed patches have been landed.  Closing bug.