aboutsummaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorRoel Spilker <r.spilker@gmail.com>2011-07-18 21:05:55 +0200
committerRoel Spilker <r.spilker@gmail.com>2011-07-18 21:11:37 +0200
commit4dfa3b7004295da1637e6a7e328ccb84babb76d3 (patch)
treeeae66bee9a2506e217369799251a406cbcae27af
parent83e2fb5e00e1868f0b4f0fe38b1ea1383119f8ee (diff)
downloadlombok-4dfa3b7004295da1637e6a7e328ccb84babb76d3.tar.gz
lombok-4dfa3b7004295da1637e6a7e328ccb84babb76d3.tar.bz2
lombok-4dfa3b7004295da1637e6a7e328ccb84babb76d3.zip
There's now 1 test suite that runs all tests, and 'ant eclipse' will make a launch config that adds the appropriate -javaagent VM param to ensure the runWithEclipse tests work.
-rw-r--r--.gitignore1
-rw-r--r--build.xml13
-rw-r--r--buildScripts/eclipse-run-tests.template19
-rw-r--r--test/bytecode/src/lombok/bytecode/RunBytecodeTests.java10
-rw-r--r--test/core/src/lombok/RunAllTests.java10
-rw-r--r--test/transform/src/lombok/transform/RunTransformTests.java10
6 files changed, 63 insertions, 0 deletions
diff --git a/.gitignore b/.gitignore
index 5eae78c0..f9dd1e0a 100644
--- a/.gitignore
+++ b/.gitignore
@@ -5,6 +5,7 @@ ivyCache
google.properties
debug
LombokizedEclipse.launch
+RunLombokTests.launch
escudo-upload.key
findbugsReport.html
lib
diff --git a/build.xml b/build.xml
index 3edfeced..1cbcff35 100644
--- a/build.xml
+++ b/build.xml
@@ -223,6 +223,10 @@ the common tasks and can be called on to run the main aspects of all the sub-scr
<os family="mac" />
</condition>
+ <condition property="putJavacOnBootclasspath" value="-Xbootclasspath/p:lib/test/javac.jar" else="">
+ <os family="mac" />
+ </condition>
+
<copy
file="buildScripts/eclipse-debug-target.template"
tofile="LombokizedEclipse.launch"
@@ -232,6 +236,15 @@ the common tasks and can be called on to run the main aspects of all the sub-scr
<filter token="START_ON_FIRST_THREAD" value="${startOnFirstThread}" />
</filterset>
</copy>
+ <copy
+ file="buildScripts/eclipse-run-tests.template"
+ tofile="RunLombokTests.launch"
+ preservelastmodified="true"
+ overwrite="true">
+ <filterset>
+ <filter token="JAVAC_ON_BOOTCLASSPATH" value="${putJavacOnBootclasspath}" />
+ </filterset>
+ </copy>
</target>
<target name="-test-compile" depends="ensureTestDeps, compile" unless="skipTests">
diff --git a/buildScripts/eclipse-run-tests.template b/buildScripts/eclipse-run-tests.template
new file mode 100644
index 00000000..4296d372
--- /dev/null
+++ b/buildScripts/eclipse-run-tests.template
@@ -0,0 +1,19 @@
+<?xml version="1.0" encoding="UTF-8" standalone="no"?>
+<launchConfiguration type="org.eclipse.jdt.junit.launchconfig">
+<listAttribute key="org.eclipse.debug.core.MAPPED_RESOURCE_PATHS">
+<listEntry value="/lombok/test/core/src/lombok/RunAllTests.java"/>
+</listAttribute>
+<listAttribute key="org.eclipse.debug.core.MAPPED_RESOURCE_TYPES">
+<listEntry value="1"/>
+</listAttribute>
+<listAttribute key="org.eclipse.debug.ui.favoriteGroups">
+<listEntry value="org.eclipse.debug.ui.launchGroup.debug"/>
+</listAttribute>
+<stringAttribute key="org.eclipse.jdt.junit.CONTAINER" value=""/>
+<booleanAttribute key="org.eclipse.jdt.junit.KEEPRUNNING_ATTR" value="false"/>
+<stringAttribute key="org.eclipse.jdt.junit.TESTNAME" value=""/>
+<stringAttribute key="org.eclipse.jdt.junit.TEST_KIND" value="org.eclipse.jdt.junit.loader.junit4"/>
+<stringAttribute key="org.eclipse.jdt.launching.MAIN_TYPE" value="lombok.RunAllTests"/>
+<stringAttribute key="org.eclipse.jdt.launching.PROJECT_ATTR" value="lombok"/>
+<stringAttribute key="org.eclipse.jdt.launching.VM_ARGUMENTS" value="-javaagent:dist/lombok.jar @JAVAC_ON_BOOTCLASSPATH@"/>
+</launchConfiguration>
diff --git a/test/bytecode/src/lombok/bytecode/RunBytecodeTests.java b/test/bytecode/src/lombok/bytecode/RunBytecodeTests.java
new file mode 100644
index 00000000..83602bbb
--- /dev/null
+++ b/test/bytecode/src/lombok/bytecode/RunBytecodeTests.java
@@ -0,0 +1,10 @@
+package lombok.bytecode;
+
+import org.junit.runner.RunWith;
+import org.junit.runners.Suite;
+import org.junit.runners.Suite.SuiteClasses;
+
+@RunWith(Suite.class)
+@SuiteClasses({TestClassFileMetaData.class})
+public class RunBytecodeTests {
+}
diff --git a/test/core/src/lombok/RunAllTests.java b/test/core/src/lombok/RunAllTests.java
new file mode 100644
index 00000000..961eab65
--- /dev/null
+++ b/test/core/src/lombok/RunAllTests.java
@@ -0,0 +1,10 @@
+package lombok;
+
+import org.junit.runner.RunWith;
+import org.junit.runners.Suite;
+import org.junit.runners.Suite.SuiteClasses;
+
+@RunWith(Suite.class)
+@SuiteClasses({lombok.transform.RunTransformTests.class, lombok.bytecode.RunBytecodeTests.class})
+public class RunAllTests {
+}
diff --git a/test/transform/src/lombok/transform/RunTransformTests.java b/test/transform/src/lombok/transform/RunTransformTests.java
new file mode 100644
index 00000000..0149fae2
--- /dev/null
+++ b/test/transform/src/lombok/transform/RunTransformTests.java
@@ -0,0 +1,10 @@
+package lombok.transform;
+
+import org.junit.runner.RunWith;
+import org.junit.runners.Suite;
+import org.junit.runners.Suite.SuiteClasses;
+
+@RunWith(Suite.class)
+@SuiteClasses({TestLombokFilesIdempotent.class, TestSourceFiles.class, TestWithDelombok.class, TestWithEcj.class, TestWithEclipse.class})
+public class RunTransformTests {
+}