hadoop-hdfs-commits mailing list archives

Site index · List index
Message view « Date » · « Thread »
Top « Date » · « Thread »
From c..@apache.org
Subject svn commit: r829258 - in /hadoop/hdfs/trunk: CHANGES.txt build.xml
Date Fri, 23 Oct 2009 22:09:17 GMT
Author: cos
Date: Fri Oct 23 22:09:16 2009
New Revision: 829258

URL: http://svn.apache.org/viewvc?rev=829258&view=rev
Log:
HDFS-584. Fail the fault-inject build if any advices are mis-bound. Contributed by Konstantin
Boudnik

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

Modified: hadoop/hdfs/trunk/CHANGES.txt
URL: http://svn.apache.org/viewvc/hadoop/hdfs/trunk/CHANGES.txt?rev=829258&r1=829257&r2=829258&view=diff
==============================================================================
--- hadoop/hdfs/trunk/CHANGES.txt (original)
+++ hadoop/hdfs/trunk/CHANGES.txt Fri Oct 23 22:09:16 2009
@@ -311,6 +311,8 @@
 
     HDFS-616. Create functional tests for new design of the block report. (cos)
     
+    HDFS-584. Fail the fault-inject build if any advices are mis-bound. (cos)
+    
   BUG FIXES
 
     HDFS-76. Better error message to users when commands fail because of 

Modified: hadoop/hdfs/trunk/build.xml
URL: http://svn.apache.org/viewvc/hadoop/hdfs/trunk/build.xml?rev=829258&r1=829257&r2=829258&view=diff
==============================================================================
--- hadoop/hdfs/trunk/build.xml (original)
+++ hadoop/hdfs/trunk/build.xml Fri Oct 23 22:09:16 2009
@@ -307,6 +307,7 @@
   	Later on one can run 'ant jar-fault-inject' to create
   	Hadoop jar file with instrumented classes
   -->
+  <property name="compile-inject.output" value="${build-fi.dir}/compile-fi.log"/>
   <target name="compile-fault-inject" depends="compile-core, compile-hdfs-test">
     <!-- AspectJ task definition -->
     <taskdef
@@ -327,11 +328,26 @@
       deprecation="${javac.deprecation}">
       <classpath refid="test.classpath"/>
     </iajc>
+    <loadfile property="injection.failure" srcfile="${compile-inject.output}">
+      <filterchain>
+        <linecontainsregexp>
+          <regexp pattern='iajc.*warning'/>
+        </linecontainsregexp>
+      </filterchain>
+    </loadfile>
+    <fail if="injection.failure">
+      Broken binding of advises: ${line.separator}${injection.failure}
+    </fail>
     <echo message="Weaving of aspects is finished"/>
   </target>
 
-  <target name="injectfaults" description="Instrument HDFS classes with faults and other
AOP advices">
-    <subant buildpath="${basedir}" target="compile-fault-inject">
+  <target name="injectfaults"
+          description="Instrument HDFS classes with faults and other AOP advices">
+    <!--mkdir to prevent <subant> failure in case the folder has been removed-->
+    <mkdir dir="${build-fi.dir}"/>
+    <delete file="${compile-inject.output}"/>
+    <subant buildpath="${basedir}" target="compile-fault-inject"
+            output="${compile-inject.output}">
       <property name="build.dir" value="${build-fi.dir}"/>
     </subant>
   </target>



Mime
View raw message