HBASE-11375 Validate compile-protobuf profile in test-patch.sh
This commit is contained in:
parent
b5db143280
commit
8c8d9d5008
|
@ -349,6 +349,29 @@ checkCompilationErrors() {
|
||||||
fi
|
fi
|
||||||
}
|
}
|
||||||
|
|
||||||
|
###############################################################################
|
||||||
|
### 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
|
### Attempt to apply the patch
|
||||||
applyPatch () {
|
applyPatch () {
|
||||||
|
@ -466,6 +489,27 @@ checkJavacWarnings () {
|
||||||
return 0
|
return 0
|
||||||
}
|
}
|
||||||
|
|
||||||
|
###############################################################################
|
||||||
|
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
|
### Check there are no changes in the number of release audit (RAT) warnings
|
||||||
checkReleaseAuditWarnings () {
|
checkReleaseAuditWarnings () {
|
||||||
|
@ -859,6 +903,8 @@ checkAntiPatterns
|
||||||
(( RESULT = RESULT + $? ))
|
(( RESULT = RESULT + $? ))
|
||||||
checkJavacWarnings
|
checkJavacWarnings
|
||||||
(( RESULT = RESULT + $? ))
|
(( RESULT = RESULT + $? ))
|
||||||
|
checkProtocErrors
|
||||||
|
(( RESULT = RESULT + $? ))
|
||||||
checkJavadocWarnings
|
checkJavadocWarnings
|
||||||
(( RESULT = RESULT + $? ))
|
(( RESULT = RESULT + $? ))
|
||||||
### Checkstyle not implemented yet
|
### Checkstyle not implemented yet
|
||||||
|
|
Loading…
Reference in New Issue