From de73a65f3222e7513db6f71c70032a8cd4439c17 Mon Sep 17 00:00:00 2001 From: Robert Joseph Evans Date: Wed, 20 Feb 2013 16:41:57 +0000 Subject: [PATCH] HADOOP-9112. test-patch should -1 for @Tests without a timeout (Surenkumar Nihalani via bobby) git-svn-id: https://svn.apache.org/repos/asf/hadoop/common/trunk@1448285 13f79535-47bb-0310-9956-ffa450edef68 --- dev-support/test-patch.sh | 20 ++++++++++++++++++- .../hadoop-common/CHANGES.txt | 3 +++ 2 files changed, 22 insertions(+), 1 deletion(-) diff --git a/dev-support/test-patch.sh b/dev-support/test-patch.sh index 4653efdbda..8618de5e4c 100755 --- a/dev-support/test-patch.sh +++ b/dev-support/test-patch.sh @@ -323,7 +323,7 @@ checkAuthor () { } ############################################################################### -### Check for tests in the patch +### Check for tests and their timeout in the patch checkTests () { echo "" echo "" @@ -357,6 +357,24 @@ checkTests () { JIRA_COMMENT="$JIRA_COMMENT {color:green}+1 tests included{color}. The patch appears to include $testReferences new or modified test files." + echo "" + echo "======================================================================" + echo "======================================================================" + echo " Checking if the tests have timeout assigned in this patch." + echo "======================================================================" + echo "======================================================================" + + nontimeoutTests=`cat $PATCH_DIR/patch | $AWK '{ printf "%s ", $0 }' | $GREP --extended-regex --count '[ ]*\+[ ]*((@Test[\+ ]*[A-Za-z]+)|([\+ ]*@Test[ \+]*\([ \+]*\)[\ ]*\+?[ ]*[A-Za-z]+)|([\+ ]*@Test[\+ ]*\(exception[ \+]*=[ \+]*[A-Z.a-z0-9A-Z ]*\)))'` + + if [[ $nontimeoutTests == 0 ]] ; then + JIRA_COMMENT="$JIRA_COMMENT + + {color:green}+1 tests included appear to have a timeout.{color}" + return 1 + fi + JIRA_COMMENT="$JIRA_COMMENT + + {color:red}-1 one of tests included doesn't have a timeout.{color}" return 0 } diff --git a/hadoop-common-project/hadoop-common/CHANGES.txt b/hadoop-common-project/hadoop-common/CHANGES.txt index bea151a7c5..b7627c8080 100644 --- a/hadoop-common-project/hadoop-common/CHANGES.txt +++ b/hadoop-common-project/hadoop-common/CHANGES.txt @@ -150,6 +150,9 @@ Trunk (Unreleased) HADOOP-9218 Document the Rpc-wrappers used internally (sanjay Radia) + HADOOP-9112. test-patch should -1 for @Tests without a timeout + (Surenkumar Nihalani via bobby) + BUG FIXES HADOOP-8419. Fixed GzipCode NPE reset for IBM JDK. (Yu Li via eyang)