Repository: hbase
Updated Branches:
  refs/heads/master a75a2ace4 -> dc03942ed


HBASE-13240 Add an exemption to test-patch for build only changes.


Project: http://git-wip-us.apache.org/repos/asf/hbase/repo
Commit: http://git-wip-us.apache.org/repos/asf/hbase/commit/dc03942e
Tree: http://git-wip-us.apache.org/repos/asf/hbase/tree/dc03942e
Diff: http://git-wip-us.apache.org/repos/asf/hbase/diff/dc03942e

Branch: refs/heads/master
Commit: dc03942ed1f2839332782995fdae5032e67fe1e7
Parents: a75a2ac
Author: Sean Busbey <[email protected]>
Authored: Mon Mar 16 02:27:38 2015 -0500
Committer: Sean Busbey <[email protected]>
Committed: Mon Mar 16 15:45:21 2015 -0500

----------------------------------------------------------------------
 dev-support/test-patch.sh | 10 ++++++++++
 1 file changed, 10 insertions(+)
----------------------------------------------------------------------


http://git-wip-us.apache.org/repos/asf/hbase/blob/dc03942e/dev-support/test-patch.sh
----------------------------------------------------------------------
diff --git a/dev-support/test-patch.sh b/dev-support/test-patch.sh
index 31aa27e..86f7685 100755
--- a/dev-support/test-patch.sh
+++ b/dev-support/test-patch.sh
@@ -361,6 +361,16 @@ checkTests () {
         return 0
       fi
     fi
+    srcReferences=`${GREP} "diff --git" "${PATCH_DIR}/patch" | ${GREP} 
"src/main" | \
+        ${GREP} -v "src/main/asciidoc" | ${GREP} -v "src/main/site" -c`
+    if [[ $srcReferences == 0 ]] ; then
+      echo "The patch doesn't appear to alter any code that requires tests."
+      JIRA_COMMENT="$JIRA_COMMENT
+
+    {color:green}+0 tests included{color}.  The patch appears to be a 
documentation, build,
+                        or dev-support patch that doesn't require tests."
+      return 0
+    fi
     JIRA_COMMENT="$JIRA_COMMENT
 
     {color:red}-1 tests included{color}.  The patch doesn't appear to include 
any new or modified tests.

Reply via email to