From 9587433dd8266b1f96c27b0b9936244a6280ab2c 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 | 10 ++++++++++ 1 file changed, 10 insertions(+) diff --git a/dev-support/test-patch.sh b/dev-support/test-patch.sh index 31aa27e43f2edf3c67c037c7dbcd7e694e0fd5b0..86f76858e77064870330251c7cd3745554d5a37a 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. -- 1.7.10.2 (Apple Git-33)