Skip to content

Commit 560d017

Browse files
authored
HDDS-12500. Do not skip JUnit tests in post-commit runs (apache#8024)
1 parent 273a627 commit 560d017

2 files changed

Lines changed: 9 additions & 7 deletions

File tree

hadoop-ozone/dev-support/checks/_post_process.sh

Lines changed: 4 additions & 4 deletions
Original file line numberDiff line numberDiff line change
@@ -26,13 +26,13 @@
2626
# - $REPORT_FILE should be defined
2727
# - Maven output should be saved in $REPORT_DIR/output.log
2828

29-
# script failed, but report file is empty (does not reflect failure)
30-
if [[ ${rc} -ne 0 ]] && [[ ! -s "${REPORT_FILE}" ]]; then
31-
# do we know what to look for?
29+
if [[ ! -s "${REPORT_FILE}" ]]; then
30+
# check if there are errors in the log
3231
if [[ -n "${ERROR_PATTERN:-}" ]]; then
3332
grep -m25 "${ERROR_PATTERN}" "${REPORT_DIR}/output.log" > "${REPORT_FILE}"
3433
fi
35-
if [[ ! -s "${REPORT_FILE}" ]]; then
34+
# script failed, but report file is empty (does not reflect failure)
35+
if [[ ${rc} -ne 0 ]] && [[ ! -s "${REPORT_FILE}" ]]; then
3636
echo "Unknown failure, check output.log" > "${REPORT_FILE}"
3737
fi
3838
fi

hadoop-ozone/dev-support/checks/junit.sh

Lines changed: 5 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -40,7 +40,7 @@ fi
4040
if [[ "${FAIL_FAST}" == "true" ]]; then
4141
MAVEN_OPTIONS="${MAVEN_OPTIONS} --fail-fast -Dsurefire.skipAfterFailureCount=1"
4242
else
43-
MAVEN_OPTIONS="${MAVEN_OPTIONS} --fail-at-end"
43+
MAVEN_OPTIONS="${MAVEN_OPTIONS} --fail-never"
4444
fi
4545

4646
# apply module access args (for Java 9+)
@@ -50,8 +50,10 @@ if [[ -f hadoop-ozone/dist/src/shell/ozone/ozone-functions.sh ]]; then
5050
ozone_java_setup
5151
fi
5252

53+
mvn ${MAVEN_OPTIONS} clean
54+
5355
if [[ ${ITERATIONS} -gt 1 ]] && [[ ${OZONE_REPO_CACHED} == "false" ]]; then
54-
mvn ${MAVEN_OPTIONS} -DskipTests clean install
56+
mvn ${MAVEN_OPTIONS} -DskipTests install
5557
fi
5658

5759
REPORT_DIR=${OUTPUT_DIR:-"$DIR/../../../target/${CHECK}"}
@@ -105,5 +107,5 @@ if [[ "${OZONE_WITH_COVERAGE}" == "true" ]]; then
105107
mvn -B -N jacoco:merge -Djacoco.destFile=$REPORT_DIR/jacoco-combined.exec -Dscan=false
106108
fi
107109

108-
ERROR_PATTERN="\[ERROR\]"
110+
ERROR_PATTERN="BUILD FAILURE"
109111
source "${DIR}/_post_process.sh"

0 commit comments

Comments
 (0)