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 co...@apache.org on 2010/05/15 02:20:42 UTC

svn commit: r944531 - in /hadoop/common/branches/branch-0.21: ./ ivy/ src/contrib/ec2/ src/docs/ src/java/ src/test/ src/test/aop/build/ src/test/core/ src/test/system/ src/test/system/aop/ src/test/system/aop/org/ src/test/system/aop/org/apache/ src/t...

Author: cos
Date: Sat May 15 00:20:41 2010
New Revision: 944531

URL: http://svn.apache.org/viewvc?rev=944531&view=rev
Log:
HADOOP-6332. snv merge -m 944521 from trunk

Added:
    hadoop/common/branches/branch-0.21/ivy/hadoop-core-system-template.xml
      - copied unchanged from r944521, hadoop/common/trunk/ivy/hadoop-core-system-template.xml
    hadoop/common/branches/branch-0.21/ivy/hadoop-core-system.pom
      - copied unchanged from r944521, hadoop/common/trunk/ivy/hadoop-core-system.pom
    hadoop/common/branches/branch-0.21/ivy/hadoop-core-system.xml
      - copied unchanged from r944521, hadoop/common/trunk/ivy/hadoop-core-system.xml
    hadoop/common/branches/branch-0.21/src/test/all-tests
      - copied unchanged from r944521, hadoop/common/trunk/src/test/all-tests
    hadoop/common/branches/branch-0.21/src/test/system/
      - copied from r944521, hadoop/common/trunk/src/test/system/
    hadoop/common/branches/branch-0.21/src/test/system/aop/
      - copied from r944521, hadoop/common/trunk/src/test/system/aop/
    hadoop/common/branches/branch-0.21/src/test/system/aop/org/
      - copied from r944521, hadoop/common/trunk/src/test/system/aop/org/
    hadoop/common/branches/branch-0.21/src/test/system/aop/org/apache/
      - copied from r944521, hadoop/common/trunk/src/test/system/aop/org/apache/
    hadoop/common/branches/branch-0.21/src/test/system/aop/org/apache/hadoop/
      - copied from r944521, hadoop/common/trunk/src/test/system/aop/org/apache/hadoop/
    hadoop/common/branches/branch-0.21/src/test/system/aop/org/apache/hadoop/test/
      - copied from r944521, hadoop/common/trunk/src/test/system/aop/org/apache/hadoop/test/
    hadoop/common/branches/branch-0.21/src/test/system/aop/org/apache/hadoop/test/system/
      - copied from r944521, hadoop/common/trunk/src/test/system/aop/org/apache/hadoop/test/system/
    hadoop/common/branches/branch-0.21/src/test/system/aop/org/apache/hadoop/test/system/DaemonProtocolAspect.aj
      - copied unchanged from r944521, hadoop/common/trunk/src/test/system/aop/org/apache/hadoop/test/system/DaemonProtocolAspect.aj
    hadoop/common/branches/branch-0.21/src/test/system/c++/
      - copied from r944521, hadoop/common/trunk/src/test/system/c++/
    hadoop/common/branches/branch-0.21/src/test/system/c++/runAs/
      - copied from r944521, hadoop/common/trunk/src/test/system/c++/runAs/
    hadoop/common/branches/branch-0.21/src/test/system/c++/runAs/Makefile.in
      - copied unchanged from r944521, hadoop/common/trunk/src/test/system/c++/runAs/Makefile.in
    hadoop/common/branches/branch-0.21/src/test/system/c++/runAs/configure
      - copied unchanged from r944521, hadoop/common/trunk/src/test/system/c++/runAs/configure
    hadoop/common/branches/branch-0.21/src/test/system/c++/runAs/configure.ac
      - copied unchanged from r944521, hadoop/common/trunk/src/test/system/c++/runAs/configure.ac
    hadoop/common/branches/branch-0.21/src/test/system/c++/runAs/main.c
      - copied unchanged from r944521, hadoop/common/trunk/src/test/system/c++/runAs/main.c
    hadoop/common/branches/branch-0.21/src/test/system/c++/runAs/runAs.c
      - copied unchanged from r944521, hadoop/common/trunk/src/test/system/c++/runAs/runAs.c
    hadoop/common/branches/branch-0.21/src/test/system/c++/runAs/runAs.h.in
      - copied unchanged from r944521, hadoop/common/trunk/src/test/system/c++/runAs/runAs.h.in
    hadoop/common/branches/branch-0.21/src/test/system/conf/
      - copied from r944521, hadoop/common/trunk/src/test/system/conf/
    hadoop/common/branches/branch-0.21/src/test/system/conf/hadoop-policy-system-test.xml
      - copied unchanged from r944521, hadoop/common/trunk/src/test/system/conf/hadoop-policy-system-test.xml
    hadoop/common/branches/branch-0.21/src/test/system/java/
      - copied from r944521, hadoop/common/trunk/src/test/system/java/
    hadoop/common/branches/branch-0.21/src/test/system/java/org/
      - copied from r944521, hadoop/common/trunk/src/test/system/java/org/
    hadoop/common/branches/branch-0.21/src/test/system/java/org/apache/
      - copied from r944521, hadoop/common/trunk/src/test/system/java/org/apache/
    hadoop/common/branches/branch-0.21/src/test/system/java/org/apache/hadoop/
      - copied from r944521, hadoop/common/trunk/src/test/system/java/org/apache/hadoop/
    hadoop/common/branches/branch-0.21/src/test/system/java/org/apache/hadoop/test/
      - copied from r944521, hadoop/common/trunk/src/test/system/java/org/apache/hadoop/test/
    hadoop/common/branches/branch-0.21/src/test/system/java/org/apache/hadoop/test/system/
      - copied from r944521, hadoop/common/trunk/src/test/system/java/org/apache/hadoop/test/system/
    hadoop/common/branches/branch-0.21/src/test/system/java/org/apache/hadoop/test/system/AbstractDaemonClient.java
      - copied unchanged from r944521, hadoop/common/trunk/src/test/system/java/org/apache/hadoop/test/system/AbstractDaemonClient.java
    hadoop/common/branches/branch-0.21/src/test/system/java/org/apache/hadoop/test/system/AbstractDaemonCluster.java
      - copied unchanged from r944521, hadoop/common/trunk/src/test/system/java/org/apache/hadoop/test/system/AbstractDaemonCluster.java
    hadoop/common/branches/branch-0.21/src/test/system/java/org/apache/hadoop/test/system/ControlAction.java
      - copied unchanged from r944521, hadoop/common/trunk/src/test/system/java/org/apache/hadoop/test/system/ControlAction.java
    hadoop/common/branches/branch-0.21/src/test/system/java/org/apache/hadoop/test/system/DaemonProtocol.java
      - copied unchanged from r944521, hadoop/common/trunk/src/test/system/java/org/apache/hadoop/test/system/DaemonProtocol.java
    hadoop/common/branches/branch-0.21/src/test/system/java/org/apache/hadoop/test/system/ProcessInfo.java
      - copied unchanged from r944521, hadoop/common/trunk/src/test/system/java/org/apache/hadoop/test/system/ProcessInfo.java
    hadoop/common/branches/branch-0.21/src/test/system/java/org/apache/hadoop/test/system/ProcessInfoImpl.java
      - copied unchanged from r944521, hadoop/common/trunk/src/test/system/java/org/apache/hadoop/test/system/ProcessInfoImpl.java
    hadoop/common/branches/branch-0.21/src/test/system/java/org/apache/hadoop/test/system/process/
      - copied from r944521, hadoop/common/trunk/src/test/system/java/org/apache/hadoop/test/system/process/
    hadoop/common/branches/branch-0.21/src/test/system/java/org/apache/hadoop/test/system/process/ClusterProcessManager.java
      - copied unchanged from r944521, hadoop/common/trunk/src/test/system/java/org/apache/hadoop/test/system/process/ClusterProcessManager.java
    hadoop/common/branches/branch-0.21/src/test/system/java/org/apache/hadoop/test/system/process/HadoopDaemonRemoteCluster.java
      - copied unchanged from r944521, hadoop/common/trunk/src/test/system/java/org/apache/hadoop/test/system/process/HadoopDaemonRemoteCluster.java
    hadoop/common/branches/branch-0.21/src/test/system/java/org/apache/hadoop/test/system/process/MultiUserHadoopDaemonRemoteCluster.java
      - copied unchanged from r944521, hadoop/common/trunk/src/test/system/java/org/apache/hadoop/test/system/process/MultiUserHadoopDaemonRemoteCluster.java
    hadoop/common/branches/branch-0.21/src/test/system/java/org/apache/hadoop/test/system/process/RemoteProcess.java
      - copied unchanged from r944521, hadoop/common/trunk/src/test/system/java/org/apache/hadoop/test/system/process/RemoteProcess.java
    hadoop/common/branches/branch-0.21/src/test/system/scripts/
      - copied from r944521, hadoop/common/trunk/src/test/system/scripts/
    hadoop/common/branches/branch-0.21/src/test/system/scripts/pushConfig.sh
      - copied unchanged from r944521, hadoop/common/trunk/src/test/system/scripts/pushConfig.sh
Modified:
    hadoop/common/branches/branch-0.21/   (props changed)
    hadoop/common/branches/branch-0.21/CHANGES.txt   (contents, props changed)
    hadoop/common/branches/branch-0.21/build.xml
    hadoop/common/branches/branch-0.21/src/contrib/ec2/   (props changed)
    hadoop/common/branches/branch-0.21/src/docs/   (props changed)
    hadoop/common/branches/branch-0.21/src/java/   (props changed)
    hadoop/common/branches/branch-0.21/src/test/aop/build/aop.xml
    hadoop/common/branches/branch-0.21/src/test/core/   (props changed)

Propchange: hadoop/common/branches/branch-0.21/
------------------------------------------------------------------------------
--- svn:mergeinfo (original)
+++ svn:mergeinfo Sat May 15 00:20:41 2010
@@ -1 +1,2 @@
+/hadoop/common/trunk:944521
 /hadoop/core/branches/branch-0.19/core:713112

Modified: hadoop/common/branches/branch-0.21/CHANGES.txt
URL: http://svn.apache.org/viewvc/hadoop/common/branches/branch-0.21/CHANGES.txt?rev=944531&r1=944530&r2=944531&view=diff
==============================================================================
--- hadoop/common/branches/branch-0.21/CHANGES.txt (original)
+++ hadoop/common/branches/branch-0.21/CHANGES.txt Sat May 15 00:20:41 2010
@@ -102,6 +102,9 @@ Release 0.21.0 - Unreleased
 
   NEW FEATURES
 
+    HADOOP-6332. Large-scale Automated Test Framework. (sharad, Sreekanth
+    Ramakrishnan, at all via cos)
+
     HADOOP-4268. Change fsck to use ClientProtocol methods so that the
     corresponding permission requirement for running the ClientProtocol
     methods will be enforced.  (szetszwo)

Propchange: hadoop/common/branches/branch-0.21/CHANGES.txt
------------------------------------------------------------------------------
--- svn:mergeinfo (original)
+++ svn:mergeinfo Sat May 15 00:20:41 2010
@@ -1,3 +1,4 @@
+/hadoop/common/trunk/CHANGES.txt:944521
 /hadoop/core/branches/branch-0.18/CHANGES.txt:727226
 /hadoop/core/branches/branch-0.19/CHANGES.txt:713112
 /hadoop/core/trunk/CHANGES.txt:776175-785643,785929-786278

Modified: hadoop/common/branches/branch-0.21/build.xml
URL: http://svn.apache.org/viewvc/hadoop/common/branches/branch-0.21/build.xml?rev=944531&r1=944530&r2=944531&view=diff
==============================================================================
--- hadoop/common/branches/branch-0.21/build.xml (original)
+++ hadoop/common/branches/branch-0.21/build.xml Sat May 15 00:20:41 2010
@@ -92,6 +92,7 @@
 
   <property name="test.core.build.classes" value="${test.build.dir}/core/classes"/>
 
+  <property name="test.all.tests.file" value="${test.src.dir}/all-tests"/>
 
   <property name="javadoc.link.java"
 	    value="http://java.sun.com/javase/6/docs/api/"/>
@@ -565,6 +566,7 @@
     description="Make hadoop-fi.jar">
     <macro-jar-fault-inject
       target.name="jar"
+      build.dir="${build-fi.dir}"
       jar.final.name="final.name"
       jar.final.value="${final.name}-fi" />
   </target>
@@ -618,71 +620,96 @@
   <!-- ================================================================== -->
   <!-- Run unit tests                                                     --> 
   <!-- ================================================================== -->
-  <target name="run-test-core" depends="compile-core-test" description="Run core unit tests">
+  <macrodef name="macro-test-runner">
+    <attribute name="test.file" />
+    <attribute name="classpath" />
+    <attribute name="test.dir" />
+    <attribute name="fileset.dir" />
+    <attribute name="hadoop.conf.dir.deployed" default="" />
+    <sequential>
+      <delete file="${test.build.dir}/testsfailed"/>
+      <delete dir="@{test.dir}/data" />
+      <mkdir dir="@{test.dir}/data" />
+      <delete dir="@{test.dir}/logs" />
+      <mkdir dir="@{test.dir}/logs" />
+      <copy file="${test.src.dir}/hadoop-policy.xml"
+            todir="@{test.dir}/extraconf" />
+      <copy file="${test.src.dir}/fi-site.xml"
+            todir="@{test.dir}/extraconf" />
+      <junit showoutput="${test.output}"
+             printsummary="${test.junit.printsummary}"
+             haltonfailure="${test.junit.haltonfailure}"
+             fork="yes"
+             forkmode="${test.junit.fork.mode}"
+             maxmemory="${test.junit.maxmemory}"
+             dir="${basedir}"
+             timeout="${test.timeout}"
+             errorProperty="tests.failed"
+             failureProperty="tests.failed">
+        <jvmarg value="-ea" />
+        <sysproperty key="test.build.data" value="${test.build.data}" />
+        <sysproperty key="test.cache.data" value="${test.cache.data}" />
+        <sysproperty key="test.debug.data" value="${test.debug.data}" />
+        <sysproperty key="hadoop.log.dir" value="${test.log.dir}" />
+        <sysproperty key="test.src.dir" value="${test.src.dir}" />
+        <sysproperty key="test.build.extraconf" value="@{test.dir}/extraconf" />
+        <sysproperty key="hadoop.policy.file" value="hadoop-policy.xml" />
+        <sysproperty key="java.library.path"
+          value="${build.native}/lib:${lib.dir}/native/${build.platform}"/>
+        <sysproperty key="install.c++.examples" value="${install.c++.examples}"/>
+        <!-- set io.compression.codec.lzo.class in the child jvm only if it is set -->
+        <syspropertyset dynamic="no">
+          <propertyref name="io.compression.codec.lzo.class"/>
+        </syspropertyset>
+        <!-- set compile.c++ in the child jvm only if it is set -->
+        <syspropertyset dynamic="no">
+          <propertyref name="compile.c++"/>
+        </syspropertyset>
+        <classpath refid="@{classpath}" />
+        <!-- Pass probability specifications to the spawn JVM -->
+        <syspropertyset id="FaultProbabilityProperties">
+          <propertyref regex="fi.*"/>
+        </syspropertyset>
+        <sysproperty key="test.system.hdrc.deployed.hadoopconfdir"
+                     value="@{hadoop.conf.dir.deployed}" />
+        <formatter type="${test.junit.output.format}" />
+        <batchtest todir="@{test.dir}" if="tests.notestcase">
+          <fileset dir="@{fileset.dir}/core"
+                   excludes="**/${test.exclude}.java aop/** system/**">
+             <patternset>
+               <includesfile name="@{test.file}"/>
+             </patternset>
+         </fileset>
+        </batchtest>
+        <batchtest todir="${test.build.dir}" if="tests.notestcase.fi">
+          <fileset dir="@{fileset.dir}/aop"
+                   includes="**/${test.include}.java"
+                   excludes="**/${test.exclude}.java" />
+         </batchtest>
+         <batchtest todir="@{test.dir}" if="tests.testcase">
+           <fileset dir="@{fileset.dir}/core"
+             includes="**/${testcase}.java" excludes="aop/** system/**"/>
+         </batchtest>
+         <batchtest todir="${test.build.dir}" if="tests.testcase.fi">
+           <fileset dir="@{fileset.dir}/aop" includes="**/${testcase}.java" />
+         </batchtest>
+         <!--The following batch is for very special occasions only when
+                a non-FI tests are needed to be executed against FI-environment -->
+         <batchtest todir="${test.build.dir}" if="tests.testcaseonly">
+           <fileset dir="@{fileset.dir}/core" includes="**/${testcase}.java" />
+         </batchtest>
+      </junit>
+      <antcall target="checkfailure"/>
+    </sequential>
+  </macrodef>
 
-    <delete dir="${test.build.data}"/>
-    <mkdir dir="${test.build.data}"/>
-    <delete dir="${test.log.dir}"/>
-    <mkdir dir="${test.log.dir}"/>
-  	<copy file="${test.src.dir}/hadoop-policy.xml" 
-  	  todir="${test.build.extraconf}" />
-    <copy file="${test.src.dir}/fi-site.xml"
-      todir="${test.build.extraconf}" />
-    <junit showoutput="${test.output}"
-      printsummary="${test.junit.printsummary}"
-      haltonfailure="${test.junit.haltonfailure}"
-      fork="yes"
-      forkmode="${test.junit.fork.mode}"
-      maxmemory="${test.junit.maxmemory}"
-      dir="${basedir}" timeout="${test.timeout}"
-      errorProperty="tests.failed" failureProperty="tests.failed">
-      <jvmarg value="-ea" />
-      <sysproperty key="test.build.data" value="${test.build.data}"/>
-      <sysproperty key="test.cache.data" value="${test.cache.data}"/>    	
-      <sysproperty key="test.debug.data" value="${test.debug.data}"/>
-      <sysproperty key="hadoop.log.dir" value="${test.log.dir}"/>
-      <sysproperty key="test.src.dir" value="${test.src.dir}/core"/>
-      <sysproperty key="test.build.extraconf" value="${test.build.extraconf}" />
-      <sysproperty key="hadoop.policy.file" value="hadoop-policy.xml"/>
-      <sysproperty key="java.library.path"
-       value="${build.native}/lib:${lib.dir}/native/${build.platform}"/>
-      <sysproperty key="install.c++.examples" value="${install.c++.examples}"/>
-      <!-- set io.compression.codec.lzo.class in the child jvm only if it is set -->
-      <syspropertyset dynamic="no">
-         <propertyref name="io.compression.codec.lzo.class"/>
-      </syspropertyset>
-      <!-- set compile.c++ in the child jvm only if it is set -->
-      <syspropertyset dynamic="no">
-         <propertyref name="compile.c++"/>
-      </syspropertyset>
-      <classpath refid="test.classpath"/>
-      <syspropertyset id="FaultProbabilityProperties">
-        <propertyref regex="fi.*"/>
-      </syspropertyset>
-      <formatter type="${test.junit.output.format}" />
-      <batchtest todir="${test.build.dir}" if="tests.notestcase">
-        <fileset dir="${test.src.dir}/core"
-	         includes="**/${test.include}.java"
-		 excludes="**/${test.exclude}.java" />
-      </batchtest>
-      <batchtest todir="${test.build.dir}" if="tests.notestcase.fi">
-        <fileset dir="${test.src.dir}/aop"
-          includes="**/${test.include}.java"
-          excludes="**/${test.exclude}.java" />
-      </batchtest>
-      <batchtest todir="${test.build.dir}" if="tests.testcase">
-        <fileset dir="${test.src.dir}/core" includes="**/${testcase}.java"/>
-      </batchtest>
-      <batchtest todir="${test.build.dir}" if="tests.testcase.fi">
-        <fileset dir="${test.src.dir}/aop" includes="**/${testcase}.java"/>
-      </batchtest>
-      <!--The following batch is for very special occasions only when
-      a non-FI tests are needed to be executed against FI-environment -->
-      <batchtest todir="${test.build.dir}" if="tests.testcaseonly">
-        <fileset dir="${test.src.dir}/core" includes="**/${testcase}.java"/>
-      </batchtest>
-    </junit>
-    <antcall target="checkfailure"/> 
+  <target name="run-test-core" depends="compile-core-test" description="Run core unit tests">
+    <macro-test-runner test.file="${test.all.tests.file}"
+                       classpath="${test.classpath.id}"
+                       test.dir="${test.build.dir}"
+                       fileset.dir="${test.src.dir}"
+                       >
+    </macro-test-runner>
   </target>   
 
   <target name="checkfailure" if="tests.failed">
@@ -1175,7 +1202,8 @@
          classpathref="mvn-ant-task.classpath"/>
   </target>   
 
-  <target name="mvn-install" depends="mvn-taskdef,jar,jar-test,set-version" 
+  <target name="mvn-install" depends="mvn-taskdef,jar,jar-test,
+    -mvn-system-install,set-version"
      description="To install hadoop core and test jars to local filesystem's m2 cache">
      <artifact:pom file="${hadoop-core.pom}" id="hadoop.core"/>
      <artifact:pom file="${hadoop-core-test.pom}" id="hadoop.core.test"/>

Propchange: hadoop/common/branches/branch-0.21/src/contrib/ec2/
------------------------------------------------------------------------------
--- svn:mergeinfo (original)
+++ svn:mergeinfo Sat May 15 00:20:41 2010
@@ -1,2 +1,3 @@
+/hadoop/common/trunk/src/contrib/ec2:944521
 /hadoop/core/branches/branch-0.19/core/src/contrib/ec2:713112
 /hadoop/core/trunk/src/contrib/ec2:776175-784663

Propchange: hadoop/common/branches/branch-0.21/src/docs/
------------------------------------------------------------------------------
--- svn:mergeinfo (original)
+++ svn:mergeinfo Sat May 15 00:20:41 2010
@@ -1 +1,2 @@
+/hadoop/common/trunk/src/docs:944521
 /hadoop/core/branches/branch-0.19/src/docs:713112

Propchange: hadoop/common/branches/branch-0.21/src/java/
------------------------------------------------------------------------------
--- svn:mergeinfo (original)
+++ svn:mergeinfo Sat May 15 00:20:41 2010
@@ -1,2 +1,3 @@
+/hadoop/common/trunk/src/java:944521
 /hadoop/core/branches/branch-0.19/core/src/java:713112
 /hadoop/core/trunk/src/core:776175-785643,785929-786278

Modified: hadoop/common/branches/branch-0.21/src/test/aop/build/aop.xml
URL: http://svn.apache.org/viewvc/hadoop/common/branches/branch-0.21/src/test/aop/build/aop.xml?rev=944531&r1=944530&r2=944531&view=diff
==============================================================================
--- hadoop/common/branches/branch-0.21/src/test/aop/build/aop.xml (original)
+++ hadoop/common/branches/branch-0.21/src/test/aop/build/aop.xml Sat May 15 00:20:41 2010
@@ -14,13 +14,27 @@
    See the License for the specific language governing permissions and
    limitations under the License.
 -->
-<project name="aspects">
+<project name="aspects"
+  xmlns:artifact="urn:maven-artifact-ant">
+  <!-- Properties common for all fault injections -->
   <property name="build-fi.dir" value="${basedir}/build-fi"/>
   <property name="hadoop-fi.jar" location="${build.dir}/${final.name}-fi.jar" />
   <property name="compile-inject.output" value="${build-fi.dir}/compile-fi.log"/>
   <property name="aspectversion" value="1.6.5"/>
   <property file="${basedir}/build.properties"/>
 
+  <!-- Properties related to system fault injection and tests -->
+  <property name="system-test-build-dir" value="${build-fi.dir}/system"/>
+
+  <!-- Properties specifically for system fault-injections and system tests -->
+
+  <property name="hadoop-core-system.pom"
+            location="${ivy.dir}/hadoop-core-system.xml" />
+  <property name="hadoop-core-system.jar"
+            location="${system-test-build-dir}/${final.name}-system.jar" />
+  <property name="hadoop-core-system-sources.jar"
+            location="${system-test-build-dir}/${final.name}-system-sources.jar" />
+
   <!--All Fault Injection (FI) related targets are located in this session -->
     
   <target name="clean-fi">
@@ -46,15 +60,19 @@
     <echo message="Start weaving aspects in place"/>
     <iajc
       encoding="${build.encoding}" 
-      srcdir="${java.src.dir};${build.src};${test.src.dir}/aop" 
-      includes="org/apache/hadoop/**/*.java, org/apache/hadoop/**/*.aj"
+      srcdir="${java.src.dir};${build.src};${src.dir.path}" 
+      includes="**/org/apache/hadoop/**/*.java, **/org/apache/hadoop/**/*.aj"
       excludes="org/apache/hadoop/classification/tools/**/*, org/apache/hadoop/record/**/*"
-      destDir="${build.classes}"
+      destDir="${dest.dir}"
       debug="${javac.debug}"
       target="${javac.version}"
       source="${javac.version}"
       deprecation="${javac.deprecation}">
-      <classpath refid="test.classpath"/>
+
+      <classpath>
+       <path refid="test.classpath"/>
+     </classpath>
+
     </iajc>
     <loadfile property="injection.failure" srcfile="${compile-inject.output}">
       <filterchain>
@@ -69,15 +87,76 @@
     <echo message="Weaving of aspects is finished"/>
   </target>
 
-  <target name="injectfaults" 
-  	description="Instrument classes with faults and other AOP advices">
+  <!-- Classpath for running system tests -->
+  <path id="test.system.classpath">
+        <pathelement location="${hadoop.conf.dir.deployed}" />
+        <pathelement location="${system-test-build-dir}/test/extraconf" />
+        <pathelement location="${system-test-build-dir}/test/classes" />
+        <pathelement location="${system-test-build-dir}/classes" />
+        <pathelement location="${test.src.dir}" />
+        <pathelement location="${build-fi.dir}" />
+        <pathelement location="${build-fi.dir}/tools" />
+        <pathelement path="${clover.jar}" />
+        <fileset dir="${test.lib.dir}">
+          <include name="**/*.jar" />
+          <exclude name="**/excluded/" />
+        </fileset>
+        <fileset dir="${system-test-build-dir}">
+           <include name="**/*.jar" />
+           <exclude name="**/excluded/" />
+         </fileset>
+        <path refid="classpath" />
+  </path>
+
+  <target name="injectfaults"
+        description="Instrument 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>
+    <weave-injectfault-aspects dest.dir="${build-fi.dir}/classes"
+                               src.dir="${test.src.dir}/aop">
+    </weave-injectfault-aspects>
+  </target>
+
+  <!-- =============================================================== -->
+  <!-- Create hadoop-{version}-dev-core.jar required to be deployed on -->
+  <!-- cluster for system tests                                        -->
+  <!-- =============================================================== -->
+  <target name="jar-system"
+          depends="inject-system-faults"
+          description="make hadoop.jar">
+    <macro-jar-fault-inject target.name="jar"
+      build.dir="${system-test-build-dir}"
+      jar.final.name="final.name"
+      jar.final.value="${final.name}-system">
+    </macro-jar-fault-inject>
+    <jar jarfile="${system-test-build-dir}/${final.name}-system-sources.jar"
+      update="yes">
+      <fileset dir="${test.src.dir}/system/java" includes="org/apache/hadoop/**/*.java"/>
+      <fileset dir="${test.src.dir}/system/aop" includes="org/apache/hadoop/**/*.aj"/>
+    </jar>
+  </target>
+
+  <macrodef name="weave-injectfault-aspects">
+    <attribute name="dest.dir" />
+    <attribute name="src.dir" />
+    <sequential>
+      <subant buildpath="build.xml" target="compile-fault-inject"
+        output="${compile-inject.output}">
+        <property name="build.dir" value="${build-fi.dir}" />
+        <property name="src.dir.path" value="@{src.dir}" />
+        <property name="dest.dir" value="@{dest.dir}" />
+      </subant>
+    </sequential>
+  </macrodef>
+
+  <target name="inject-system-faults" description="Inject system faults">
+    <property name="build-fi.dir" value="${system-test-build-dir}" />
+    <mkdir dir="${build-fi.dir}"/>
+    <delete file="${compile-inject.output}"/>
+    <weave-injectfault-aspects dest.dir="${system-test-build-dir}/classes"
+                               src.dir="${test.src.dir}/system">
+    </weave-injectfault-aspects>
   </target>
 
   <macrodef name="macro-run-tests-fault-inject">
@@ -99,11 +178,12 @@
   <!-- ================================================================== -->
   <macrodef name="macro-jar-fault-inject">
     <attribute name="target.name" />
+    <attribute name="build.dir" />
     <attribute name="jar.final.name" />
     <attribute name="jar.final.value" />
     <sequential>
       <subant buildpath="build.xml" target="@{target.name}">
-        <property name="build.dir" value="${build-fi.dir}"/>
+        <property name="build.dir" value="@{build.dir}"/>
         <property name="@{jar.final.name}" value="@{jar.final.value}"/>
         <property name="jar.extra.properties.list" 
         	  value="${test.src.dir}/fi-site.xml" />
@@ -129,4 +209,53 @@
   </macrodef>
 
   <!--End of Fault Injection (FI) related session-->
+
+  <!-- Start of cluster controller binary target -->
+  <property name="runAs.src" 
+    value ="${test.src.dir}/system/c++/runAs"/>
+  <property name="runAs.build.dir" 
+    value="${system-test-build-dir}/c++-build"/>
+  <property name="runAs.configure.script" 
+    value="${runAs.build.dir}/configure"/>
+  <target name="init-runAs-build">
+    <condition property="runAs.parameters.passed">
+      <not>
+        <equals arg1="${run-as.hadoop.home.dir}" 
+          arg2="$${run-as.hadoop.home.dir}"/>
+      </not>
+    </condition>
+    <fail unless="runAs.parameters.passed" 
+          message="Required parameters run-as.hadoop.home.dir not passed to the build"/>
+    <mkdir dir="${runAs.build.dir}"/>
+    <copy todir="${runAs.build.dir}" overwrite="true">
+      <fileset dir="${runAs.src}" includes="**/*"/>
+    </copy>
+    <chmod perm="+x" file="${runAs.configure.script}">
+    </chmod>
+  </target>
+
+  <target name="configure-runAs" 
+    depends="init-runAs-build">
+    <exec executable="${runAs.configure.script}" 
+      dir="${runAs.build.dir}" failonerror="true">
+      <arg value="--with-home=${run-as.hadoop.home.dir}"/>
+    </exec>
+  </target>
+  <target name="run-as" depends="configure-runAs">
+    <exec executable="${make.cmd}" dir="${runAs.build.dir}" 
+        searchpath="yes" failonerror="yes">
+     <arg value="all" />
+    </exec>
+  </target>
+  <!-- End of cluster controller binary target -->
+  <!-- Maven -->
+
+  <target name="-mvn-system-install" depends="mvn-taskdef, jar-system">
+    <artifact:pom file="${hadoop-core-system.pom}" id="hadoop.core.system"/>
+    <artifact:install file="${hadoop-core-system.jar}">
+       <pom refid="hadoop.core.system"/>
+       <attach file="${hadoop-core-system-sources.jar}" classifier="sources" />
+    </artifact:install>
+  </target>
+
 </project>

Propchange: hadoop/common/branches/branch-0.21/src/test/core/
------------------------------------------------------------------------------
--- svn:mergeinfo (original)
+++ svn:mergeinfo Sat May 15 00:20:41 2010
@@ -1,2 +1,3 @@
+/hadoop/common/trunk/src/test/core:944521
 /hadoop/core/branches/branch-0.19/core/src/test/core:713112
 /hadoop/core/trunk/src/test/core:776175-785643,785929-786278