aboutsummaryrefslogtreecommitdiff
path: root/test/core/src/lombok/RunTestsViaDelombok.java
diff options
context:
space:
mode:
authorReinier Zwitserloot <reinier@zwitserloot.com>2012-10-22 09:47:56 +0200
committerReinier Zwitserloot <reinier@zwitserloot.com>2012-10-22 09:47:56 +0200
commita295c4fc12247eedfe5747b547d8ac7079f33533 (patch)
tree3b6e32b547a4877d1f2b0c1a4b0771d0657993a7 /test/core/src/lombok/RunTestsViaDelombok.java
parent0baf73b2aaecebf75a51f3d064c6d925a52f1a6d (diff)
downloadlombok-a295c4fc12247eedfe5747b547d8ac7079f33533.tar.gz
lombok-a295c4fc12247eedfe5747b547d8ac7079f33533.tar.bz2
lombok-a295c4fc12247eedfe5747b547d8ac7079f33533.zip
Ever since we do a lot more than just calling 'parse' when running delombok in our tests, the tests are in the unfortunate scenario where we always compile against a given javac (lib/build/javac6.jar), and always run the tests against a given javac, but that javac tries to use the bootclasspath of the host JRE, and if that is JRE7, you get all sorts of errors.
I fixed it by still compiling against a given javac (we can only ship one lombok.jar after all), but having the test task run with a given bootclasspath and a given javac.jar. There are 2 tasks that download both rt.jar and javac.jar for either OpenJDK6 or OpenJDK7, and it writes a properties file with those locations. The test task will use this property file, and explain what you need to do if it is not there. Incidentally, this brought to light issue 422: Delombok in java7 produces VerifyErrors.
Diffstat (limited to 'test/core/src/lombok/RunTestsViaDelombok.java')
-rw-r--r--test/core/src/lombok/RunTestsViaDelombok.java2
1 files changed, 2 insertions, 0 deletions
diff --git a/test/core/src/lombok/RunTestsViaDelombok.java b/test/core/src/lombok/RunTestsViaDelombok.java
index 52653e2e..e58cffc0 100644
--- a/test/core/src/lombok/RunTestsViaDelombok.java
+++ b/test/core/src/lombok/RunTestsViaDelombok.java
@@ -55,6 +55,8 @@ public class RunTestsViaDelombok extends AbstractRunTests {
delombok.addFile(file.getAbsoluteFile().getParentFile(), file.getName());
delombok.setSourcepath(file.getAbsoluteFile().getParent());
+ String bcp = System.getProperty("delombok.bootclasspath");
+ if (bcp != null) delombok.setBootclasspath(bcp);
delombok.setWriter(result);
Locale originalLocale = Locale.getDefault();
try {