Permalink
Browse files

Moving stuff around. Working on the ant build file.

  • Loading branch information...
1 parent e62f049 commit d7d63568e3dd59a9e3d0356c02d843eea5bc1a22 @dhemery committed Jul 7, 2011
Showing with 73 additions and 93 deletions.
  1. +3 −6 .classpath
  2. +47 −64 build.xml
  3. +1 −1 {example.classpath.a/example/classpath → classpaths}/a/Test_a_1.java
  4. +1 −1 {example.classpath.a/example/classpath → classpaths}/a/Test_a_2.java
  5. +1 −1 {example.classpath.a/example/classpath → classpaths}/a/a/Test_aa_1.java
  6. +1 −1 {example.classpath.a/example/classpath → classpaths}/a/a/Test_aa_2.java
  7. +1 −1 {example.classpath.a/example/classpath → classpaths}/a/a/a/Test_aaa_1.java
  8. +1 −1 {example.classpath.a/example/classpath → classpaths}/a/a/a/Test_aaa_2.java
  9. +1 −1 {example.classpath.a/example/classpath → classpaths}/a/a/b/Test_aab_1.java
  10. +1 −1 {example.classpath.a/example/classpath → classpaths}/a/a/b/Test_aab_2.java
  11. +1 −1 {example.classpath.a/example/classpath → classpaths}/a/b/Test_ab_1.java
  12. +1 −1 {example.classpath.a/example/classpath → classpaths}/a/b/Test_ab_2.java
  13. +1 −1 {example.classpath.b/example/classpath → classpaths}/b/Test_b_1.java
  14. +1 −1 {example.classpath.b/example/classpath → classpaths}/b/Test_b_2.java
  15. +1 −1 {example.classpath.b/example/classpath → classpaths}/b/a/Test_ba_1.java
  16. +1 −1 {example.classpath.b/example/classpath → classpaths}/b/a/Test_ba_2.java
  17. +1 −1 {example.classpath.b/example/classpath → classpaths}/b/b/Test_bb_1.java
  18. +1 −1 {example.classpath.b/example/classpath → classpaths}/b/b/Test_bb_2.java
  19. +1 −1 {example.classpath.b/example/classpath → classpaths}/b/b/a/Test_bba_1.java
  20. +1 −1 {example.classpath.b/example/classpath → classpaths}/b/b/a/Test_bba_2.java
  21. +1 −1 {example.classpath.b/example/classpath → classpaths}/b/b/b/Test_bbb_1.java
  22. +1 −1 {example.classpath.b/example/classpath → classpaths}/b/b/b/Test_bbb_2.java
  23. +1 −1 {example.classpath.c/example/classpath → classpaths}/c/Test_c_1.java
  24. +1 −1 {example.classpath.d/example/classpath → classpaths}/d/NotATest_d_2.java
  25. +1 −1 {example.classpath.d/example/classpath → classpaths}/d/Test_d_1.java
  26. BIN lib/junit/{junit-dep-4.9b2.jar → junit-dep-4.9b3.jar}
  27. 0 {src → main}/com/dhemery/runtimesuite/ClassFilter.java
  28. 0 {src → main}/com/dhemery/runtimesuite/ClassFinder.java
  29. 0 {src → main}/com/dhemery/runtimesuite/Filter.java
  30. 0 {src → main}/com/dhemery/runtimesuite/Finder.java
  31. 0 {src → main}/com/dhemery/runtimesuite/MethodFilter.java
  32. 0 {src → main}/com/dhemery/runtimesuite/RuntimeSuite.java
  33. 0 {src → main}/com/dhemery/runtimesuite/filters/Category.java
  34. 0 {src → main}/com/dhemery/runtimesuite/filters/ExcludeClassCategories.java
  35. 0 {src → main}/com/dhemery/runtimesuite/filters/ExcludeClasses.java
  36. 0 {src → main}/com/dhemery/runtimesuite/filters/ExcludeMethodCategories.java
  37. 0 {src → main}/com/dhemery/runtimesuite/filters/IncludeClassCategories.java
  38. 0 {src → main}/com/dhemery/runtimesuite/filters/IncludeClasses.java
  39. 0 {src → main}/com/dhemery/runtimesuite/filters/IncludeMethodCategories.java
  40. 0 {src → main}/com/dhemery/runtimesuite/filters/package-info.java
  41. 0 {src → main}/com/dhemery/runtimesuite/finders/ClassesOnClasspath.java
  42. 0 {src → main}/com/dhemery/runtimesuite/finders/ListedClasses.java
  43. 0 {src → main}/com/dhemery/runtimesuite/finders/package-info.java
  44. 0 {src → main}/com/dhemery/runtimesuite/internal/CategoryMatcher.java
  45. 0 {src → main}/com/dhemery/runtimesuite/internal/ClassesWithTestMethods.java
  46. 0 {src → main}/com/dhemery/runtimesuite/internal/Classpath.java
  47. 0 {src → main}/com/dhemery/runtimesuite/internal/RunnableClass.java
  48. 0 {src → main}/com/dhemery/runtimesuite/internal/SuiteInspector.java
  49. 0 {src → main}/com/dhemery/runtimesuite/internal/package-info.java
  50. 0 {src → main}/com/dhemery/runtimesuite/package-info.java
View
@@ -1,19 +1,16 @@
<?xml version="1.0" encoding="UTF-8"?>
<classpath>
- <classpathentry kind="src" path="src"/>
+ <classpathentry kind="src" path="main"/>
<classpathentry kind="src" output="testbin/tests" path="test"/>
<classpathentry kind="src" output="testbin/examples" path="examples"/>
- <classpathentry kind="src" output="testbin/classpath.a" path="example.classpath.a"/>
- <classpathentry kind="src" output="testbin/classpath.b" path="example.classpath.b"/>
- <classpathentry kind="src" output="testbin/classpath.c" path="example.classpath.c"/>
- <classpathentry kind="src" output="testbin/classpath.d" path="example.classpath.d"/>
+ <classpathentry kind="src" output="testbin/classpath.a" path="classpaths"/>
<classpathentry kind="con" path="org.maven.ide.eclipse.MAVEN2_CLASSPATH_CONTAINER"/>
<classpathentry kind="con" path="org.eclipse.jdt.launching.JRE_CONTAINER/org.eclipse.jdt.internal.debug.ui.launcher.StandardVMType/JavaSE-1.6"/>
<classpathentry kind="lib" path="lib/logback/logback-classic-0.9.29.jar"/>
<classpathentry kind="lib" path="lib/logback/logback-core-0.9.29.jar"/>
<classpathentry kind="lib" path="lib/slf4j/slf4j-api-1.6.1.jar"/>
<classpathentry kind="lib" path="lib/hamcrest/hamcrest-library-1.3.0RC1.jar"/>
<classpathentry kind="lib" path="lib/hamcrest/hamcrest-core-1.3.0RC1.jar"/>
- <classpathentry kind="lib" path="lib/junit/junit-dep-4.9b2.jar"/>
+ <classpathentry kind="lib" path="lib/junit/junit-dep-4.9b3.jar"/>
<classpathentry kind="output" path="bin"/>
</classpath>
View
111 build.xml
@@ -1,21 +1,32 @@
<?xml version="1.0" encoding="UTF-8"?>
-<project name="runtime-suite" default="test">
- <property name="src.dir" location="src" />
+<!--
+ Compile sources to build/main
+ Compile tests to build/tests
+ Compile test examples to build/examples
+ Compile each batch of classpath classes to build/classpaths/x
+ Dist: build/main
+ Tests to run: build/tests
+ Classpath to run tests: build/main, build/tests, build/examples, build/classpath.x
+-->
+
+<project name="runtime-suite" default="run.tests">
+ <property name="main.src.dir" location="main" />
<property name="test.src.dir" location="test" />
+ <property name="examples.src.dir" location="examples" />
<property name="lib.dir" location="lib" />
- <property name="target" location="target" />
- <property name="bin.dir" location="${target}/bin" />
- <property name="dist.bin.dir" location="${target}/dist" />
- <property name="test.bin.dir" location="${target}/test" />
+ <property name="build.dir" location="build" />
+ <property name="main.build.dir" location="${build.dir}/main" />
+ <property name="test.build.dir" location="${build.dir}/tests" />
+ <property name="examples.build.dir" location="${build.dir}/examples" />
+ <property name="classpaths.build.dir" location="${build.dir}/classpaths" />
- <property name="build.jar" value="${dist.bin.dir}/${ant.project.name}.jar" />
+ <property name="main.build.jar" value="${dist.build.dir}/${ant.project.name}.jar" />
<property name="report.dir" location="reports" />
- <property name="dist.dir" location="dist" />
- <fileset id="build.libs" dir="${lib.dir}">
+ <fileset id="main.libs" dir="${lib.dir}">
<include name="junit/**.jar" />
<include name="slf4j/**.jar" />
</fileset>
@@ -25,50 +36,44 @@
<include name="logback/**.jar" />
</fileset>
- <path id="build.classpath">
+ <path id="main.compile.classpath">
<fileset refid="build.libs" />
</path>
- <path id="test.classpath">
- <fileset refid="build.libs" />
+ <path id="test.compile.classpath">
+ <pathelement location="${main.build.dir}" />
<fileset refid="test.libs" />
- <pathelement location="${bin.dir}" />
- <pathelement location="${test.bin.dir}" />
+ <fileset refid="main.libs" />
</path>
- <fileset id="test.classes" dir="${test.bin.dir}">
- <include name="com/dhemery/runtimesuite/**/*.class"/>
+ <fileset id="test.classes" dir="${test.build.dir}">
+ <include name="**/*.class"/>
</fileset>
- <target name="build" depends="-init">
+ <target name="compile.main" depends="init">
<echo>Compiling ${ant.project.name}</echo>
- <mkdir dir="${bin.dir}" />
- <javac srcdir="${src.dir}" destdir="${bin.dir}" includeAntRuntime="false">
+ <mkdir dir="${main.build.dir}" />
+ <javac srcdir="${main.src.dir}" destdir="${main.build.dir}" includeAntRuntime="false">
<classpath refid="build.classpath" />
</javac>
- <unjar dest="${bin.dir}">
- <fileset refid="build.libs" />
- </unjar>
- <mkdir dir="${dist.bin.dir}" />
- <jar basedir="${bin.dir}" destfile="${build.jar}" />
- </target>
-
- <target name="clean">
- <delete dir="${target}" quiet="true" />
- <delete dir="${report.dir}" quiet="true" />
</target>
- <target name="dist" depends="test">
- <buildnumber file="version.number"/>
- <property name="version" value="0.1.${build.number}" />
- <property name="dist.jar.name" value="${ant.project.name}-${version}.jar" />
- <echo>Building ${dist.jar.name}</echo>
- <mkdir dir="${dist.dir}" />
- <copy file="${build.jar}" toFile="${dist.dir}/${dist.jar.name}" />
+ <target name="compile.tests" depends="compile.main">
+ <mkdir dir="${test.bin.dir}" />
+ <javac srcdir="${test.src.dir}" destdir="${test.bin.dir}" includeAntRuntime="false">
+ <classpath refid="test.classpath" />
+ </javac>
</target>
- <target name="test" depends="unit.tests">
- <echo>Creating test report</echo>
+ <target name="run.tests" depends="compile.tests">
+ <mkdir dir="${report.dir}/xml" />
+ <junit haltonfailure="true">
+ <classpath refid="test.classpath" />
+ <batchtest fork="no" todir="${report.dir}/xml">
+ <fileset refid="${unit.test.classes}" />
+ <formatter type="xml" usefile="yes" />
+ </batchtest>
+ </junit>
<junitreport todir="${report.dir}">
<fileset dir="${report.dir}/xml">
<include name="TEST-*.xml"/>
@@ -77,35 +82,13 @@
</junitreport>
<delete dir="${report.dir}/xml" quiet="true" />
</target>
-
- <target name="unit.tests" depends="-compile.tests">
- <run.tests classes="unit.test.classes" message="Running unit tests" />
- </target>
- <target name="-compile.tests" depends="build">
- <mkdir dir="${test.bin.dir}" />
- <javac srcdir="${test.src.dir}" destdir="${test.bin.dir}" includeAntRuntime="false">
- <classpath refid="test.classpath" />
- </javac>
+ <target name="clean">
+ <delete dir="${build.dir}" quiet="true" />
+ <delete dir="${report.dir}" quiet="true" />
</target>
- <target name="-init">
+ <target name="init">
<tstamp />
</target>
-
- <macrodef name="run.tests">
- <attribute name="message" />
- <attribute name="classes" />
- <sequential>
- <echo>@{message}</echo>
- <mkdir dir="${report.dir}/xml" />
- <junit haltonfailure="true">
- <classpath refid="test.classpath" />
- <batchtest fork="no" todir="${report.dir}/xml">
- <fileset refid="@{classes}" />
- <formatter type="xml" usefile="yes" />
- </batchtest>
- </junit>
- </sequential>
- </macrodef>
</project>
@@ -1,4 +1,4 @@
-package example.classpath.a;
+package a;
import org.junit.Test;
@@ -1,4 +1,4 @@
-package example.classpath.a;
+package a;
import org.junit.Test;
@@ -1,4 +1,4 @@
-package example.classpath.a.a;
+package a.a;
import org.junit.Test;
@@ -1,4 +1,4 @@
-package example.classpath.a.a;
+package a.a;
import org.junit.Test;
@@ -1,4 +1,4 @@
-package example.classpath.a.a.a;
+package a.a.a;
import org.junit.Test;
@@ -1,4 +1,4 @@
-package example.classpath.a.a.a;
+package a.a.a;
import org.junit.Test;
@@ -1,4 +1,4 @@
-package example.classpath.a.a.b;
+package a.a.b;
import org.junit.Test;
@@ -1,4 +1,4 @@
-package example.classpath.a.a.b;
+package a.a.b;
import org.junit.Test;
@@ -1,4 +1,4 @@
-package example.classpath.a.b;
+package a.b;
import org.junit.Test;
@@ -1,4 +1,4 @@
-package example.classpath.a.b;
+package a.b;
import org.junit.Test;
@@ -1,4 +1,4 @@
-package example.classpath.b;
+package b;
import org.junit.Test;
@@ -1,4 +1,4 @@
-package example.classpath.b;
+package b;
import org.junit.Test;
@@ -1,4 +1,4 @@
-package example.classpath.b.a;
+package b.a;
import org.junit.Test;
@@ -1,4 +1,4 @@
-package example.classpath.b.a;
+package b.a;
import org.junit.Test;
@@ -1,4 +1,4 @@
-package example.classpath.b.b;
+package b.b;
import org.junit.Test;
@@ -1,4 +1,4 @@
-package example.classpath.b.b;
+package b.b;
import org.junit.Test;
@@ -1,4 +1,4 @@
-package example.classpath.b.b.a;
+package b.b.a;
import org.junit.Test;
@@ -1,4 +1,4 @@
-package example.classpath.b.b.a;
+package b.b.a;
import org.junit.Test;
@@ -1,4 +1,4 @@
-package example.classpath.b.b.b;
+package b.b.b;
import org.junit.Test;
@@ -1,4 +1,4 @@
-package example.classpath.b.b.b;
+package b.b.b;
import org.junit.Test;
@@ -1,4 +1,4 @@
-package example.classpath.c;
+package c;
import org.junit.Test;
@@ -1,4 +1,4 @@
-package example.classpath.d;
+package d;
public class NotATest_d_2 {
public void notATest() {}
@@ -1,4 +1,4 @@
-package example.classpath.d;
+package d;
import org.junit.Test;

0 comments on commit d7d6356

Please sign in to comment.