Details

    • Type: Sub-task Sub-task
    • Status: Closed
    • Priority: Major Major
    • Resolution: Fixed
    • Affects Version/s: None
    • Fix Version/s: 0.23.0
    • Component/s: scripts
    • Labels:
      None
    • Hadoop Flags:
      Reviewed

      Description

      Currently you have to specify all the arguments to test-patch.sh, which makes it cumbersome to use. We should make all arguments except the patch file optional.

        Activity

        Tom White created issue -
        Hide
        Tsz Wo Nicholas Sze added a comment -

        It probably should use smart-apply-patch.sh.

        Show
        Tsz Wo Nicholas Sze added a comment - It probably should use smart-apply-patch.sh.
        Tsz Wo Nicholas Sze made changes -
        Field Original Value New Value
        Component/s scripts [ 12311393 ]
        Tom White made changes -
        Assignee Tom White [ tomwhite ]
        Hide
        Tom White added a comment -

        Here's a patch for this.

        • I checked and test-patch.sh already uses smart-apply-patch.sh
        • I removed the curl option since it wasn't used.
        • I also added a --dirty-workspace that allows the workspace to have uncommitted changes in it. This is useful if you need to move some files around in SVN before applying your patch. It's also useful for testing changes to test-patch.sh itself.

        Usage:

        Usage: dev-support/test-patch.sh [options] patch-file | defect-number
        
        Where:
          patch-file is a local patch file containing the changes to test
          defect-number is a JIRA defect number (e.g. 'HADOOP-1234') to test (Jenkins only)
        
        Options:
        --patch-dir=<dir>      The directory for working and output files (default '/tmp')
        --basedir=<dir>        The directory to apply the patch to (default current directory)
        --mvn-cmd=<cmd>        The 'mvn' command to use (default $MAVEN_HOME/bin/mvn, or 'mvn')
        --ps-cmd=<cmd>         The 'ps' command to use (default 'ps')
        --awk-cmd=<cmd>        The 'awk' command to use (default 'awk')
        --svn-cmd=<cmd>        The 'svn' command to use (default 'svn')
        --grep-cmd=<cmd>       The 'grep' command to use (default 'grep')
        --patch-cmd=<cmd>      The 'patch' command to use (default 'patch')
        --findbugs-home=<path> Findbugs home directory (default FINDBUGS_HOME environment variable)
        --forrest-home=<path>  Forrest home directory (default FORREST_HOME environment variable)
        --dirty-workspace      Allow the local SVN workspace to have uncommitted changes
        
        Jenkins-only options:
        --jenkins              Run by Jenkins (runs tests and posts results to JIRA)
        --support-dir=<dir>    The directory to find support files in
        --wget-cmd=<cmd>       The 'wget' command to use (default 'wget')
        --jira-cmd=<cmd>       The 'jira' command to use (default 'jira')
        --jira-password=<pw>   The password for the 'jira' command
        --eclipse-home=<path>  Eclipse home directory (default ECLIPSE_HOME environment variable)
        
        Show
        Tom White added a comment - Here's a patch for this. I checked and test-patch.sh already uses smart-apply-patch.sh I removed the curl option since it wasn't used. I also added a --dirty-workspace that allows the workspace to have uncommitted changes in it. This is useful if you need to move some files around in SVN before applying your patch. It's also useful for testing changes to test-patch.sh itself. Usage: Usage: dev-support/test-patch.sh [options] patch-file | defect-number Where: patch-file is a local patch file containing the changes to test defect-number is a JIRA defect number (e.g. 'HADOOP-1234') to test (Jenkins only) Options: --patch-dir=<dir> The directory for working and output files (default '/tmp') --basedir=<dir> The directory to apply the patch to (default current directory) --mvn-cmd=<cmd> The 'mvn' command to use (default $MAVEN_HOME/bin/mvn, or 'mvn') --ps-cmd=<cmd> The 'ps' command to use (default 'ps') --awk-cmd=<cmd> The 'awk' command to use (default 'awk') --svn-cmd=<cmd> The 'svn' command to use (default 'svn') --grep-cmd=<cmd> The 'grep' command to use (default 'grep') --patch-cmd=<cmd> The 'patch' command to use (default 'patch') --findbugs-home=<path> Findbugs home directory (default FINDBUGS_HOME environment variable) --forrest-home=<path> Forrest home directory (default FORREST_HOME environment variable) --dirty-workspace Allow the local SVN workspace to have uncommitted changes Jenkins-only options: --jenkins Run by Jenkins (runs tests and posts results to JIRA) --support-dir=<dir> The directory to find support files in --wget-cmd=<cmd> The 'wget' command to use (default 'wget') --jira-cmd=<cmd> The 'jira' command to use (default 'jira') --jira-password=<pw> The password for the 'jira' command --eclipse-home=<path> Eclipse home directory (default ECLIPSE_HOME environment variable)
        Tom White made changes -
        Attachment HADOOP-7525.patch [ 12489720 ]
        Hide
        Aaron T. Myers added a comment -

        +1, this change looks great, Tom. I only tested the script without the --jenkins option, but that appears to have worked flawlessly.

        Show
        Aaron T. Myers added a comment - +1, this change looks great, Tom. I only tested the script without the --jenkins option, but that appears to have worked flawlessly.
        Hide
        Tom White added a comment -

        I've just committed this. I'll work on getting the Jenkins job running.

        Show
        Tom White added a comment - I've just committed this. I'll work on getting the Jenkins job running.
        Tom White made changes -
        Status Open [ 1 ] Resolved [ 5 ]
        Hadoop Flags [Reviewed]
        Fix Version/s 0.23.0 [ 12315569 ]
        Resolution Fixed [ 1 ]
        Hide
        Hudson added a comment -

        Integrated in Hadoop-Common-trunk-Commit #714 (See https://builds.apache.org/job/Hadoop-Common-trunk-Commit/714/)
        HADOOP-7525. Make arguments to test-patch optional.

        tomwhite : http://svn.apache.org/viewcvs.cgi/?root=Apache-SVN&view=rev&rev=1155551
        Files :

        • /hadoop/common/trunk/hadoop-common/CHANGES.txt
        • /hadoop/common/trunk/dev-support/test-patch.sh
        Show
        Hudson added a comment - Integrated in Hadoop-Common-trunk-Commit #714 (See https://builds.apache.org/job/Hadoop-Common-trunk-Commit/714/ ) HADOOP-7525 . Make arguments to test-patch optional. tomwhite : http://svn.apache.org/viewcvs.cgi/?root=Apache-SVN&view=rev&rev=1155551 Files : /hadoop/common/trunk/hadoop-common/CHANGES.txt /hadoop/common/trunk/dev-support/test-patch.sh
        Arun C Murthy made changes -
        Status Resolved [ 5 ] Closed [ 6 ]

          People

          • Assignee:
            Tom White
            Reporter:
            Tom White
          • Votes:
            0 Vote for this issue
            Watchers:
            2 Start watching this issue

            Dates

            • Created:
              Updated:
              Resolved:

              Development