From dedbd19bea302d49ca7eed916b1452c7f080ed43 Mon Sep 17 00:00:00 2001 From: Kihwal Lee Date: Mon, 12 Aug 2013 17:03:36 +0000 Subject: [PATCH] HADOOP-9583. test-patch gives +1 despite build failure when running tests. Contributed by Jason Lowe. git-svn-id: https://svn.apache.org/repos/asf/hadoop/common/trunk@1513200 13f79535-47bb-0310-9956-ffa450edef68 --- dev-support/test-patch.sh | 46 +++++++++++++++---- .../hadoop-common/CHANGES.txt | 3 ++ 2 files changed, 41 insertions(+), 8 deletions(-) diff --git a/dev-support/test-patch.sh b/dev-support/test-patch.sh index 9bd4eb5820..cbb6b03987 100755 --- a/dev-support/test-patch.sh +++ b/dev-support/test-patch.sh @@ -731,32 +731,62 @@ of hadoop-common prior to running the unit tests in $ordered_modules" fi fi fi + failed_test_builds="" + test_timeouts="" for module in $ordered_modules; do cd $module + module_suffix=`basename ${module}` + test_logfile=$PATCH_DIR/testrun_${module_suffix}.txt echo " Running tests in $module" echo " $MVN clean install -fn $NATIVE_PROFILE $REQUIRE_TEST_LIB_HADOOP -D${PROJECT_NAME}PatchProcess" - $MVN clean install -fn $NATIVE_PROFILE $REQUIRE_TEST_LIB_HADOOP -D${PROJECT_NAME}PatchProcess + $MVN clean install -fae $NATIVE_PROFILE $REQUIRE_TEST_LIB_HADOOP -D${PROJECT_NAME}PatchProcess > $test_logfile 2>&1 + test_build_result=$? + cat $test_logfile + module_test_timeouts=`$AWK '/^Running / { if (last) { print last } last=$2 } /^Tests run: / { last="" }' $test_logfile` + if [[ -n "$module_test_timeouts" ]] ; then + test_timeouts="$test_timeouts +$module_test_timeouts" + fi module_failed_tests=`find . -name 'TEST*.xml' | xargs $GREP -l -E "