+1, very nice On 8/17/12 10:04 AM, "Alejandro Abdelnur" <[email protected]> wrote:
>I've spent a bit of time yesterday putting together some pieces for a >test-patch infrastructure for Oozie. > >I've added to trunk/bin a set of 'test-patch' scripts. > >Before going into more details let me show a sample run: > >************************************************************************** >**************************************** >bin/test-patch --patch=/tmp/OOZIE-477.patch > >Testing patch /tmp/OOZIE-477.patch > >Pre patch > Running test task RAW_PATCH_ANALYSIS > Running test task COMPILE > Running test task TESTS > >Patch applied > >Post patch > Running test task RAW_PATCH_ANALYSIS > Running test task COMPILE > Running test task TESTS > >Reports > Running test task RAW_PATCH_ANALYSIS > Running test task COMPILE > Running test task TESTS > > >Testing patch /tmp/OOZIE-477.patch > >---------------------------- > >+1 PATCH_APPLIES >+1 RAW_PATCH_ANALYSIS > +1 the patch does not introduce any @author tags > +1 the patch does not introduce any tabs > +1 the patch does not introduce any trailing spaces > +1 the patch does not introduce any line longer than 132 >+1 COMPILE >+1 TESTS > >---------------------------- > > >Refer to /Users/tucu/src/apache/oozie/svn/trunk0/test-patch/reports for >detailed test-patch reports >$ >************************************************************************** >**************************************** > >The user entry point is the 'test-patch' script: > >---- >$ bin/test-patch > >Either --jira or --patch options must be specified > >Usage: bin/test-patch (--jira=<JIRA ISSUE> | --patch=<PATCH PATH>) >[--debug] [--tasks=<TASK,...>] [--no-cleanup] >---- > >You must run test-patch from the root of trunk, both GIT and SVN >workspaces >are supported. > >IMPORTANT: test-patch resets all local changes, so make sure you have >everything saved/stashed before running. > >Using --jira=OOZIE-### will download the latest available patch and then >run test-patch on it. > >Using --patch=PATCH_PATH will use a a patch locally available instead >downloading it from JIRA. > >The other scripts are test-patch tasks, and they are invoked in turn by >test-patch using a mechanism similar to Unix rc files (the filter is >'test-patch-##-', they are sorted and invoked in order). They are invoked >3 >times, once before the patch is applied, once after the patch is applied, >once more to generate any final report. > >Currently there are 3 test-patch tasks: RAW_PATCH_ANALYSIS, COMPILE, TEST. >Overtime we can add more like JAVAC_WARNINGS, JAVADOC_WARNINGS, FINDBUGS >,CHECKSTYLE, etc, etc. > >I've also created a Jenkins job that runs test-patch when invoked via an >URL, https://builds.apache.org/job/oozie-trunk-precommit-build/ , you can >see a full run in build #6. > >What is left now is creating a second Jenkins job that will query JIRA for >new patches available and it will submit them to the precommit job above. > >I'll work on that over the next few days. > >I'll also make sure all this is properly documented (most likely in the >wiki) > >If OK with the community, while the changes only involve test-patch files >under bin/ I'll just commit them (I need them committed to get Jenkins to >use them). > >Feedback appreciate it. > >And you can start using it for testing your patches locally before >uploading it to JIRA or ReviewBoard. > >Thxs >-- >Alejandro
