Browse Source

Merge -c 1186548 from trunk to branch-0.23 to complete fix for HADOOP-7744.

git-svn-id: https://svn.apache.org/repos/asf/hadoop/common/branches/branch-0.23@1186549 13f79535-47bb-0310-9956-ffa450edef68
Arun Murthy 13 years ago
parent
commit
ca752e8dd8

+ 3 - 0
hadoop-common-project/hadoop-common/CHANGES.txt

@@ -659,6 +659,9 @@ Release 0.23.0 - Unreleased
     HADOOP-7755. Detect MapReduce PreCommit Trunk builds silently failing
     HADOOP-7755. Detect MapReduce PreCommit Trunk builds silently failing
     when running test-patch.sh. (Jonathan Eagles via tomwhite)
     when running test-patch.sh. (Jonathan Eagles via tomwhite)
 
 
+    HADOOP-7744. Ensure failed tests exit with proper error code. (Jonathan
+    Eagles via acmurthy) 
+
 Release 0.22.0 - Unreleased
 Release 0.22.0 - Unreleased
 
 
   INCOMPATIBLE CHANGES
   INCOMPATIBLE CHANGES

+ 4 - 1
hadoop-common-project/hadoop-common/src/test/java/org/apache/hadoop/test/CoreTestDriver.java

@@ -50,11 +50,14 @@ public class CoreTestDriver {
   }
   }
 
 
   public void run(String argv[]) {
   public void run(String argv[]) {
+    int exitCode = -1;
     try {
     try {
-      pgd.driver(argv);
+      exitCode = pgd.driver(argv);
     } catch(Throwable e) {
     } catch(Throwable e) {
       e.printStackTrace();
       e.printStackTrace();
     }
     }
+
+    System.exit(exitCode);
   }
   }
 
 
   public static void main(String argv[]){
   public static void main(String argv[]){