From b81d25a13abfb9a0a5a5eddff79b1a36d982a036 Mon Sep 17 00:00:00 2001 From: aclement Date: Wed, 13 Apr 2005 11:45:27 +0000 Subject: [PATCH] See pr90806 - change to harness so fast machines don't fail incremental tests. --- .../testsrc/org/aspectj/tools/ajc/Ajc.java | 12 ++++++++++++ 1 file changed, 12 insertions(+) diff --git a/org.aspectj.ajdt.core/testsrc/org/aspectj/tools/ajc/Ajc.java b/org.aspectj.ajdt.core/testsrc/org/aspectj/tools/ajc/Ajc.java index c3f35770e..b2193d1b5 100644 --- a/org.aspectj.ajdt.core/testsrc/org/aspectj/tools/ajc/Ajc.java +++ b/org.aspectj.ajdt.core/testsrc/org/aspectj/tools/ajc/Ajc.java @@ -166,6 +166,10 @@ public class Ajc { args = adjustToSandbox(args,!isIncremental); MessageHandler holder = new MessageHandler(); main.setHolder(holder); + if (incrementalStage==10 && hasSpecifiedIncremental(args)) { + // important to sleep after preparing the sandbox on first incremental stage (see notes in pr90806) + try { Thread.sleep(1000); } catch (Exception e) {} + } if (isIncremental) { controller.doIncremental(holder); } else { @@ -191,6 +195,14 @@ public class Ajc { return result; } + private boolean hasSpecifiedIncremental(String[] args) { + if (args==null) return false; + for (int i = 0; i < args.length; i++) { + if (args[i].equals("-incremental")) return true; + } + return false; + } + /** * After compiling for the first time with compile(), if the -incremental option was specified * you can do as many subsequent incremental compiles as you like by calling this method. -- 2.39.5