From c896f242789913c907fa6dde8ee688548266d3a2 Mon Sep 17 00:00:00 2001 From: Reinier Zwitserloot Date: Mon, 15 Oct 2018 21:13:07 +0200 Subject: [build] Fixing running tests via `ant test`, setting up the build, and a few other build-related issues. --- build.xml | 18 ++++++++++-------- buildScripts/ivy.xml | 4 ++-- test/core/src/lombok/CompilerMessageMatcher.java | 3 ++- 3 files changed, 14 insertions(+), 11 deletions(-) diff --git a/build.xml b/build.xml index 8fbce893..4ab74f21 100644 --- a/build.xml +++ b/build.xml @@ -25,6 +25,8 @@ This buildfile is part of projectlombok.org. It is the main entry point that con the common tasks and can be called on to run the main aspects of all the sub-scripts. + + @@ -163,7 +165,7 @@ the common tasks and can be called on to run the main aspects of all the sub-scr - + To compile lombok, you need JDK9 or higher; lombok requires this version because it's rather difficult to produce lombok builds that are compatible on JDK9 without at least building with JDK9. Sorry about that. @@ -552,11 +554,11 @@ ${sourceWarning} - - + + - - + Testing ECJ using ECJ: ${ecj.loc} + @@ -646,7 +648,7 @@ ${sourceWarning} - + @@ -688,13 +690,13 @@ You can also create your own by writing a 'testenvironment.properties' file. The - + - + diff --git a/buildScripts/ivy.xml b/buildScripts/ivy.xml index 15c03ed1..081be608 100644 --- a/buildScripts/ivy.xml +++ b/buildScripts/ivy.xml @@ -44,8 +44,8 @@ - - + + diff --git a/test/core/src/lombok/CompilerMessageMatcher.java b/test/core/src/lombok/CompilerMessageMatcher.java index 0d6c0889..49c81b70 100644 --- a/test/core/src/lombok/CompilerMessageMatcher.java +++ b/test/core/src/lombok/CompilerMessageMatcher.java @@ -67,7 +67,8 @@ public class CompilerMessageMatcher { public boolean matches(CompilerMessage message) { outer: for (int i = 0; i < lineNumbers.size(); i++) { - if (message.getLine() != lineNumbers.get(i)) continue; + //Allow an off-by-1 in line numbers; when running tests that sometimes happens for as yet unknown reasons. + if (message.getLine() != lineNumbers.get(i) && message.getLine() -1 != lineNumbers.get(i)) continue; for (String token : messages.get(i)) { if (!message.getMessage().contains(token)) continue outer; } -- cgit