From 12f21b35bcb6baeecab917ac8244a983b22c474f Mon Sep 17 00:00:00 2001 From: Sean Busbey Date: Mon, 16 Mar 2015 02:27:38 -0500 Subject: [PATCH] HBASE-13240 Add an exemption to test-patch for build only changes. --- dev-support/test-patch.sh | 8 ++++++++ 1 file changed, 8 insertions(+) diff --git a/dev-support/test-patch.sh b/dev-support/test-patch.sh index 31aa27e43f2edf3c67c037c7dbcd7e694e0fd5b0..d59ed560593fa8abfca24f7861677e129f3c337b 100755 --- a/dev-support/test-patch.sh +++ b/dev-support/test-patch.sh @@ -361,6 +361,14 @@ 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 appears to only reference documentation, build, or dev-support files and so doesn't require 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. -- 1.7.10.2 (Apple Git-33)