Hopefully this has been useful. I have added notes on how to run the
test-patch target to our wiki:
http://wiki.apache.org/hadoop/HowToContribute
Cheers,
Nige
On Mar 19, 2008, at 6:01 PM, Nigel Daley wrote:
Folks,
I've committed a new target to Hadoop's build file: test-patch
This target will run your patch through the same checks that Hudson
currently does EXCEPT for core tests, contrib tests and release
audit checks. (TODO: add release audit checks to this target)
To use this target, you must run it from a clean workspace (ie svn
stat shows no modifications or additions). From your clean
workspace, run:
ant \
-Dpatch.file=/patch/to/my.patch \
-Dforrest.home=/path/to/forrest/ \
-Dfindbugs.home=/path/to/findbugs \
-Dscratch.dir=/path/to/a/temp/dir \ (optional)
-Dsvn.cmd=/path/to/subversion/bin/svn \ (optional)
-Dgrep.cmd=/path/to/grep \ (optional)
-Dpatch.cmd=/path/to/patch \ (optional)
test-patch
At the end, you should get a message on your console that is
similar to the one added to Jira by Hudson. The scratch directory
(which defaults to the value of ${user.home}/tmp) will contain some
output files that will be useful in determining what issues were
found in the patch.
NOTES:
- I haven't tried this on Windows so YMMV.
- optional cmd parameters will default to the ones in your PATH
- grep command must support the -o flag (GNU does)
- patch command must support the -E flag
Let me know if you have problems with this target.
Cheers,
Nigel