Bug 27977 - bugzilla-tool unit tests need a test harness
Summary: bugzilla-tool unit tests need a test harness
Status: RESOLVED FIXED
Alias: None
Product: WebKit
Classification: Unclassified
Component: Tools / Tests (show other bugs)
Version: 528+ (Nightly build)
Hardware: All All
: P2 Normal
Assignee: Nobody
URL:
Keywords:
Depends on: 27991 26916
Blocks:
  Show dependency treegraph
 
Reported: 2009-08-04 02:08 PDT by Adam Barth
Modified: 2009-08-04 15:46 PDT (History)
3 users (show)

See Also:


Attachments
Patch v1 (2.42 KB, patch)
2009-08-04 02:09 PDT, Adam Barth
no flags Details | Formatted Diff | Diff
Patch v1 (2.86 KB, patch)
2009-08-04 14:52 PDT, Adam Barth
no flags Details | Formatted Diff | Diff
Patch v1 (2.78 KB, patch)
2009-08-04 15:00 PDT, Adam Barth
no flags Details | Formatted Diff | Diff
Patch v1 (2.58 KB, patch)
2009-08-04 15:02 PDT, Adam Barth
eric: commit-queue+
Details | Formatted Diff | Diff

Note You need to log in before you can comment on or make changes to this bug.
Description Adam Barth 2009-08-04 02:08:31 PDT
Turns out to be trivial.
Comment 1 Adam Barth 2009-08-04 02:09:30 PDT
Created attachment 34051 [details]
Patch v1
Comment 2 David Kilzer (:ddkilzer) 2009-08-04 07:45:18 PDT
Comment on attachment 34051 [details]
Patch v1

I think you're missing some files from this patch.  :)
Comment 3 David Kilzer (:ddkilzer) 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
Comment 4 David Levin 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.
Comment 5 Eric Seidel (no email) 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. :(
Comment 6 Adam Barth 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.
Comment 7 Eric Seidel (no email) 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.
Comment 8 Adam Barth 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.
Comment 9 David Kilzer (:ddkilzer) 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.
Comment 10 Adam Barth 2009-08-04 14:52:32 PDT
Created attachment 34089 [details]
Patch v1
Comment 11 Adam Barth 2009-08-04 15:00:26 PDT
Created attachment 34090 [details]
Patch v1
Comment 12 Adam Barth 2009-08-04 15:02:04 PDT
Created attachment 34091 [details]
Patch v1
Comment 13 Eric Seidel (no email) 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. ;)
Comment 14 Adam Barth 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.  :)
Comment 15 Adam Barth 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
Comment 16 Adam Barth 2009-08-04 15:46:39 PDT
All reviewed patches have been landed.  Closing bug.