You are viewing a plain text version of this content. The canonical link for it is here.
Posted to common-commits@hadoop.apache.org by sh...@apache.org on 2009/05/15 14:27:24 UTC

svn commit: r775103 - in /hadoop/core/trunk: CHANGES.txt build.xml

Author: sharad
Date: Fri May 15 12:27:24 2009
New Revision: 775103

URL: http://svn.apache.org/viewvc?rev=775103&view=rev
Log:
HADOOP-5845. Build successful despite test failure on test-core target.

Modified:
    hadoop/core/trunk/CHANGES.txt
    hadoop/core/trunk/build.xml

Modified: hadoop/core/trunk/CHANGES.txt
URL: http://svn.apache.org/viewvc/hadoop/core/trunk/CHANGES.txt?rev=775103&r1=775102&r2=775103&view=diff
==============================================================================
--- hadoop/core/trunk/CHANGES.txt (original)
+++ hadoop/core/trunk/CHANGES.txt Fri May 15 12:27:24 2009
@@ -594,6 +594,9 @@
     HADOOP-5842.  Fix a few javac warnings under packages fs and util.
     (Hairong Kuang via szetszwo)
 
+    HADOOP-5845. Build successful despite test failure on test-core target.
+    (sharad)
+
 Release 0.20.1 - Unreleased
 
   INCOMPATIBLE CHANGES

Modified: hadoop/core/trunk/build.xml
URL: http://svn.apache.org/viewvc/hadoop/core/trunk/build.xml?rev=775103&r1=775102&r2=775103&view=diff
==============================================================================
--- hadoop/core/trunk/build.xml (original)
+++ hadoop/core/trunk/build.xml Fri May 15 12:27:24 2009
@@ -882,7 +882,7 @@
         <fileset dir="${test.src.dir}/core" includes="**/${testcase}.java"/>
       </batchtest>
     </junit>
-  	<fail if="tests.failed" unless="continueOnFailure">Tests failed!</fail>
+    <antcall target="checkfailure"/>
   </target>   
 
   <target name="run-test-hdfs" depends="compile-hdfs-test" description="Run hdfs unit tests">
@@ -925,7 +925,7 @@
         <fileset dir="${test.src.dir}/hdfs" includes="**/${testcase}.java"/>
       </batchtest>
     </junit>
-    <fail if="tests.failed" unless="continueOnFailure">Tests failed!</fail>
+    <antcall target="checkfailure"/>
   </target>  
 
   <target name="run-test-mapred" depends="compile-mapred-test" description="Run mapred unit tests">
@@ -971,7 +971,7 @@
         <fileset dir="${test.src.dir}/mapred" includes="**/${testcase}.java"/>
       </batchtest>
     </junit>
-    <fail if="tests.failed" unless="continueOnFailure">Tests failed!</fail>
+    <antcall target="checkfailure"/>
   </target> 
 
   <target name="run-test-hdfs-with-mr" depends="compile-hdfs-with-mr-test" description="Run hdfs unit tests that require mapred">
@@ -1015,9 +1015,14 @@
         <fileset dir="${test.src.dir}/hdfs-with-mr" includes="**/${testcase}.java"/>
       </batchtest>
     </junit>
-    <fail if="tests.failed" unless="continueOnFailure">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-hdfs-with-mr-test" description="Run contrib unit tests">
     <subant target="test">
        <property name="version" value="${version}"/>
@@ -1027,22 +1032,14 @@
   </target>
 
   <target name="test-core" description="Run core, hdfs and mapred unit tests">
-    <subant target="run-test-core">
-      <property name="continueOnFailure" value="true"/>
-      <fileset file="${basedir}/build.xml"/>
-     </subant>
-    <subant target="run-test-hdfs">
-      <property name="continueOnFailure" value="true"/>
-      <fileset file="${basedir}/build.xml"/>
-     </subant>
-    <subant target="run-test-mapred">
-      <property name="continueOnFailure" value="true"/>
-      <fileset file="${basedir}/build.xml"/>
-     </subant>
-    <subant target="run-test-hdfs-with-mr">
-      <property name="continueOnFailure" value="true"/>
-      <fileset file="${basedir}/build.xml"/>
-     </subant>
+    <delete file="${test.build.dir}/testsfailed"/>
+    <property name="continueOnFailure" value="true"/>
+    <antcall target="run-test-core"/>
+    <antcall target="run-test-hdfs"/>
+    <antcall target="run-test-mapred"/>
+    <antcall target="run-test-hdfs-with-mr"/>
+    <available file="${test.build.dir}/testsfailed" property="testsfailed"/>
+    <fail if="testsfailed">Tests failed!</fail>
   </target>
 
   <target name="test" depends="test-c++-libhdfs, jar-test, test-core" description="Run all unit tests">