You are viewing a plain text version of this content. The canonical link for it is here.
Posted to commits@knox.apache.org by km...@apache.org on 2013/09/28 01:11:03 UTC

git commit: KNOX-169: Running all tests instead of just the tests in a module with changes.

Updated Branches:
  refs/heads/master 8a91cb472 -> 75c829edd


KNOX-169: Running all tests instead of just the tests in a module with changes.


Project: http://git-wip-us.apache.org/repos/asf/incubator-knox/repo
Commit: http://git-wip-us.apache.org/repos/asf/incubator-knox/commit/75c829ed
Tree: http://git-wip-us.apache.org/repos/asf/incubator-knox/tree/75c829ed
Diff: http://git-wip-us.apache.org/repos/asf/incubator-knox/diff/75c829ed

Branch: refs/heads/master
Commit: 75c829edd288845d220d6985696f15cef16eb5ef
Parents: 8a91cb4
Author: Kevin Minder <ke...@hortonworks.com>
Authored: Fri Sep 27 19:10:58 2013 -0400
Committer: Kevin Minder <ke...@hortonworks.com>
Committed: Fri Sep 27 19:10:58 2013 -0400

----------------------------------------------------------------------
 dev-support/test-patch.sh | 45 +++++++++++++++++++++++++-----------------
 1 file changed, 27 insertions(+), 18 deletions(-)
----------------------------------------------------------------------


http://git-wip-us.apache.org/repos/asf/incubator-knox/blob/75c829ed/dev-support/test-patch.sh
----------------------------------------------------------------------
diff --git a/dev-support/test-patch.sh b/dev-support/test-patch.sh
index 82c3190..d443344 100644
--- a/dev-support/test-patch.sh
+++ b/dev-support/test-patch.sh
@@ -193,7 +193,7 @@ checkout () {
   echo ""
   echo "======================================================================"
   echo "======================================================================"
-  echo "    Testing patch for ${defect}. "
+  echo "    Testing patch for ${defect}."
   echo "======================================================================"
   echo "======================================================================"
   echo ""
@@ -677,30 +677,39 @@ runTests () {
   echo ""
   echo "======================================================================"
   echo "======================================================================"
-  echo "    Running tests."
+  echo "    Running ALL tests."
   echo "======================================================================"
   echo "======================================================================"
   echo ""
   echo ""
 
   failed_tests=""
-  modules=$(findModules)
-  for module in $modules;
-  do
-    cd $module
-    echo "  Running tests in $module"
-    echo "  $MVN test -fn"
-    $MVN test -fn
-    module_failed_tests=`find . -name 'TEST*.xml' | xargs $GREP  -l -E "<failure|<error" | sed -e "s|.*target/munged/surefire-reports/TEST-|                  |g" | sed -e "s|\.xml||g"`
-    # With -fn mvn always exits with a 0 exit code.  Because of this we need to
-    # find the errors instead of using the exit code.  We assume that if the build
-    # failed a -1 is already given for that case
-    if [[ -n "$module_failed_tests" ]] ; then
-      failed_tests="${failed_tests}
+
+  # Run tests for all of the modules.
+  $MVN test -fn
+  module_failed_tests=`find . -name 'TEST*.xml' | xargs $GREP  -l -E "<failure|<error" | sed -e "s|.*target/munged/surefire-reports/TEST-|                  |g" | sed -e "s|\.xml||g"`
+  if [[ -n "$module_failed_tests" ]] ; then
+    failed_tests="${failed_tests}
 ${module_failed_tests}"
-    fi
-    cd -
-  done
+  fi
+
+#  modules=$(findModules)
+#  for module in $modules;
+#  do
+#    cd $module
+#    echo "  Running tests in $module"
+#    echo "  $MVN test -fn"
+#    $MVN test -fn
+#    module_failed_tests=`find . -name 'TEST*.xml' | xargs $GREP  -l -E "<failure|<error" | sed -e "s|.*target/munged/surefire-reports/TEST-|                  |g" | sed -e "s|\.xml||g"`
+#    # With -fn mvn always exits with a 0 exit code.  Because of this we need to
+#    # find the errors instead of using the exit code.  We assume that if the build
+#    # failed a -1 is already given for that case
+#    if [[ -n "$module_failed_tests" ]] ; then
+#      failed_tests="${failed_tests}
+#${module_failed_tests}"
+#    fi
+#    cd -
+#  done
   if [[ -n "$failed_tests" ]] ; then
     JIRA_COMMENT="$JIRA_COMMENT