hbase-commits mailing list archives

Site index · List index
Message view « Date » · « Thread »
Top « Date » · « Thread »
From te...@apache.org
Subject git commit: HBASE-11375 Validate compile-protobuf profile in test-patch.sh
Date Thu, 19 Jun 2014 23:46:39 GMT
Repository: hbase
Updated Branches:
  refs/heads/master b5db14328 -> 8c8d9d500


HBASE-11375 Validate compile-protobuf profile in test-patch.sh


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

Branch: refs/heads/master
Commit: 8c8d9d50085ddd31379c2b7319162ab472502f14
Parents: b5db143
Author: Ted Yu <tedyu@apache.org>
Authored: Thu Jun 19 23:46:22 2014 +0000
Committer: Ted Yu <tedyu@apache.org>
Committed: Thu Jun 19 23:46:22 2014 +0000

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


http://git-wip-us.apache.org/repos/asf/hbase/blob/8c8d9d50/dev-support/test-patch.sh
----------------------------------------------------------------------
diff --git a/dev-support/test-patch.sh b/dev-support/test-patch.sh
index 0fccef1..c42b843 100755
--- a/dev-support/test-patch.sh
+++ b/dev-support/test-patch.sh
@@ -350,6 +350,29 @@ checkCompilationErrors() {
 }
 
 ###############################################################################
+### Check there are no protoc compilation errors, passing a file to be parsed.
+checkProtocCompilationErrors() {
+  local file=$1
+  COMPILATION_ERROR=false
+  eval $(awk '/\[ERROR/ {print "COMPILATION_ERROR=true"}' $file)
+  if $COMPILATION_ERROR ; then
+    ERRORS=$($AWK '/\[ERROR/ { print $0 }' $file)
+    echo "======================================================================"
+    echo "There are Protoc compilation errors."
+    echo "======================================================================"
+    echo "$ERRORS"
+    JIRA_COMMENT="$JIRA_COMMENT
+
+    {color:red}-1 javac{color}.  The patch appears to cause mvn compile-protobuf profile
to fail.
+
+    Protoc Compilation errors resume:
+    $ERRORS
+    "
+    cleanupAndExit 1
+  fi
+}
+
+###############################################################################
 ### Attempt to apply the patch
 applyPatch () {
   echo ""
@@ -467,6 +490,27 @@ checkJavacWarnings () {
 }
 
 ###############################################################################
+checkProtocErrors () {
+  echo ""
+  echo ""
+  echo "======================================================================"
+  echo "======================================================================"
+  echo "    Determining whether there is patched protoc error."
+  echo "======================================================================"
+  echo "======================================================================"
+  echo ""
+  echo ""
+  echo "$MVN clean install -DskipTests -Pcompile-protobuf -X -D${PROJECT_NAME}PatchProcess
> $PATCH_DIR/patchProtocErrors.txt 2>&1"
+  export MAVEN_OPTS="${MAVEN_OPTS}"
+  $MVN clean install -DskipTests -Pcompile-protobuf -X -D${PROJECT_NAME}PatchProcess  >
$PATCH_DIR/patchProtocErrors.txt 2>&1
+  checkProtocCompilationErrors $PATCH_DIR/patchProtocErrors.txt
+  JIRA_COMMENT="$JIRA_COMMENT
+
+    {color:green}+1 javac{color}.  The applied patch does not increase the total number of
javac compiler warnings."
+  return 0
+}
+
+###############################################################################
 ### Check there are no changes in the number of release audit (RAT) warnings
 checkReleaseAuditWarnings () {
   echo ""
@@ -859,6 +903,8 @@ checkAntiPatterns
 (( RESULT = RESULT + $? ))
 checkJavacWarnings
 (( RESULT = RESULT + $? ))
+checkProtocErrors
+(( RESULT = RESULT + $? ))
 checkJavadocWarnings
 (( RESULT = RESULT + $? ))
 ### Checkstyle not implemented yet


Mime
View raw message