|
@@ -240,15 +240,6 @@ setup () {
|
|
|
cleanupAndExit 0
|
|
|
fi
|
|
|
fi
|
|
|
- . $BASEDIR/dev-support/test-patch.properties
|
|
|
- ### exit if warnings are NOT defined in the properties file
|
|
|
- if [ -z "$OK_FINDBUGS_WARNINGS" ] || [[ -z "$OK_JAVADOC_WARNINGS" ]] || [[ -z $OK_RELEASEAUDIT_WARNINGS ]]; then
|
|
|
- echo "Please define the following properties in test-patch.properties file"
|
|
|
- echo "OK_FINDBUGS_WARNINGS"
|
|
|
- echo "OK_RELEASEAUDIT_WARNINGS"
|
|
|
- echo "OK_JAVADOC_WARNINGS"
|
|
|
- cleanupAndExit 1
|
|
|
- fi
|
|
|
echo ""
|
|
|
echo ""
|
|
|
echo "======================================================================"
|
|
@@ -400,8 +391,10 @@ checkJavadocWarnings () {
|
|
|
echo ""
|
|
|
echo "There appear to be $javadocWarnings javadoc warnings generated by the patched build."
|
|
|
|
|
|
+ #There are 6 warnings that are caused by things that are caused by using sun internal APIs.
|
|
|
+ OK_JAVADOC_WARNINGS=6;
|
|
|
### if current warnings greater than OK_JAVADOC_WARNINGS
|
|
|
- if [[ $javadocWarnings -gt $OK_JAVADOC_WARNINGS ]] ; then
|
|
|
+ if [[ $javadocWarnings -ne $OK_JAVADOC_WARNINGS ]] ; then
|
|
|
JIRA_COMMENT="$JIRA_COMMENT
|
|
|
|
|
|
-1 javadoc. The javadoc tool appears to have generated `expr $(($javadocWarnings-$OK_JAVADOC_WARNINGS))` warning messages."
|
|
@@ -481,12 +474,12 @@ checkReleaseAuditWarnings () {
|
|
|
patchReleaseAuditWarnings=`$GREP -c '\!?????' $PATCH_DIR/patchReleaseAuditWarnings.txt`
|
|
|
echo ""
|
|
|
echo ""
|
|
|
- echo "There appear to be $OK_RELEASEAUDIT_WARNINGS release audit warnings before the patch and $patchReleaseAuditWarnings release audit warnings after applying the patch."
|
|
|
- if [[ $patchReleaseAuditWarnings != "" && $OK_RELEASEAUDIT_WARNINGS != "" ]] ; then
|
|
|
- if [[ $patchReleaseAuditWarnings -gt $OK_RELEASEAUDIT_WARNINGS ]] ; then
|
|
|
+ echo "There appear to be $patchReleaseAuditWarnings release audit warnings after applying the patch."
|
|
|
+ if [[ $patchReleaseAuditWarnings != "" ]] ; then
|
|
|
+ if [[ $patchReleaseAuditWarnings -gt 0 ]] ; then
|
|
|
JIRA_COMMENT="$JIRA_COMMENT
|
|
|
|
|
|
- -1 release audit. The applied patch generated $patchReleaseAuditWarnings release audit warnings (more than the trunk's current $OK_RELEASEAUDIT_WARNINGS warnings)."
|
|
|
+ -1 release audit. The applied patch generated $patchReleaseAuditWarnings release audit warnings."
|
|
|
$GREP '\!?????' $PATCH_DIR/patchReleaseAuditWarnings.txt > $PATCH_DIR/patchReleaseAuditProblems.txt
|
|
|
echo "Lines that start with ????? in the release audit report indicate files that do not have an Apache license header." >> $PATCH_DIR/patchReleaseAuditProblems.txt
|
|
|
JIRA_COMMENT_FOOTER="Release audit warnings: $BUILD_URL/artifact/trunk/patchprocess/patchReleaseAuditProblems.txt
|
|
@@ -595,11 +588,10 @@ $JIRA_COMMENT_FOOTER"
|
|
|
fi
|
|
|
done
|
|
|
|
|
|
- ### if current warnings greater than OK_FINDBUGS_WARNINGS
|
|
|
- if [[ $findbugsWarnings -gt $OK_FINDBUGS_WARNINGS ]] ; then
|
|
|
+ if [[ $findbugsWarnings -gt 0 ]] ; then
|
|
|
JIRA_COMMENT="$JIRA_COMMENT
|
|
|
|
|
|
- -1 findbugs. The patch appears to introduce `expr $(($findbugsWarnings-$OK_FINDBUGS_WARNINGS))` new Findbugs (version ${findbugs_version}) warnings."
|
|
|
+ -1 findbugs. The patch appears to introduce $findbugsWarnings new Findbugs (version ${findbugs_version}) warnings."
|
|
|
return 1
|
|
|
fi
|
|
|
JIRA_COMMENT="$JIRA_COMMENT
|