HBASE-17228 precommit grep -c ERROR may grab non errors I tested this by doing `cat /tmp/some_file_with_ERROR_combos|grep -c '\[ERROR\]'

Signed-off-by: Michael Stack <stack@apache.org>
This commit is contained in:
Michael Stack 2016-12-01 21:42:19 -08:00
parent 9c13219f0d
commit 8f8daafee0
1 changed files with 3 additions and 3 deletions

View File

@ -208,7 +208,7 @@ function hadoopcheck_rebuild
"${MAVEN}" clean install \ "${MAVEN}" clean install \
-DskipTests -DHBasePatchProcess \ -DskipTests -DHBasePatchProcess \
-Dhadoop-two.version="${hadoopver}" -Dhadoop-two.version="${hadoopver}"
count=$(${GREP} -c ERROR "${logfile}") count=$(${GREP} -c '\[ERROR\]' "${logfile}")
if [[ ${count} -gt 0 ]]; then if [[ ${count} -gt 0 ]]; then
add_vote_table -1 hadoopcheck "${BUILDMODEMSG} causes ${count} errors with Hadoop v${hadoopver}." add_vote_table -1 hadoopcheck "${BUILDMODEMSG} causes ${count} errors with Hadoop v${hadoopver}."
((result=result+1)) ((result=result+1))
@ -222,7 +222,7 @@ function hadoopcheck_rebuild
-DskipTests -DHBasePatchProcess \ -DskipTests -DHBasePatchProcess \
-Dhadoop-three.version="${hadoopver} \ -Dhadoop-three.version="${hadoopver} \
-Dhadoop.profile=3.0" -Dhadoop.profile=3.0"
count=$(${GREP} -c ERROR "${logfile}") count=$(${GREP} -c '\[ERROR\]' "${logfile}")
if [[ ${count} -gt 0 ]]; then if [[ ${count} -gt 0 ]]; then
add_vote_table -1 hadoopcheck "${BUILDMODEMSG} causes ${count} errors with Hadoop v${hadoopver}." add_vote_table -1 hadoopcheck "${BUILDMODEMSG} causes ${count} errors with Hadoop v${hadoopver}."
((result=result+1)) ((result=result+1))
@ -302,7 +302,7 @@ function hbaseprotoc_rebuild
fn=$(module_file_fragment "${module}") fn=$(module_file_fragment "${module}")
logfile="${PATCH_DIR}/patch-hbaseprotoc-${fn}.txt" logfile="${PATCH_DIR}/patch-hbaseprotoc-${fn}.txt"
count=$(${GREP} -c ERROR "${logfile}") count=$(${GREP} -c '\[ERROR\]' "${logfile}")
if [[ ${count} -gt 0 ]]; then if [[ ${count} -gt 0 ]]; then
module_status ${i} -1 "patch-hbaseprotoc-${fn}.txt" "Patch generated "\ module_status ${i} -1 "patch-hbaseprotoc-${fn}.txt" "Patch generated "\