hadoop-hdfs-commits mailing list archives

Site index · List index
Message view « Date » · « Thread »
Top « Date » · « Thread »
From szets...@apache.org
Subject svn commit: r796591 - in /hadoop/hdfs/trunk: CHANGES.txt build.xml src/test/all-tests src/test/commit-tests
Date Wed, 22 Jul 2009 00:22:30 GMT
Author: szetszwo
Date: Wed Jul 22 00:22:29 2009
New Revision: 796591

URL: http://svn.apache.org/viewvc?rev=796591&view=rev
Log:
HDFS-458. Create a new ant target, run-commit-test.  Contributed by Jakob Homan

Added:
    hadoop/hdfs/trunk/src/test/all-tests
    hadoop/hdfs/trunk/src/test/commit-tests
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=796591&r1=796590&r2=796591&view=diff
==============================================================================
--- hadoop/hdfs/trunk/CHANGES.txt (original)
+++ hadoop/hdfs/trunk/CHANGES.txt Wed Jul 22 00:22:29 2009
@@ -42,6 +42,9 @@
     HDFS-475. Add new ant targets for fault injection jars and tests.
     (Konstantin Boudnik via szetszwo)
 
+    HDFS-458. Create a new ant target, run-commit-test.  (Jakob Homan
+    via szetszwo)
+
   BUG FIXES
     HDFS-76. Better error message to users when commands fail because of 
     lack of quota. Allow quota to be set even if the limit is lower than

Modified: hadoop/hdfs/trunk/build.xml
URL: http://svn.apache.org/viewvc/hadoop/hdfs/trunk/build.xml?rev=796591&r1=796590&r2=796591&view=diff
==============================================================================
--- hadoop/hdfs/trunk/build.xml (original)
+++ hadoop/hdfs/trunk/build.xml Wed Jul 22 00:22:29 2009
@@ -95,6 +95,9 @@
   <property name="test.hdfs.with.mr.build.classes" value="${test.build.dir}/hdfs-with-mr/classes"/>
   <property name="test.hdfs.with.mr.classpath.id" value="test.hdfs.with.mr.classpath"/>
 
+  <property name="test.hdfs.commit.tests.file" value="${test.src.dir}/commit-tests" />
+  <property name="test.hdfs.all.tests.file" value="${test.src.dir}/all-tests" />
+
   <property name="web.src.dir" value="${basedir}/src/web"/>
   <property name="src.webapps" value="${basedir}/src/webapps"/>
 
@@ -129,7 +132,7 @@
   <property name="patch.cmd" value="patch"/>
   <property name="make.cmd" value="make"/>
 	
-  <!-- IVY properteis set here -->
+  <!-- IVY properties set here -->
   <property name="ivy.dir" location="ivy" />
   <loadproperties srcfile="${ivy.dir}/libraries.properties"/>
   <property name="ivy.jar" location="${ivy.dir}/ivy-${ivy.version}.jar"/>
@@ -551,51 +554,61 @@
   <!-- ================================================================== -->
   <!-- Run unit tests                                                     --> 
   <!-- ================================================================== -->
-  <target name="run-test-hdfs" depends="compile-hdfs-test" description="Run hdfs unit
tests">
-    <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">
-      <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.build.extraconf}" />
-      <sysproperty key="hadoop.policy.file" value="hadoop-policy.xml"/>
-      <classpath refid="test.classpath"/>
-      <!-- Pass probability specifications to the spawn JVM -->
-      <syspropertyset id="FaultProbabilityProperties">
-        <propertyref regex="fi.*"/>
-      </syspropertyset>
-      <formatter type="${test.junit.output.format}" />
-      <batchtest todir="${test.build.dir}" unless="testcase">
-        <fileset dir="${test.src.dir}/hdfs"
-           includes="**/${test.include}.java"
-           excludes="**/${test.exclude}.java" />
-        <fileset dir="${test.src.dir}/aop"
-          includes="**/${test.include}.java"
-          excludes="**/${test.exclude}.java" />
-      </batchtest>
-      <batchtest todir="${test.build.dir}" if="testcase">
-        <fileset dir="${test.src.dir}/hdfs" includes="**/${testcase}.java"/>
-        <fileset dir="${test.src.dir}/aop" includes="**/${testcase}.java"/>
-      </batchtest>
-    </junit>
-    <antcall target="checkfailure"/>
-  </target>  
+  <macrodef name="macro-test-runner">
+    <attribute name="test.file" />
+    <sequential>
+      <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">
+        <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.build.extraconf}" />
+        <sysproperty key="hadoop.policy.file" value="hadoop-policy.xml"/>
+        <classpath refid="test.classpath"/>
+        <!-- Pass probability specifications to the spawn JVM -->
+        <syspropertyset id="FaultProbabilityProperties">
+          <propertyref regex="fi.*"/>
+        </syspropertyset>
+        <formatter type="${test.junit.output.format}" />
+        <batchtest todir="${test.build.dir}" unless="testcase">
+          <fileset dir="${test.src.dir}/hdfs" excludes="**/${test.exclude}.java">
+             <patternset>
+               <includesfile name="@{test.file}"/>
+             </patternset>
+         </fileset>
+        </batchtest>
+        <batchtest todir="${test.build.dir}" if="testcase">
+          <fileset dir="${test.src.dir}/hdfs" includes="**/${testcase}.java"/>
+          <fileset dir="${test.src.dir}/aop" includes="**/${testcase}.java"/>
+        </batchtest>
+      </junit>
+      <antcall target="checkfailure"/>
+    </sequential>
+  </macrodef>
+
+  <target name="run-test-hdfs" depends="compile-hdfs-test" description="Run full set of
hdfs unit tests">
+    <macro-test-runner test.file="${test.hdfs.all.tests.file}" />
+  </target>
+
+  <target name="run-commit-test" depends="compile-hdfs-test" description="Run approximate
10-minute set of unit tests prior to commiting">
+     <macro-test-runner test.file="${test.hdfs.commit.tests.file}" />
+  </target>
 
   <target name="run-test-hdfs-with-mr" depends="compile-hdfs-with-mr-test" description="Run
hdfs unit tests that require mapred">
 

Added: hadoop/hdfs/trunk/src/test/all-tests
URL: http://svn.apache.org/viewvc/hadoop/hdfs/trunk/src/test/all-tests?rev=796591&view=auto
==============================================================================
--- hadoop/hdfs/trunk/src/test/all-tests (added)
+++ hadoop/hdfs/trunk/src/test/all-tests Wed Jul 22 00:22:29 2009
@@ -0,0 +1 @@
+**/Test*.java

Added: hadoop/hdfs/trunk/src/test/commit-tests
URL: http://svn.apache.org/viewvc/hadoop/hdfs/trunk/src/test/commit-tests?rev=796591&view=auto
==============================================================================
--- hadoop/hdfs/trunk/src/test/commit-tests (added)
+++ hadoop/hdfs/trunk/src/test/commit-tests Wed Jul 22 00:22:29 2009
@@ -0,0 +1,51 @@
+**/TestHDFSCLI.java
+**/TestUrlStreamHandler.java
+**/TestBlockReplacement.java
+**/TestDirectoryScanner.java
+**/TestDiskError.java
+**/TestInterDatanodeProtocol.java
+**/TestSimulatedFSDataset.java
+**/TestBackupNode.java
+**/TestCheckpoint.java
+**/TestComputeInvalidateWork.java
+**/TestDatanodeDescriptor.java
+**/TestEditLog.java
+**/TestFileLimit.java
+**/TestHeartbeatHandling.java
+**/TestHost2NodesMap.java
+**/TestNamenodeCapacityReport.java
+**/TestOverReplicatedBlocks.java
+**/TestPendingReplication.java
+**/TestReplicationPolicy.java
+**/TestStartup.java
+**/TestStorageRestore.java
+**/TestAbandonBlock.java
+**/TestBlocksScheduledCounter.java
+**/TestDatanodeReport.java
+**/TestDataTransferProtocol.java
+**/TestDefaultNameNodePort.java
+**/TestDFSShell.java
+**/TestDFSShellGenericOptions.java
+**/TestDFSUpgradeFromImage.java
+**/TestDistributedFileSystem.java
+**/TestFileAppend.java
+**/TestFileAppend2.java
+**/TestFileAppend3.java
+**/TestFileCorruption.java
+**/TestFileStatus.java
+**/TestFSInputChecker.java
+**/TestFSOutputSummer.java
+**/TestGetBlocks.java
+**/TestHDFSServerPorts.java
+**/TestHDFSTrash.java
+**/TestLease.java
+**/TestLeaseRecovery.java
+**/TestLocalDFS.java
+**/TestMissingBlocksAlert.java
+**/TestPread.java
+**/TestQuota.java
+**/TestRestartDFS.java
+**/TestSafeMode.java
+**/TestNetworkTopology.java
+**/TestPermission.java
+



Mime
View raw message