RESOLVED FIXED Bug 27977
bugzilla-tool unit tests need a test harness
https://bugs.webkit.org/show_bug.cgi?id=27977
Summary bugzilla-tool unit tests need a test harness
Adam Barth
Reported 2009-08-04 02:08:31 PDT
Turns out to be trivial.
Attachments
Patch v1 (2.42 KB, patch)
2009-08-04 02:09 PDT, Adam Barth
no flags
Patch v1 (2.86 KB, patch)
2009-08-04 14:52 PDT, Adam Barth
no flags
Patch v1 (2.78 KB, patch)
2009-08-04 15:00 PDT, Adam Barth
no flags
Patch v1 (2.58 KB, patch)
2009-08-04 15:02 PDT, Adam Barth
eric: commit-queue+
Adam Barth
Comment 1 2009-08-04 02:09:30 PDT
Created attachment 34051 [details] Patch v1
David Kilzer (:ddkilzer)
Comment 2 2009-08-04 07:45:18 PDT
Comment on attachment 34051 [details] Patch v1 I think you're missing some files from this patch. :)
David Kilzer (:ddkilzer)
Comment 3 2009-08-04 07:47:15 PDT
(In reply to comment #2) > (From update of attachment 34051 [details]) > I think you're missing some files from this patch. :) Specifically: bugzilla_unittest.py committers_unittest.py And "commiters_unittest" is misspelled in run-bugzilla-tool-tests: > from modules.commiters_unittest import CommittersTest
David Levin
Comment 4 2009-08-04 08:23:53 PDT
How about making it all just a bugzilla-tool command (e.g bugzilla-tool self-test) or naming it bugzilla-tool-tests so that it will sort right next to bugzilla-tool. I learned about several tools by going through the files in this directory. Note that you can put imports inside of a block, if you're concerned about globally importing the unit test items.
Eric Seidel (no email)
Comment 5 2009-08-04 08:40:27 PDT
Agreed, this is probably easiest done as a bugzilla-tool command. Unless we're going to make it run all the unit tests in modules. Also, I need to fix commiters_unittest, I realized shortly after I committed it that I misspelled the file name. :(
Adam Barth
Comment 6 2009-08-04 09:42:20 PDT
I'm confused about what I should do to move forward with this patch. The "missing files" are already in the repo. The misspelling is already there too. I guess I could rename the file in the same patch. Do we want to make this a bugzillatool command? I was thinking we'd want to integrate the testing with the buildbot and I'm not sure how to make that easiest.
Eric Seidel (no email)
Comment 7 2009-08-04 09:50:58 PDT
Ignore the mispelling and dave's confusion about the missing files. I think this should be either made into a general "run all the unit tests we have" command, or a self-test command on bugzilla. Either way is fine with me.
Adam Barth
Comment 8 2009-08-04 10:16:22 PDT
(In reply to comment #7) > I think this should be either made into a general "run all the unit tests we > have" command, or a self-test command on bugzilla. Either way is fine with me. Running all the unit tests seems more future-proof to me. I'll update the patch in a bit.
David Kilzer (:ddkilzer)
Comment 9 2009-08-04 10:20:51 PDT
(In reply to comment #7) > Ignore the mispelling and dave's confusion about the missing files. Sorry, I was looking at an outdated repository.
Adam Barth
Comment 10 2009-08-04 14:52:32 PDT
Created attachment 34089 [details] Patch v1
Adam Barth
Comment 11 2009-08-04 15:00:26 PDT
Created attachment 34090 [details] Patch v1
Adam Barth
Comment 12 2009-08-04 15:02:04 PDT
Created attachment 34091 [details] Patch v1
Eric Seidel (no email)
Comment 13 2009-08-04 15:05:49 PDT
Comment on attachment 34091 [details] Patch v1 LGTM. I wonder if people will complain about run-w being stolen for tab-complete by this script. ;)
Adam Barth
Comment 14 2009-08-04 15:07:21 PDT
(In reply to comment #13) > (From update of attachment 34091 [details]) > LGTM. I wonder if people will complain about run-w being stolen for > tab-complete by this script. ;) abarth@dhcp-45-156:~/svn/webkit4$ ./WebKitTools/Scripts/run-webkit- run-webkit-app run-webkit-nightly.cmd run-webkit-unittests run-webkit-httpd run-webkit-tests It doesn't add any tab-complete problems. :)
Adam Barth
Comment 15 2009-08-04 15:46:34 PDT
Comment on attachment 34091 [details] Patch v1 Clearing review flag on attachment: 34091 Committing to http://svn.webkit.org/repository/webkit/trunk ... M WebKitTools/ChangeLog A WebKitTools/Scripts/run-webkit-unittests Committed r46781 M WebKit/wx/WebKitSupport/InspectorClientWx.cpp M WebKit/wx/WebKitSupport/InspectorClientWx.h M WebKit/wx/ChangeLog r46780 = dc5b52be13b15b6b4e3e9773f1780412f01881f2 (trunk) M WebKitTools/ChangeLog A WebKitTools/Scripts/run-webkit-unittests r46781 = 2282d863ec463529cb2b4182d652cb02ba484a38 (trunk) First, rewinding head to replay your work on top of it... Nothing to do. http://trac.webkit.org/changeset/46781
Adam Barth
Comment 16 2009-08-04 15:46:39 PDT
All reviewed patches have been landed. Closing bug.
Note You need to log in before you can comment on or make changes to this bug.