[jira] [Commented] (ZOOKEEPER-2624) Add test script for pull requests

2016-10-31 Thread ASF GitHub Bot (JIRA)

[ 
https://issues.apache.org/jira/browse/ZOOKEEPER-2624?page=com.atlassian.jira.plugin.system.issuetabpanels:comment-tabpanel&focusedCommentId=15621992#comment-15621992
 ] 

ASF GitHub Bot commented on ZOOKEEPER-2624:
---

GitHub user fpj opened a pull request:

https://github.com/apache/zookeeper/pull/97

ZOOKEEPER-2624: Add test script for pull requests



You can merge this pull request into a Git repository by running:

$ git pull https://github.com/fpj/zookeeper ZK-2624

Alternatively you can review and apply these changes as the patch at:

https://github.com/apache/zookeeper/pull/97.patch

To close this pull request, make a commit to your master/trunk branch
with (at least) the following in the commit message:

This closes #97


commit 1929614a7ef076d9e2bd1191b3341207f2e4411e
Author: fpj 
Date:   2016-10-31T12:13:59Z

Initial cut of the script and changes to build.xml




> Add test script for pull requests
> -
>
> Key: ZOOKEEPER-2624
> URL: https://issues.apache.org/jira/browse/ZOOKEEPER-2624
> Project: ZooKeeper
>  Issue Type: Improvement
>  Components: scripts
>Reporter: Flavio Junqueira
>Assignee: Flavio Junqueira
>
> We need a script similar to {{test-patch.sh}} to handle QA builds for pull 
> requests.



--
This message was sent by Atlassian JIRA
(v6.3.4#6332)


[jira] [Commented] (ZOOKEEPER-2624) Add test script for pull requests

2016-10-31 Thread Hadoop QA (JIRA)

[ 
https://issues.apache.org/jira/browse/ZOOKEEPER-2624?page=com.atlassian.jira.plugin.system.issuetabpanels:comment-tabpanel&focusedCommentId=15622862#comment-15622862
 ] 

Hadoop QA commented on ZOOKEEPER-2624:
--

-1 overall.  GitHub Pull Request  Build


-1 @author.  The patch appears to contain  @author tags which the Zookeeper 
community has agreed to not allow in code contributions.

+1 tests included.  The patch appears to include  new or modified tests.

+1 javadoc.  The javadoc tool did not generate any warning messages.

+1 javac.  The applied patch does not increase the total number of javac 
compiler warnings.

+1 findbugs.  The patch does not introduce any new Findbugs (version 2.0.3) 
warnings.

+1 release audit.  The applied patch does not increase the total number of 
release audit warnings.

-1 core tests.  The patch failed core unit tests.

+1 contrib tests.  The patch passed contrib unit tests.

Test results: 
https://builds.apache.org/job/PreCommit-ZOOKEEPER-github-pr-build/25//testReport/
Findbugs warnings: 
https://builds.apache.org/job/PreCommit-ZOOKEEPER-github-pr-build/25//artifact/trunk/build/test/findbugs/newPatchFindbugsWarnings.html
Console output: 
https://builds.apache.org/job/PreCommit-ZOOKEEPER-github-pr-build/25//console

This message is automatically generated.

> Add test script for pull requests
> -
>
> Key: ZOOKEEPER-2624
> URL: https://issues.apache.org/jira/browse/ZOOKEEPER-2624
> Project: ZooKeeper
>  Issue Type: Improvement
>  Components: scripts
>Reporter: Flavio Junqueira
>Assignee: Flavio Junqueira
>
> We need a script similar to {{test-patch.sh}} to handle QA builds for pull 
> requests.



--
This message was sent by Atlassian JIRA
(v6.3.4#6332)


[jira] [Commented] (ZOOKEEPER-2624) Add test script for pull requests

2016-11-02 Thread Hadoop QA (JIRA)

[ 
https://issues.apache.org/jira/browse/ZOOKEEPER-2624?page=com.atlassian.jira.plugin.system.issuetabpanels:comment-tabpanel&focusedCommentId=15629162#comment-15629162
 ] 

Hadoop QA commented on ZOOKEEPER-2624:
--

-1 overall.  GitHub Pull Request  Build


-1 @author.  The patch appears to contain  @author tags which the Zookeeper 
community has agreed to not allow in code contributions.

+1 tests included.  The patch appears to include  new or modified tests.

+1 javadoc.  The javadoc tool did not generate any warning messages.

+1 javac.  The applied patch does not increase the total number of javac 
compiler warnings.

+1 findbugs.  The patch does not introduce any new Findbugs (version 2.0.3) 
warnings.

+1 release audit.  The applied patch does not increase the total number of 
release audit warnings.

+1 core tests.  The patch passed core unit tests.

+1 contrib tests.  The patch passed contrib unit tests.

Test results: 
https://builds.apache.org/job/PreCommit-ZOOKEEPER-github-pr-build/27//testReport/
Findbugs warnings: 
https://builds.apache.org/job/PreCommit-ZOOKEEPER-github-pr-build/27//artifact/trunk/build/test/findbugs/newPatchFindbugsWarnings.html
Console output: 
https://builds.apache.org/job/PreCommit-ZOOKEEPER-github-pr-build/27//console

This message is automatically generated.

> Add test script for pull requests
> -
>
> Key: ZOOKEEPER-2624
> URL: https://issues.apache.org/jira/browse/ZOOKEEPER-2624
> Project: ZooKeeper
>  Issue Type: Improvement
>  Components: scripts
>Reporter: Flavio Junqueira
>Assignee: Flavio Junqueira
>
> We need a script similar to {{test-patch.sh}} to handle QA builds for pull 
> requests.



--
This message was sent by Atlassian JIRA
(v6.3.4#6332)


[jira] [Commented] (ZOOKEEPER-2624) Add test script for pull requests

2016-11-02 Thread Hadoop QA (JIRA)

[ 
https://issues.apache.org/jira/browse/ZOOKEEPER-2624?page=com.atlassian.jira.plugin.system.issuetabpanels:comment-tabpanel&focusedCommentId=15629440#comment-15629440
 ] 

Hadoop QA commented on ZOOKEEPER-2624:
--

-1 overall.  GitHub Pull Request  Build


-1 @author.  The patch appears to contain  @author tags which the Zookeeper 
community has agreed to not allow in code contributions.

+1 tests included.  The patch appears to include  new or modified tests.

+1 javadoc.  The javadoc tool did not generate any warning messages.

+1 javac.  The applied patch does not increase the total number of javac 
compiler warnings.

+1 findbugs.  The patch does not introduce any new Findbugs (version 2.0.3) 
warnings.

+1 release audit.  The applied patch does not increase the total number of 
release audit warnings.

+1 core tests.  The patch passed core unit tests.

+1 contrib tests.  The patch passed contrib unit tests.

Test results: 
https://builds.apache.org/job/PreCommit-ZOOKEEPER-github-pr-build/28//testReport/
Findbugs warnings: 
https://builds.apache.org/job/PreCommit-ZOOKEEPER-github-pr-build/28//artifact/trunk/build/test/findbugs/newPatchFindbugsWarnings.html
Console output: 
https://builds.apache.org/job/PreCommit-ZOOKEEPER-github-pr-build/28//console

This message is automatically generated.

> Add test script for pull requests
> -
>
> Key: ZOOKEEPER-2624
> URL: https://issues.apache.org/jira/browse/ZOOKEEPER-2624
> Project: ZooKeeper
>  Issue Type: Improvement
>  Components: scripts
>Reporter: Flavio Junqueira
>Assignee: Flavio Junqueira
>
> We need a script similar to {{test-patch.sh}} to handle QA builds for pull 
> requests.



--
This message was sent by Atlassian JIRA
(v6.3.4#6332)


[jira] [Commented] (ZOOKEEPER-2624) Add test script for pull requests

2016-11-03 Thread Hadoop QA (JIRA)

[ 
https://issues.apache.org/jira/browse/ZOOKEEPER-2624?page=com.atlassian.jira.plugin.system.issuetabpanels:comment-tabpanel&focusedCommentId=15633218#comment-15633218
 ] 

Hadoop QA commented on ZOOKEEPER-2624:
--

-1 overall.  GitHub Pull Request  Build


-1 @author.  The patch appears to contain 6 @author tags which the 
Zookeeper community has agreed to not allow in code contributions.

+1 tests included.  The patch appears to include 15 new or modified tests.

+1 javadoc.  The javadoc tool did not generate any warning messages.

+1 javac.  The applied patch does not increase the total number of javac 
compiler warnings.

+1 findbugs.  The patch does not introduce any new Findbugs (version 2.0.3) 
warnings.

+1 release audit.  The applied patch does not increase the total number of 
release audit warnings.

+1 core tests.  The patch passed core unit tests.

+1 contrib tests.  The patch passed contrib unit tests.

Test results: 
https://builds.apache.org/job/PreCommit-ZOOKEEPER-github-pr-build/31//testReport/
Findbugs warnings: 
https://builds.apache.org/job/PreCommit-ZOOKEEPER-github-pr-build/31//artifact/trunk/build/test/findbugs/newPatchFindbugsWarnings.html
Console output: 
https://builds.apache.org/job/PreCommit-ZOOKEEPER-github-pr-build/31//console

This message is automatically generated.

> Add test script for pull requests
> -
>
> Key: ZOOKEEPER-2624
> URL: https://issues.apache.org/jira/browse/ZOOKEEPER-2624
> Project: ZooKeeper
>  Issue Type: Improvement
>  Components: scripts
>Reporter: Flavio Junqueira
>Assignee: Flavio Junqueira
>
> We need a script similar to {{test-patch.sh}} to handle QA builds for pull 
> requests.



--
This message was sent by Atlassian JIRA
(v6.3.4#6332)


[jira] [Commented] (ZOOKEEPER-2624) Add test script for pull requests

2016-11-03 Thread Flavio Junqueira (JIRA)

[ 
https://issues.apache.org/jira/browse/ZOOKEEPER-2624?page=com.atlassian.jira.plugin.system.issuetabpanels:comment-tabpanel&focusedCommentId=15633247#comment-15633247
 ] 

Flavio Junqueira commented on ZOOKEEPER-2624:
-

The result is correct that there are {{@author}} tags in the patch, but the 
script does need them to spot {{@author}} tags, so it is correctly spotting the 
tags, but they turn out to be necessary in this case.

> Add test script for pull requests
> -
>
> Key: ZOOKEEPER-2624
> URL: https://issues.apache.org/jira/browse/ZOOKEEPER-2624
> Project: ZooKeeper
>  Issue Type: Improvement
>  Components: scripts
>Reporter: Flavio Junqueira
>Assignee: Flavio Junqueira
>
> We need a script similar to {{test-patch.sh}} to handle QA builds for pull 
> requests.



--
This message was sent by Atlassian JIRA
(v6.3.4#6332)


[jira] [Commented] (ZOOKEEPER-2624) Add test script for pull requests

2016-11-03 Thread ASF GitHub Bot (JIRA)

[ 
https://issues.apache.org/jira/browse/ZOOKEEPER-2624?page=com.atlassian.jira.plugin.system.issuetabpanels:comment-tabpanel&focusedCommentId=1562#comment-1562
 ] 

ASF GitHub Bot commented on ZOOKEEPER-2624:
---

Github user hanm commented on a diff in the pull request:

https://github.com/apache/zookeeper/pull/97#discussion_r86384484
  
--- Diff: build.xml ---
@@ -1622,6 +1623,26 @@ 
xmlns:cs="antlib:com.puppycrawl.tools.checkstyle.ant">

  
 
+ 
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
--- End diff --

There was a '' in test-patch.sh but missing here - 
is this intentionally left out? 


> Add test script for pull requests
> -
>
> Key: ZOOKEEPER-2624
> URL: https://issues.apache.org/jira/browse/ZOOKEEPER-2624
> Project: ZooKeeper
>  Issue Type: Improvement
>  Components: scripts
>Reporter: Flavio Junqueira
>Assignee: Flavio Junqueira
>
> We need a script similar to {{test-patch.sh}} to handle QA builds for pull 
> requests.



--
This message was sent by Atlassian JIRA
(v6.3.4#6332)


[jira] [Commented] (ZOOKEEPER-2624) Add test script for pull requests

2016-11-03 Thread ASF GitHub Bot (JIRA)

[ 
https://issues.apache.org/jira/browse/ZOOKEEPER-2624?page=com.atlassian.jira.plugin.system.issuetabpanels:comment-tabpanel&focusedCommentId=15633352#comment-15633352
 ] 

ASF GitHub Bot commented on ZOOKEEPER-2624:
---

Github user fpj commented on a diff in the pull request:

https://github.com/apache/zookeeper/pull/97#discussion_r86386008
  
--- Diff: build.xml ---
@@ -1622,6 +1623,26 @@ 
xmlns:cs="antlib:com.puppycrawl.tools.checkstyle.ant">

  
 
+ 
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
--- End diff --

yes, it was intentionally left out. the `defect` number is the jira number. 
in the jira qa, that is being set by the trigger of the jira patch. if you look 
further down in the script, you'll see that I'm setting the `defect` variable 
by extracting the number from the PR title. I expect the PR title to contain 
the jira title `ZOOKEEPER-: Bla bla bla`. 


> Add test script for pull requests
> -
>
> Key: ZOOKEEPER-2624
> URL: https://issues.apache.org/jira/browse/ZOOKEEPER-2624
> Project: ZooKeeper
>  Issue Type: Improvement
>  Components: scripts
>Reporter: Flavio Junqueira
>Assignee: Flavio Junqueira
>
> We need a script similar to {{test-patch.sh}} to handle QA builds for pull 
> requests.



--
This message was sent by Atlassian JIRA
(v6.3.4#6332)


[jira] [Commented] (ZOOKEEPER-2624) Add test script for pull requests

2016-11-03 Thread ASF GitHub Bot (JIRA)

[ 
https://issues.apache.org/jira/browse/ZOOKEEPER-2624?page=com.atlassian.jira.plugin.system.issuetabpanels:comment-tabpanel&focusedCommentId=15633358#comment-15633358
 ] 

ASF GitHub Bot commented on ZOOKEEPER-2624:
---

Github user fpj commented on a diff in the pull request:

https://github.com/apache/zookeeper/pull/97#discussion_r86386241
  
--- Diff: src/java/test/bin/test-github-pr.sh ---
@@ -0,0 +1,607 @@
+#!/usr/bin/env bash
+#   Licensed under the Apache License, Version 2.0 (the "License");
+#   you may not use this file except in compliance with the License.
+#   You may obtain a copy of the License at
+#
+#   http://www.apache.org/licenses/LICENSE-2.0
+#
+#   Unless required by applicable law or agreed to in writing, software
+#   distributed under the License is distributed on an "AS IS" BASIS,
+#   WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or 
implied.
+#   See the License for the specific language governing permissions and
+#   limitations under the License.
+
+
+#set -x
+
+### Setup some variables.
+### GIT_COMMIT and BUILD_URL are set by Hudson if it is run by patch 
process
+### Read variables from properties file
+. `dirname $0`/test-patch.properties
+

+###
+parseArgs() {
+  case "$1" in
+QABUILD)
+  ### Set QABUILD to true to indicate that this script is being run by 
Hudson
+  QABUILD=true
+  if [[ $# != 14 ]] ; then
+echo "ERROR: usage $0 QABUILD
  
   "
+cleanupAndExit 0
+  fi
+  PATCH_DIR=$2
+  PS=$3
+  WGET=$4
+  JIRACLI=$5
+  GIT=$6
+  GREP=$7
+  PATCH=$8
+  FINDBUGS_HOME=$9
+  FORREST_HOME=${10}
+  BASEDIR=${11}
+  JIRA_PASSWD=${12}
+  JAVA5_HOME=${13}
+  CURL=${14}
+  if [ ! -e "$PATCH_DIR" ] ; then
+mkdir -p $PATCH_DIR
+  fi
+
+  ;;
+DEVELOPER)
+  ### Set QABUILD to false to indicate that this script is being run 
by a developer
+  QABUILD=false
+  if [[ $# != 10 ]] ; then
+echo "ERROR: usage $0 DEVELOPER   
 
 "
+cleanupAndExit 0
+  fi
+  ### PATCH_FILE contains the location of the patchfile
+  PATCH_FILE=$2
+  if [[ ! -e "$PATCH_FILE" ]] ; then
+echo "Unable to locate the patch file $PATCH_FILE"
+cleanupAndExit 0
+  fi
+  PATCH_DIR=$3
+  ### Check if $PATCH_DIR exists. If it does not exist, create a new 
directory
+  if [[ ! -e "$PATCH_DIR" ]] ; then
+   mkdir "$PATCH_DIR"
+   if [[ $? == 0 ]] ; then
+ echo "$PATCH_DIR has been created"
+   else
+ echo "Unable to create $PATCH_DIR"
+ cleanupAndExit 0
+   fi
+  fi
+  GIT=$4
+  GREP=$5
+  PATCH=$6
+  FINDBUGS_HOME=$7
+  FORREST_HOME=$8
+  BASEDIR=$9
+  JAVA5_HOME=${10}
+  ### Obtain the patch filename to append it to the version number
+  defect=`basename $PATCH_FILE`
--- End diff --

not really, we care about it to write the report to the jira.


> Add test script for pull requests
> -
>
> Key: ZOOKEEPER-2624
> URL: https://issues.apache.org/jira/browse/ZOOKEEPER-2624
> Project: ZooKeeper
>  Issue Type: Improvement
>  Components: scripts
>Reporter: Flavio Junqueira
>Assignee: Flavio Junqueira
>
> We need a script similar to {{test-patch.sh}} to handle QA builds for pull 
> requests.



--
This message was sent by Atlassian JIRA
(v6.3.4#6332)


[jira] [Commented] (ZOOKEEPER-2624) Add test script for pull requests

2016-11-03 Thread ASF GitHub Bot (JIRA)

[ 
https://issues.apache.org/jira/browse/ZOOKEEPER-2624?page=com.atlassian.jira.plugin.system.issuetabpanels:comment-tabpanel&focusedCommentId=15633354#comment-15633354
 ] 

ASF GitHub Bot commented on ZOOKEEPER-2624:
---

Github user hanm commented on a diff in the pull request:

https://github.com/apache/zookeeper/pull/97#discussion_r86386121
  
--- Diff: src/java/test/bin/test-github-pr.sh ---
@@ -0,0 +1,607 @@
+#!/usr/bin/env bash
+#   Licensed under the Apache License, Version 2.0 (the "License");
+#   you may not use this file except in compliance with the License.
+#   You may obtain a copy of the License at
+#
+#   http://www.apache.org/licenses/LICENSE-2.0
+#
+#   Unless required by applicable law or agreed to in writing, software
+#   distributed under the License is distributed on an "AS IS" BASIS,
+#   WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or 
implied.
+#   See the License for the specific language governing permissions and
+#   limitations under the License.
+
+
+#set -x
+
+### Setup some variables.
+### GIT_COMMIT and BUILD_URL are set by Hudson if it is run by patch 
process
+### Read variables from properties file
+. `dirname $0`/test-patch.properties
+

+###
+parseArgs() {
+  case "$1" in
+QABUILD)
+  ### Set QABUILD to true to indicate that this script is being run by 
Hudson
+  QABUILD=true
+  if [[ $# != 14 ]] ; then
+echo "ERROR: usage $0 QABUILD
  
   "
+cleanupAndExit 0
+  fi
+  PATCH_DIR=$2
+  PS=$3
+  WGET=$4
+  JIRACLI=$5
+  GIT=$6
+  GREP=$7
+  PATCH=$8
+  FINDBUGS_HOME=$9
+  FORREST_HOME=${10}
+  BASEDIR=${11}
+  JIRA_PASSWD=${12}
+  JAVA5_HOME=${13}
+  CURL=${14}
+  if [ ! -e "$PATCH_DIR" ] ; then
+mkdir -p $PATCH_DIR
+  fi
+
+  ;;
+DEVELOPER)
+  ### Set QABUILD to false to indicate that this script is being run 
by a developer
+  QABUILD=false
+  if [[ $# != 10 ]] ; then
+echo "ERROR: usage $0 DEVELOPER   
 
 "
+cleanupAndExit 0
+  fi
+  ### PATCH_FILE contains the location of the patchfile
+  PATCH_FILE=$2
+  if [[ ! -e "$PATCH_FILE" ]] ; then
+echo "Unable to locate the patch file $PATCH_FILE"
+cleanupAndExit 0
+  fi
+  PATCH_DIR=$3
+  ### Check if $PATCH_DIR exists. If it does not exist, create a new 
directory
+  if [[ ! -e "$PATCH_DIR" ]] ; then
+   mkdir "$PATCH_DIR"
+   if [[ $? == 0 ]] ; then
+ echo "$PATCH_DIR has been created"
+   else
+ echo "Unable to create $PATCH_DIR"
+ cleanupAndExit 0
+   fi
+  fi
+  GIT=$4
+  GREP=$5
+  PATCH=$6
+  FINDBUGS_HOME=$7
+  FORREST_HOME=$8
+  BASEDIR=$9
+  JAVA5_HOME=${10}
+  ### Obtain the patch filename to append it to the version number
+  defect=`basename $PATCH_FILE`
--- End diff --

With git flow, I guess we don't care about the patch file name (e.g. 
ZOOKEEPER-1234.patch), so this could be removed?


> Add test script for pull requests
> -
>
> Key: ZOOKEEPER-2624
> URL: https://issues.apache.org/jira/browse/ZOOKEEPER-2624
> Project: ZooKeeper
>  Issue Type: Improvement
>  Components: scripts
>Reporter: Flavio Junqueira
>Assignee: Flavio Junqueira
>
> We need a script similar to {{test-patch.sh}} to handle QA builds for pull 
> requests.



--
This message was sent by Atlassian JIRA
(v6.3.4#6332)


[jira] [Commented] (ZOOKEEPER-2624) Add test script for pull requests

2016-11-03 Thread ASF GitHub Bot (JIRA)

[ 
https://issues.apache.org/jira/browse/ZOOKEEPER-2624?page=com.atlassian.jira.plugin.system.issuetabpanels:comment-tabpanel&focusedCommentId=15633361#comment-15633361
 ] 

ASF GitHub Bot commented on ZOOKEEPER-2624:
---

Github user fpj commented on the issue:

https://github.com/apache/zookeeper/pull/97
  
The failure is actually expected because the script contains the `@author` 
string.


> Add test script for pull requests
> -
>
> Key: ZOOKEEPER-2624
> URL: https://issues.apache.org/jira/browse/ZOOKEEPER-2624
> Project: ZooKeeper
>  Issue Type: Improvement
>  Components: scripts
>Reporter: Flavio Junqueira
>Assignee: Flavio Junqueira
>
> We need a script similar to {{test-patch.sh}} to handle QA builds for pull 
> requests.



--
This message was sent by Atlassian JIRA
(v6.3.4#6332)


[jira] [Commented] (ZOOKEEPER-2624) Add test script for pull requests

2016-11-04 Thread Hadoop QA (JIRA)

[ 
https://issues.apache.org/jira/browse/ZOOKEEPER-2624?page=com.atlassian.jira.plugin.system.issuetabpanels:comment-tabpanel&focusedCommentId=15636018#comment-15636018
 ] 

Hadoop QA commented on ZOOKEEPER-2624:
--

-1 overall.  GitHub Pull Request  Build
  

-1 @author.  The patch appears to contain 6 @author tags which the 
Zookeeper community has agreed to not allow in code contributions.

+1 tests included.  The patch appears to include 15 new or modified tests.

+1 javadoc.  The javadoc tool did not generate any warning messages.

+1 javac.  The applied patch does not increase the total number of javac 
compiler warnings.

-1 findbugs.  The patch appears to introduce 19 new Findbugs (version 
3.0.1) warnings.

+1 release audit.  The applied patch does not increase the total number of 
release audit warnings.

+1 core tests.  The patch passed core unit tests.

+1 contrib tests.  The patch passed contrib unit tests.

Test results: 
https://builds.apache.org/job/PreCommit-ZOOKEEPER-github-pr-build/35//testReport/
Findbugs warnings: 
https://builds.apache.org/job/PreCommit-ZOOKEEPER-github-pr-build/35//artifact/trunk/build/test/findbugs/newPatchFindbugsWarnings.html
Console output: 
https://builds.apache.org/job/PreCommit-ZOOKEEPER-github-pr-build/35//console

This message is automatically generated.

> Add test script for pull requests
> -
>
> Key: ZOOKEEPER-2624
> URL: https://issues.apache.org/jira/browse/ZOOKEEPER-2624
> Project: ZooKeeper
>  Issue Type: Improvement
>  Components: scripts
>Reporter: Flavio Junqueira
>Assignee: Flavio Junqueira
>
> We need a script similar to {{test-patch.sh}} to handle QA builds for pull 
> requests.



--
This message was sent by Atlassian JIRA
(v6.3.4#6332)


[jira] [Commented] (ZOOKEEPER-2624) Add test script for pull requests

2016-11-04 Thread Flavio Junqueira (JIRA)

[ 
https://issues.apache.org/jira/browse/ZOOKEEPER-2624?page=com.atlassian.jira.plugin.system.issuetabpanels:comment-tabpanel&focusedCommentId=15636172#comment-15636172
 ] 

Flavio Junqueira commented on ZOOKEEPER-2624:
-

The -1 for authors is expected, since we have {{@author}} in the script.

I don't know about the findbugs warnings. Perhaps they have upgraded it, but it 
isn't an issue with the script.

> Add test script for pull requests
> -
>
> Key: ZOOKEEPER-2624
> URL: https://issues.apache.org/jira/browse/ZOOKEEPER-2624
> Project: ZooKeeper
>  Issue Type: Improvement
>  Components: scripts
>Reporter: Flavio Junqueira
>Assignee: Flavio Junqueira
>
> We need a script similar to {{test-patch.sh}} to handle QA builds for pull 
> requests.



--
This message was sent by Atlassian JIRA
(v6.3.4#6332)


[jira] [Commented] (ZOOKEEPER-2624) Add test script for pull requests

2016-11-04 Thread ASF GitHub Bot (JIRA)

[ 
https://issues.apache.org/jira/browse/ZOOKEEPER-2624?page=com.atlassian.jira.plugin.system.issuetabpanels:comment-tabpanel&focusedCommentId=15636179#comment-15636179
 ] 

ASF GitHub Bot commented on ZOOKEEPER-2624:
---

Github user fpj commented on the issue:

https://github.com/apache/zookeeper/pull/97
  
@hanm The `DEVELOPER` mode is for running locally, so initially I left it 
mostly unchanged and the original script takes a patch file to test. Because of 
your feedback, I thought that it might be better to take a pull request URL 
instead to test, so I changed the script for the developer mode a bit to do it.


> Add test script for pull requests
> -
>
> Key: ZOOKEEPER-2624
> URL: https://issues.apache.org/jira/browse/ZOOKEEPER-2624
> Project: ZooKeeper
>  Issue Type: Improvement
>  Components: scripts
>Reporter: Flavio Junqueira
>Assignee: Flavio Junqueira
>
> We need a script similar to {{test-patch.sh}} to handle QA builds for pull 
> requests.



--
This message was sent by Atlassian JIRA
(v6.3.4#6332)


[jira] [Commented] (ZOOKEEPER-2624) Add test script for pull requests

2016-11-05 Thread ASF GitHub Bot (JIRA)

[ 
https://issues.apache.org/jira/browse/ZOOKEEPER-2624?page=com.atlassian.jira.plugin.system.issuetabpanels:comment-tabpanel&focusedCommentId=15641159#comment-15641159
 ] 

ASF GitHub Bot commented on ZOOKEEPER-2624:
---

Github user rgs1 commented on a diff in the pull request:

https://github.com/apache/zookeeper/pull/97#discussion_r86679093
  
--- Diff: src/java/test/bin/test-github-pr.sh ---
@@ -0,0 +1,605 @@
+#!/usr/bin/env bash
+#   Licensed under the Apache License, Version 2.0 (the "License");
+#   you may not use this file except in compliance with the License.
+#   You may obtain a copy of the License at
+#
+#   http://www.apache.org/licenses/LICENSE-2.0
+#
+#   Unless required by applicable law or agreed to in writing, software
+#   distributed under the License is distributed on an "AS IS" BASIS,
+#   WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or 
implied.
+#   See the License for the specific language governing permissions and
+#   limitations under the License.
+
+
+#set -x
+
+### Setup some variables.  
+### GIT_COMMIT and BUILD_URL are set by Hudson if it is run by patch 
process
+### Read variables from properties file
+. `dirname $0`/test-patch.properties
+

+###
+parseArgs() {
+  case "$1" in
+QABUILD)
+  ### Set QABUILD to true to indicate that this script is being run by 
Hudson
+  QABUILD=true
+  if [[ $# != 14 ]] ; then
+echo "Number of given parameters: $#" 
+echo "ERROR: usage $0 QABUILD
  
   "
+cleanupAndExit 0
+  fi
+  PATCH_DIR=$2
+  PS=$3
+  WGET=$4
+  JIRACLI=$5
+  GIT=$6
+  GREP=$7
+  PATCH=$8
+  FINDBUGS_HOME=$9
+  FORREST_HOME=${10}
+  BASEDIR=${11}
+  JIRA_PASSWD=${12}
+  JAVA5_HOME=${13}
+  CURL=${14}
+  if [ ! -e "$PATCH_DIR" ] ; then
--- End diff --

nit: use `[[ ! -e "$PATCH_DIR" ]]` as you do in other places  


> Add test script for pull requests
> -
>
> Key: ZOOKEEPER-2624
> URL: https://issues.apache.org/jira/browse/ZOOKEEPER-2624
> Project: ZooKeeper
>  Issue Type: Improvement
>  Components: scripts
>Reporter: Flavio Junqueira
>Assignee: Flavio Junqueira
>
> We need a script similar to {{test-patch.sh}} to handle QA builds for pull 
> requests.



--
This message was sent by Atlassian JIRA
(v6.3.4#6332)


[jira] [Commented] (ZOOKEEPER-2624) Add test script for pull requests

2016-11-05 Thread ASF GitHub Bot (JIRA)

[ 
https://issues.apache.org/jira/browse/ZOOKEEPER-2624?page=com.atlassian.jira.plugin.system.issuetabpanels:comment-tabpanel&focusedCommentId=15641162#comment-15641162
 ] 

ASF GitHub Bot commented on ZOOKEEPER-2624:
---

Github user rgs1 commented on the issue:

https://github.com/apache/zookeeper/pull/97
  
@hanm @fpj i say we merge it and keep iterating; it'll be easier to get it 
right once we are using it. 


> Add test script for pull requests
> -
>
> Key: ZOOKEEPER-2624
> URL: https://issues.apache.org/jira/browse/ZOOKEEPER-2624
> Project: ZooKeeper
>  Issue Type: Improvement
>  Components: scripts
>Reporter: Flavio Junqueira
>Assignee: Flavio Junqueira
>
> We need a script similar to {{test-patch.sh}} to handle QA builds for pull 
> requests.



--
This message was sent by Atlassian JIRA
(v6.3.4#6332)


[jira] [Commented] (ZOOKEEPER-2624) Add test script for pull requests

2016-11-05 Thread ASF GitHub Bot (JIRA)

[ 
https://issues.apache.org/jira/browse/ZOOKEEPER-2624?page=com.atlassian.jira.plugin.system.issuetabpanels:comment-tabpanel&focusedCommentId=15641204#comment-15641204
 ] 

ASF GitHub Bot commented on ZOOKEEPER-2624:
---

Github user breed commented on a diff in the pull request:

https://github.com/apache/zookeeper/pull/97#discussion_r86679336
  
--- Diff: src/java/test/bin/test-github-pr.sh ---
@@ -0,0 +1,612 @@
+#!/usr/bin/env bash
+#   Licensed under the Apache License, Version 2.0 (the "License");
+#   you may not use this file except in compliance with the License.
+#   You may obtain a copy of the License at
+#
+#   http://www.apache.org/licenses/LICENSE-2.0
+#
+#   Unless required by applicable law or agreed to in writing, software
+#   distributed under the License is distributed on an "AS IS" BASIS,
+#   WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or 
implied.
+#   See the License for the specific language governing permissions and
+#   limitations under the License.
+
+
+#set -x
+
+### Setup some variables.
+### GIT_COMMIT and BUILD_URL are set by Hudson if it is run by patch 
process
+### Read variables from properties file
+. `dirname $0`/test-patch.properties
+

+###
+parseArgs() {
+  case "$1" in
+QABUILD)
+  ### Set QABUILD to true to indicate that this script is being run by 
Hudson
+  QABUILD=true
+  if [[ $# != 14 ]] ; then
+echo "ERROR: usage $0 QABUILD
  
   "
+cleanupAndExit 0
+  fi
+  PATCH_DIR=$2
+  PS=$3
+  WGET=$4
+  JIRACLI=$5
+  GIT=$6
+  GREP=$7
+  PATCH=$8
+  FINDBUGS_HOME=$9
+  FORREST_HOME=${10}
+  BASEDIR=${11}
+  JIRA_PASSWD=${12}
+  JAVA5_HOME=${13}
+  CURL=${14}
+  if [ ! -e "$PATCH_DIR" ] ; then
+mkdir -p $PATCH_DIR
+  fi
+
+  ## Obtain PR number and title
+  PULLREQUEST_ID=${GIT_PR_NUMBER}
+  PULLREQUEST_TITLE="${GIT_PR_TITLE}"
+
+  ## Extract jira number from PR title
+  defect=${PULLREQUEST_TITLE%%:*}
+
+  echo "Pull request id: ${PULLREQUEST_ID}"
+  echo "Pull request title: ${PULLREQUEST_TITLE}"
+  echo "Defect number: ${defect}"
+  JIRA_COMMENT="GitHub Pull Request ${PULLREQUEST_NUMBER} Build
+  "
+  ;;
+DEVELOPER)
+  ### Set QABUILD to false to indicate that this script is being run 
by a developer
+  QABUILD=false
+  if [[ $# != 10 ]] ; then
+echo "ERROR: usage $0 DEVELOPER   
 
 "
+cleanupAndExit 0
+  fi
+  PATCH_DIR=$3
+  PATCH_FILE=${PATCH_DIR}/patch
+  curl -L $2.diff > ${PATCH_FILE}
+  ### PATCH_FILE contains the location of the patchfile
+  if [[ ! -e "$PATCH_FILE" ]] ; then
+echo "Unable to locate the patch file $PATCH_FILE"
+cleanupAndExit 0
+  fi
+  ### Check if $PATCH_DIR exists. If it does not exist, create a new 
directory
+  if [[ ! -e "$PATCH_DIR" ]] ; then
+   mkdir "$PATCH_DIR"
+   if [[ $? == 0 ]] ; then
+ echo "$PATCH_DIR has been created"
+   else
+ echo "Unable to create $PATCH_DIR"
+ cleanupAndExit 0
+   fi
+  fi
+  GIT=$4
+  GREP=$5
+  PATCH=$6
+  FINDBUGS_HOME=$7
+  FORREST_HOME=$8
+  BASEDIR=$9
+  JAVA5_HOME=${10}
+  ### Obtain the patch filename to append it to the version number
+  local subject=`grep "Subject:" ${PATCH_FILE}`
+  local length=`expr match ${subject} ZOOKEEPER-[0-9]*`
+  local position=`expr index ${subject} ZOOKEEPER-`
+  defect=${${subject:$position:$length}#ZOOKEEPER-}
+  ;;
+*)
+  echo "ERROR: usage $0 QABUILD [args] | DEVELOPER [args]"
+  cleanupAndExit 0
+  ;;
+  esac
+}
+

+###
+checkout () {
+  echo ""
+  echo ""
+  echo 
"=="
+  echo 
"=="
+  echo "Testing patch for pull request ${PULLREQUEST_ID}."
+  echo 
"=="
+  echo 
"=="
+  echo ""
+  echo ""
+  ### When run by a developer, if the workspace contains modifications, do 
not continue
+  # Ref http://stackoverflow.com/a/2659808 for details on checking dirty 
status
+  ${GI

[jira] [Commented] (ZOOKEEPER-2624) Add test script for pull requests

2016-11-05 Thread ASF GitHub Bot (JIRA)

[ 
https://issues.apache.org/jira/browse/ZOOKEEPER-2624?page=com.atlassian.jira.plugin.system.issuetabpanels:comment-tabpanel&focusedCommentId=15641203#comment-15641203
 ] 

ASF GitHub Bot commented on ZOOKEEPER-2624:
---

Github user breed commented on a diff in the pull request:

https://github.com/apache/zookeeper/pull/97#discussion_r86679330
  
--- Diff: src/java/test/bin/test-github-pr.sh ---
@@ -0,0 +1,612 @@
+#!/usr/bin/env bash
+#   Licensed under the Apache License, Version 2.0 (the "License");
+#   you may not use this file except in compliance with the License.
+#   You may obtain a copy of the License at
+#
+#   http://www.apache.org/licenses/LICENSE-2.0
+#
+#   Unless required by applicable law or agreed to in writing, software
+#   distributed under the License is distributed on an "AS IS" BASIS,
+#   WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or 
implied.
+#   See the License for the specific language governing permissions and
+#   limitations under the License.
+
+
+#set -x
+
+### Setup some variables.
+### GIT_COMMIT and BUILD_URL are set by Hudson if it is run by patch 
process
+### Read variables from properties file
+. `dirname $0`/test-patch.properties
+

+###
+parseArgs() {
+  case "$1" in
+QABUILD)
+  ### Set QABUILD to true to indicate that this script is being run by 
Hudson
+  QABUILD=true
+  if [[ $# != 14 ]] ; then
+echo "ERROR: usage $0 QABUILD
  
   "
+cleanupAndExit 0
+  fi
+  PATCH_DIR=$2
+  PS=$3
+  WGET=$4
+  JIRACLI=$5
+  GIT=$6
+  GREP=$7
+  PATCH=$8
+  FINDBUGS_HOME=$9
+  FORREST_HOME=${10}
+  BASEDIR=${11}
+  JIRA_PASSWD=${12}
+  JAVA5_HOME=${13}
+  CURL=${14}
+  if [ ! -e "$PATCH_DIR" ] ; then
+mkdir -p $PATCH_DIR
+  fi
+
+  ## Obtain PR number and title
+  PULLREQUEST_ID=${GIT_PR_NUMBER}
+  PULLREQUEST_TITLE="${GIT_PR_TITLE}"
+
+  ## Extract jira number from PR title
+  defect=${PULLREQUEST_TITLE%%:*}
+
+  echo "Pull request id: ${PULLREQUEST_ID}"
+  echo "Pull request title: ${PULLREQUEST_TITLE}"
+  echo "Defect number: ${defect}"
+  JIRA_COMMENT="GitHub Pull Request ${PULLREQUEST_NUMBER} Build
+  "
+  ;;
+DEVELOPER)
+  ### Set QABUILD to false to indicate that this script is being run 
by a developer
+  QABUILD=false
+  if [[ $# != 10 ]] ; then
+echo "ERROR: usage $0 DEVELOPER   
 
 "
+cleanupAndExit 0
+  fi
+  PATCH_DIR=$3
+  PATCH_FILE=${PATCH_DIR}/patch
+  curl -L $2.diff > ${PATCH_FILE}
+  ### PATCH_FILE contains the location of the patchfile
+  if [[ ! -e "$PATCH_FILE" ]] ; then
+echo "Unable to locate the patch file $PATCH_FILE"
+cleanupAndExit 0
+  fi
+  ### Check if $PATCH_DIR exists. If it does not exist, create a new 
directory
+  if [[ ! -e "$PATCH_DIR" ]] ; then
+   mkdir "$PATCH_DIR"
+   if [[ $? == 0 ]] ; then
+ echo "$PATCH_DIR has been created"
+   else
+ echo "Unable to create $PATCH_DIR"
+ cleanupAndExit 0
+   fi
+  fi
+  GIT=$4
+  GREP=$5
+  PATCH=$6
+  FINDBUGS_HOME=$7
+  FORREST_HOME=$8
+  BASEDIR=$9
+  JAVA5_HOME=${10}
+  ### Obtain the patch filename to append it to the version number
+  local subject=`grep "Subject:" ${PATCH_FILE}`
+  local length=`expr match ${subject} ZOOKEEPER-[0-9]*`
+  local position=`expr index ${subject} ZOOKEEPER-`
+  defect=${${subject:$position:$length}#ZOOKEEPER-}
+  ;;
+*)
+  echo "ERROR: usage $0 QABUILD [args] | DEVELOPER [args]"
+  cleanupAndExit 0
+  ;;
+  esac
+}
+

+###
+checkout () {
+  echo ""
+  echo ""
+  echo 
"=="
+  echo 
"=="
+  echo "Testing patch for pull request ${PULLREQUEST_ID}."
+  echo 
"=="
+  echo 
"=="
+  echo ""
+  echo ""
+  ### When run by a developer, if the workspace contains modifications, do 
not continue
+  # Ref http://stackoverflow.com/a/2659808 for details on checking dirty 
status
+  ${GI

[jira] [Commented] (ZOOKEEPER-2624) Add test script for pull requests

2016-11-05 Thread ASF GitHub Bot (JIRA)

[ 
https://issues.apache.org/jira/browse/ZOOKEEPER-2624?page=com.atlassian.jira.plugin.system.issuetabpanels:comment-tabpanel&focusedCommentId=15641205#comment-15641205
 ] 

ASF GitHub Bot commented on ZOOKEEPER-2624:
---

Github user breed commented on a diff in the pull request:

https://github.com/apache/zookeeper/pull/97#discussion_r86679277
  
--- Diff: src/java/test/bin/test-github-pr.sh ---
@@ -0,0 +1,612 @@
+#!/usr/bin/env bash
+#   Licensed under the Apache License, Version 2.0 (the "License");
+#   you may not use this file except in compliance with the License.
+#   You may obtain a copy of the License at
+#
+#   http://www.apache.org/licenses/LICENSE-2.0
+#
+#   Unless required by applicable law or agreed to in writing, software
+#   distributed under the License is distributed on an "AS IS" BASIS,
+#   WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or 
implied.
+#   See the License for the specific language governing permissions and
+#   limitations under the License.
+
+
+#set -x
+
+### Setup some variables.
+### GIT_COMMIT and BUILD_URL are set by Hudson if it is run by patch 
process
+### Read variables from properties file
+. `dirname $0`/test-patch.properties
+

+###
+parseArgs() {
+  case "$1" in
+QABUILD)
+  ### Set QABUILD to true to indicate that this script is being run by 
Hudson
+  QABUILD=true
+  if [[ $# != 14 ]] ; then
+echo "ERROR: usage $0 QABUILD
  
   "
+cleanupAndExit 0
+  fi
+  PATCH_DIR=$2
+  PS=$3
+  WGET=$4
+  JIRACLI=$5
+  GIT=$6
+  GREP=$7
+  PATCH=$8
+  FINDBUGS_HOME=$9
+  FORREST_HOME=${10}
+  BASEDIR=${11}
+  JIRA_PASSWD=${12}
+  JAVA5_HOME=${13}
+  CURL=${14}
+  if [ ! -e "$PATCH_DIR" ] ; then
+mkdir -p $PATCH_DIR
+  fi
+
+  ## Obtain PR number and title
+  PULLREQUEST_ID=${GIT_PR_NUMBER}
+  PULLREQUEST_TITLE="${GIT_PR_TITLE}"
+
+  ## Extract jira number from PR title
+  defect=${PULLREQUEST_TITLE%%:*}
+
+  echo "Pull request id: ${PULLREQUEST_ID}"
+  echo "Pull request title: ${PULLREQUEST_TITLE}"
+  echo "Defect number: ${defect}"
+  JIRA_COMMENT="GitHub Pull Request ${PULLREQUEST_NUMBER} Build
+  "
+  ;;
+DEVELOPER)
+  ### Set QABUILD to false to indicate that this script is being run 
by a developer
+  QABUILD=false
+  if [[ $# != 10 ]] ; then
+echo "ERROR: usage $0 DEVELOPER   
 
 "
+cleanupAndExit 0
+  fi
+  PATCH_DIR=$3
+  PATCH_FILE=${PATCH_DIR}/patch
+  curl -L $2.diff > ${PATCH_FILE}
+  ### PATCH_FILE contains the location of the patchfile
+  if [[ ! -e "$PATCH_FILE" ]] ; then
+echo "Unable to locate the patch file $PATCH_FILE"
+cleanupAndExit 0
+  fi
+  ### Check if $PATCH_DIR exists. If it does not exist, create a new 
directory
+  if [[ ! -e "$PATCH_DIR" ]] ; then
+   mkdir "$PATCH_DIR"
+   if [[ $? == 0 ]] ; then
+ echo "$PATCH_DIR has been created"
+   else
+ echo "Unable to create $PATCH_DIR"
+ cleanupAndExit 0
+   fi
+  fi
+  GIT=$4
+  GREP=$5
+  PATCH=$6
+  FINDBUGS_HOME=$7
+  FORREST_HOME=$8
+  BASEDIR=$9
+  JAVA5_HOME=${10}
+  ### Obtain the patch filename to append it to the version number
+  local subject=`grep "Subject:" ${PATCH_FILE}`
+  local length=`expr match ${subject} ZOOKEEPER-[0-9]*`
+  local position=`expr index ${subject} ZOOKEEPER-`
+  defect=${${subject:$position:$length}#ZOOKEEPER-}
+  ;;
+*)
+  echo "ERROR: usage $0 QABUILD [args] | DEVELOPER [args]"
+  cleanupAndExit 0
+  ;;
+  esac
+}
+

+###
+checkout () {
+  echo ""
+  echo ""
+  echo 
"=="
+  echo 
"=="
+  echo "Testing patch for pull request ${PULLREQUEST_ID}."
+  echo 
"=="
+  echo 
"=="
+  echo ""
+  echo ""
+  ### When run by a developer, if the workspace contains modifications, do 
not continue
+  # Ref http://stackoverflow.com/a/2659808 for details on checking dirty 
status
+  ${GI

[jira] [Commented] (ZOOKEEPER-2624) Add test script for pull requests

2016-11-05 Thread ASF GitHub Bot (JIRA)

[ 
https://issues.apache.org/jira/browse/ZOOKEEPER-2624?page=com.atlassian.jira.plugin.system.issuetabpanels:comment-tabpanel&focusedCommentId=15641206#comment-15641206
 ] 

ASF GitHub Bot commented on ZOOKEEPER-2624:
---

Github user breed commented on a diff in the pull request:

https://github.com/apache/zookeeper/pull/97#discussion_r86679319
  
--- Diff: src/java/test/bin/test-github-pr.sh ---
@@ -0,0 +1,612 @@
+#!/usr/bin/env bash
+#   Licensed under the Apache License, Version 2.0 (the "License");
+#   you may not use this file except in compliance with the License.
+#   You may obtain a copy of the License at
+#
+#   http://www.apache.org/licenses/LICENSE-2.0
+#
+#   Unless required by applicable law or agreed to in writing, software
+#   distributed under the License is distributed on an "AS IS" BASIS,
+#   WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or 
implied.
+#   See the License for the specific language governing permissions and
+#   limitations under the License.
+
+
+#set -x
+
+### Setup some variables.
+### GIT_COMMIT and BUILD_URL are set by Hudson if it is run by patch 
process
+### Read variables from properties file
+. `dirname $0`/test-patch.properties
+

+###
+parseArgs() {
+  case "$1" in
+QABUILD)
+  ### Set QABUILD to true to indicate that this script is being run by 
Hudson
+  QABUILD=true
+  if [[ $# != 14 ]] ; then
+echo "ERROR: usage $0 QABUILD
  
   "
+cleanupAndExit 0
+  fi
+  PATCH_DIR=$2
+  PS=$3
+  WGET=$4
+  JIRACLI=$5
+  GIT=$6
+  GREP=$7
+  PATCH=$8
+  FINDBUGS_HOME=$9
+  FORREST_HOME=${10}
+  BASEDIR=${11}
+  JIRA_PASSWD=${12}
+  JAVA5_HOME=${13}
+  CURL=${14}
+  if [ ! -e "$PATCH_DIR" ] ; then
+mkdir -p $PATCH_DIR
+  fi
+
+  ## Obtain PR number and title
+  PULLREQUEST_ID=${GIT_PR_NUMBER}
+  PULLREQUEST_TITLE="${GIT_PR_TITLE}"
+
+  ## Extract jira number from PR title
+  defect=${PULLREQUEST_TITLE%%:*}
+
+  echo "Pull request id: ${PULLREQUEST_ID}"
+  echo "Pull request title: ${PULLREQUEST_TITLE}"
+  echo "Defect number: ${defect}"
+  JIRA_COMMENT="GitHub Pull Request ${PULLREQUEST_NUMBER} Build
+  "
+  ;;
+DEVELOPER)
+  ### Set QABUILD to false to indicate that this script is being run 
by a developer
+  QABUILD=false
+  if [[ $# != 10 ]] ; then
+echo "ERROR: usage $0 DEVELOPER   
 
 "
+cleanupAndExit 0
+  fi
+  PATCH_DIR=$3
+  PATCH_FILE=${PATCH_DIR}/patch
+  curl -L $2.diff > ${PATCH_FILE}
+  ### PATCH_FILE contains the location of the patchfile
+  if [[ ! -e "$PATCH_FILE" ]] ; then
+echo "Unable to locate the patch file $PATCH_FILE"
+cleanupAndExit 0
+  fi
+  ### Check if $PATCH_DIR exists. If it does not exist, create a new 
directory
+  if [[ ! -e "$PATCH_DIR" ]] ; then
+   mkdir "$PATCH_DIR"
+   if [[ $? == 0 ]] ; then
+ echo "$PATCH_DIR has been created"
+   else
+ echo "Unable to create $PATCH_DIR"
+ cleanupAndExit 0
+   fi
+  fi
+  GIT=$4
+  GREP=$5
+  PATCH=$6
+  FINDBUGS_HOME=$7
+  FORREST_HOME=$8
+  BASEDIR=$9
+  JAVA5_HOME=${10}
+  ### Obtain the patch filename to append it to the version number
+  local subject=`grep "Subject:" ${PATCH_FILE}`
+  local length=`expr match ${subject} ZOOKEEPER-[0-9]*`
+  local position=`expr index ${subject} ZOOKEEPER-`
+  defect=${${subject:$position:$length}#ZOOKEEPER-}
+  ;;
+*)
+  echo "ERROR: usage $0 QABUILD [args] | DEVELOPER [args]"
+  cleanupAndExit 0
+  ;;
+  esac
+}
+

+###
+checkout () {
+  echo ""
+  echo ""
+  echo 
"=="
+  echo 
"=="
+  echo "Testing patch for pull request ${PULLREQUEST_ID}."
+  echo 
"=="
+  echo 
"=="
+  echo ""
+  echo ""
+  ### When run by a developer, if the workspace contains modifications, do 
not continue
+  # Ref http://stackoverflow.com/a/2659808 for details on checking dirty 
status
+  ${GI

[jira] [Commented] (ZOOKEEPER-2624) Add test script for pull requests

2016-11-06 Thread ASF GitHub Bot (JIRA)

[ 
https://issues.apache.org/jira/browse/ZOOKEEPER-2624?page=com.atlassian.jira.plugin.system.issuetabpanels:comment-tabpanel&focusedCommentId=15642010#comment-15642010
 ] 

ASF GitHub Bot commented on ZOOKEEPER-2624:
---

Github user fpj commented on the issue:

https://github.com/apache/zookeeper/pull/97
  
@breed @rgs1 let's get this in, I'll create a jira to cleanup the script. 
Note that a lot of the issues you pointed out are legacy from the other script, 
so we will probably want to address in both.


> Add test script for pull requests
> -
>
> Key: ZOOKEEPER-2624
> URL: https://issues.apache.org/jira/browse/ZOOKEEPER-2624
> Project: ZooKeeper
>  Issue Type: Improvement
>  Components: scripts
>Reporter: Flavio Junqueira
>Assignee: Flavio Junqueira
>
> We need a script similar to {{test-patch.sh}} to handle QA builds for pull 
> requests.



--
This message was sent by Atlassian JIRA
(v6.3.4#6332)


[jira] [Commented] (ZOOKEEPER-2624) Add test script for pull requests

2016-11-06 Thread ASF GitHub Bot (JIRA)

[ 
https://issues.apache.org/jira/browse/ZOOKEEPER-2624?page=com.atlassian.jira.plugin.system.issuetabpanels:comment-tabpanel&focusedCommentId=15642019#comment-15642019
 ] 

ASF GitHub Bot commented on ZOOKEEPER-2624:
---

Github user breed commented on the issue:

https://github.com/apache/zookeeper/pull/97
  
agreed


> Add test script for pull requests
> -
>
> Key: ZOOKEEPER-2624
> URL: https://issues.apache.org/jira/browse/ZOOKEEPER-2624
> Project: ZooKeeper
>  Issue Type: Improvement
>  Components: scripts
>Reporter: Flavio Junqueira
>Assignee: Flavio Junqueira
>
> We need a script similar to {{test-patch.sh}} to handle QA builds for pull 
> requests.



--
This message was sent by Atlassian JIRA
(v6.3.4#6332)


[jira] [Commented] (ZOOKEEPER-2624) Add test script for pull requests

2016-11-06 Thread Hadoop QA (JIRA)

[ 
https://issues.apache.org/jira/browse/ZOOKEEPER-2624?page=com.atlassian.jira.plugin.system.issuetabpanels:comment-tabpanel&focusedCommentId=15642027#comment-15642027
 ] 

Hadoop QA commented on ZOOKEEPER-2624:
--

-1 overall.  GitHub Pull Request  Build
  

-1 @author.  The patch appears to contain 6 @author tags which the 
Zookeeper community has agreed to not allow in code contributions.

+1 tests included.  The patch appears to include 15 new or modified tests.

+1 javadoc.  The javadoc tool did not generate any warning messages.

+1 javac.  The applied patch does not increase the total number of javac 
compiler warnings.

-1 findbugs.  The patch appears to introduce 19 new Findbugs (version 
3.0.1) warnings.

+1 release audit.  The applied patch does not increase the total number of 
release audit warnings.

+1 core tests.  The patch passed core unit tests.

+1 contrib tests.  The patch passed contrib unit tests.

Test results: 
https://builds.apache.org/job/PreCommit-ZOOKEEPER-github-pr-build/43//testReport/
Findbugs warnings: 
https://builds.apache.org/job/PreCommit-ZOOKEEPER-github-pr-build/43//artifact/trunk/build/test/findbugs/newPatchFindbugsWarnings.html
Console output: 
https://builds.apache.org/job/PreCommit-ZOOKEEPER-github-pr-build/43//console

This message is automatically generated.

> Add test script for pull requests
> -
>
> Key: ZOOKEEPER-2624
> URL: https://issues.apache.org/jira/browse/ZOOKEEPER-2624
> Project: ZooKeeper
>  Issue Type: Improvement
>  Components: scripts
>Reporter: Flavio Junqueira
>Assignee: Flavio Junqueira
>
> We need a script similar to {{test-patch.sh}} to handle QA builds for pull 
> requests.



--
This message was sent by Atlassian JIRA
(v6.3.4#6332)


[jira] [Commented] (ZOOKEEPER-2624) Add test script for pull requests

2016-11-06 Thread ASF GitHub Bot (JIRA)

[ 
https://issues.apache.org/jira/browse/ZOOKEEPER-2624?page=com.atlassian.jira.plugin.system.issuetabpanels:comment-tabpanel&focusedCommentId=15642108#comment-15642108
 ] 

ASF GitHub Bot commented on ZOOKEEPER-2624:
---

Github user fpj commented on the issue:

https://github.com/apache/zookeeper/pull/97
  
The failures are the same as before: `@author` string in the script and new 
findbugs warnings due to jenkins upgrade. 


> Add test script for pull requests
> -
>
> Key: ZOOKEEPER-2624
> URL: https://issues.apache.org/jira/browse/ZOOKEEPER-2624
> Project: ZooKeeper
>  Issue Type: Improvement
>  Components: scripts
>Reporter: Flavio Junqueira
>Assignee: Flavio Junqueira
>
> We need a script similar to {{test-patch.sh}} to handle QA builds for pull 
> requests.



--
This message was sent by Atlassian JIRA
(v6.3.4#6332)


[jira] [Commented] (ZOOKEEPER-2624) Add test script for pull requests

2016-11-06 Thread Hudson (JIRA)

[ 
https://issues.apache.org/jira/browse/ZOOKEEPER-2624?page=com.atlassian.jira.plugin.system.issuetabpanels:comment-tabpanel&focusedCommentId=15642282#comment-15642282
 ] 

Hudson commented on ZOOKEEPER-2624:
---

FAILURE: Integrated in Jenkins build ZooKeeper-trunk #3146 (See 
[https://builds.apache.org/job/ZooKeeper-trunk/3146/])
ZOOKEEPER-2624: Add test script for pull requests (rgs: rev 
440e0923dd9e3be533a196fdd6ada960860ca7f6)
* (add) src/java/test/bin/test-github-pr.sh
* (edit) build.xml


> Add test script for pull requests
> -
>
> Key: ZOOKEEPER-2624
> URL: https://issues.apache.org/jira/browse/ZOOKEEPER-2624
> Project: ZooKeeper
>  Issue Type: Improvement
>  Components: scripts
>Reporter: Flavio Junqueira
>Assignee: Flavio Junqueira
>
> We need a script similar to {{test-patch.sh}} to handle QA builds for pull 
> requests.



--
This message was sent by Atlassian JIRA
(v6.3.4#6332)


[jira] [Commented] (ZOOKEEPER-2624) Add test script for pull requests

2016-11-06 Thread Raul Gutierrez Segales (JIRA)

[ 
https://issues.apache.org/jira/browse/ZOOKEEPER-2624?page=com.atlassian.jira.plugin.system.issuetabpanels:comment-tabpanel&focusedCommentId=15642378#comment-15642378
 ] 

Raul Gutierrez Segales commented on ZOOKEEPER-2624:
---

Merged:

https://git-wip-us.apache.org/repos/asf?p=zookeeper.git;a=commitdiff;h=440e0923dd9e3be533a196fdd6ada960860ca7f6;hp=bcb07a09b06c91243ed244f04a71b8daf629e286

Thanks Flavio & Ben!

> Add test script for pull requests
> -
>
> Key: ZOOKEEPER-2624
> URL: https://issues.apache.org/jira/browse/ZOOKEEPER-2624
> Project: ZooKeeper
>  Issue Type: Improvement
>  Components: scripts
>Reporter: Flavio Junqueira
>Assignee: Flavio Junqueira
>
> We need a script similar to {{test-patch.sh}} to handle QA builds for pull 
> requests.



--
This message was sent by Atlassian JIRA
(v6.3.4#6332)