Jelajahi Sumber

commit 0f244a086eba75bc051abcde8c49dbd192bcdfc0
Author: Konstantin Boudnik <cos@goodenter-lm.local>
Date: Fri Jan 22 15:18:04 2010 -0800

HADOOP-6506 from https://issues.apache.org/jira/secure/attachment/12431166/HADOOP-6506.patch

+++ b/YAHOO-CHANGES.txt
+ HADOOP-6506. Failing tests prevent the rest of test targets from
+ execution. (cos)
+


git-svn-id: https://svn.apache.org/repos/asf/hadoop/common/branches/branch-0.20-security-patches@1077119 13f79535-47bb-0310-9956-ffa450edef68

Owen O'Malley 14 tahun lalu
induk
melakukan
baf7432c91
1 mengubah file dengan 14 tambahan dan 4 penghapusan
  1. 14 4
      build.xml

+ 14 - 4
build.xml

@@ -857,9 +857,14 @@
         <fileset dir="${test.src.dir}" includes="**/${testcase}.java"/>
       </batchtest>
     </junit>
-    <fail if="tests.failed">Tests failed!</fail>
+    <antcall target="checkfailure"/>
   </target>   
 
+  <target name="checkfailure" if="tests.failed">
+    <touch file="${test.build.dir}/testsfailed"/>
+    <fail unless="continueOnFailure">Tests failed!</fail>
+  </target>
+
   <target name="test-contrib" depends="compile, compile-core-test" description="Run contrib unit tests">
     <subant target="test">
        <property name="version" value="${version}"/>
@@ -867,9 +872,14 @@
     </subant> 
   </target>
 	  
-  <target name="test" depends="test-core, test-contrib,
-    run-test-core-fault-inject"
-    description="Run core, contrib, fault injection tests">
+  <target name="test" description="Run core, contrib, fault injection tests">
+    <delete file="${test.build.dir}/testsfailed"/>
+    <property name="continueOnFailure" value="true"/>
+    <antcall target="test-core"/>
+    <antcall target="test-contrib"/>
+    <antcall target="run-test-core-fault-inject"/>
+    <available file="${test.build.dir}/testsfailed" property="testsfailed"/>
+    <fail if="testsfailed">Tests failed!</fail>
   </target>
 
   <!-- Run all unit tests, not just Test*, and use non-test configuration. -->