Repository: oozie
Updated Branches:
  refs/heads/master 13bfd4949 -> 7f59c8769


OOZIE-3317 amend [build] Fix false positive precommit reports (kmarton via 
andras.piros)


Project: http://git-wip-us.apache.org/repos/asf/oozie/repo
Commit: http://git-wip-us.apache.org/repos/asf/oozie/commit/7f59c876
Tree: http://git-wip-us.apache.org/repos/asf/oozie/tree/7f59c876
Diff: http://git-wip-us.apache.org/repos/asf/oozie/diff/7f59c876

Branch: refs/heads/master
Commit: 7f59c87693ae4fb2e07077f2a5b749968ab804e4
Parents: 13bfd49
Author: Andras Piros <andras.pi...@cloudera.com>
Authored: Fri Sep 7 15:35:34 2018 +0200
Committer: Andras Piros <andras.pi...@cloudera.com>
Committed: Fri Sep 7 15:35:34 2018 +0200

----------------------------------------------------------------------
 bin/test-patch-20-tests | 9 +++++----
 release-log.txt         | 1 +
 2 files changed, 6 insertions(+), 4 deletions(-)
----------------------------------------------------------------------


http://git-wip-us.apache.org/repos/asf/oozie/blob/7f59c876/bin/test-patch-20-tests
----------------------------------------------------------------------
diff --git a/bin/test-patch-20-tests b/bin/test-patch-20-tests
index 848b53d..11dc827 100755
--- a/bin/test-patch-20-tests
+++ b/bin/test-patch-20-tests
@@ -49,6 +49,7 @@ parseArgs() {
       ;;
     --tempdir=*)
       TEMPDIR=${i#*=}
+      TESTS_OUT="${TEMPDIR}/${TASKNAME}.out"
       ;;
     --reportdir=*)
       REPORTDIR=${i#*=}
@@ -97,10 +98,10 @@ run_tests() {
         -Dtest.timeout=7200 \
         -Dsurefire.rerunFailingTestsCount=1 \
         ${MAVEN_OPTS}"
-  mvn test -fae | tee "${TEMPDIR}/${TASKNAME}.out" >> "$STDOUT"
+  mvn test -fae | tee "${TESTS_OUT}" >> "$STDOUT"
   local exitCode=${PIPESTATUS[0]}
 
-  grep -b1 -e "Run .: PASS" "${TEMPDIR}/${TASKNAME}.out" | grep Test | cut 
-d':' -f2 \
+  grep -b1 -e "Run .: PASS" "${TESTS_OUT}" | grep Test | cut -d':' -f2 \
   | awk '{print $1}' > "${TEMPDIR}/${TASKNAME}.flakies.out"
 
   if [ "${PIPESTATUS[0]}" -eq "0" ]; then
@@ -149,12 +150,12 @@ print_flakies_full() {
 generate_report() {
     failedTests=$(find . -name '*\.txt' | grep target/surefire-reports | xargs 
grep  "<<< FAILURE" | grep -v "Tests run:" | sed 's/.*\.txt\://' | sed 's/ 
.*//')
     testsWithError=$(find . -name '*\.txt' | grep target/surefire-reports | 
xargs grep  "<<< ERROR" | grep -v "Tests run:" | sed 's/.*\.txt\://' | sed 's/ 
.*//')
-    testsRun=$(grep "Tests run:" "${TEMPDIR}/${TASKNAME}.out" | grep -v " Time 
elapsed:" | awk '{print $4}' | sed 's/,//' | awk 'BEGIN {count=0} 
{count=count+$1} END {print count}')
+    testsRun=$(grep "Tests run:" "${TESTS_OUT}" | grep -v " Time elapsed:" | 
awk '{print $4}' | sed 's/,//' | awk 'BEGIN {count=0} {count=count+$1} END 
{print count}')
     testsFailed=$(count_test_result_type failures)
     testsErrors=$(count_test_result_type errors)
     hasFailures=$((testsFailed + testsErrors))
     testsExitCode=$(cat "${TEMPDIR}/${TASKNAME}.exitCode")
-    errors=$(grep -c '\[ERROR\]' "${REPORTDIR}"/${TASKNAME}.out)
+    errors=$(grep -c '\[ERROR\]' "${TESTS_OUT}")
 
     if [[ ${errors} -gt 0 && ${testsErrors} -eq 0 ]] ; then
         echo "{color:red}-1 ${TASKNAME}{color}"

http://git-wip-us.apache.org/repos/asf/oozie/blob/7f59c876/release-log.txt
----------------------------------------------------------------------
diff --git a/release-log.txt b/release-log.txt
index a16b3f9..371a60d 100644
--- a/release-log.txt
+++ b/release-log.txt
@@ -1,5 +1,6 @@
 -- Oozie 5.1.0 release (trunk - unreleased)
 
+OOZIE-3317 amend [build] Fix false positive precommit reports (kmarton via 
andras.piros)
 OOZIE-3160 PriorityDelayQueue put()/take() can cause significant CPU load due 
to busy waiting (pbacsko)
 OOZIE-2877 Git action (clayb, andras.piros via pbacsko, gezapeti)
 OOZIE-3061 Kill only those child jobs which are not already killed (matijhs 
via gezapeti, andras.piros)

Reply via email to