aboutsummaryrefslogtreecommitdiffstats
path: root/testing
diff options
context:
space:
mode:
authorwisberg <wisberg>2003-05-31 07:25:30 +0000
committerwisberg <wisberg>2003-05-31 07:25:30 +0000
commit1dfd90af588d2a4661b22494b2edee4512d3475f (patch)
treee0a15a2149d3dd2438d6aafe2e51041b88f2777a /testing
parentedf8758cbac5ff622370778ca3821b257aa70acc (diff)
downloadaspectj-1dfd90af588d2a4661b22494b2edee4512d3475f.tar.gz
aspectj-1dfd90af588d2a4661b22494b2edee4512d3475f.zip
delay until after final last-modified-time stamp on newly-staged files
since last-modified-time stamp can be delayed by filesystem buffering and rounding-up to next second.
Diffstat (limited to 'testing')
-rw-r--r--testing/src/org/aspectj/testing/harness/bridge/CompilerRun.java7
-rw-r--r--testing/src/org/aspectj/testing/harness/bridge/IncCompilerRun.java8
2 files changed, 15 insertions, 0 deletions
diff --git a/testing/src/org/aspectj/testing/harness/bridge/CompilerRun.java b/testing/src/org/aspectj/testing/harness/bridge/CompilerRun.java
index 80798e1a8..680ecbea9 100644
--- a/testing/src/org/aspectj/testing/harness/bridge/CompilerRun.java
+++ b/testing/src/org/aspectj/testing/harness/bridge/CompilerRun.java
@@ -237,6 +237,13 @@ public class CompilerRun implements IAjcRun {
for (int i = 0; i < sourcerootFiles.length; i++) {
FileUtil.deleteContents(sourcerootFiles[i], pickIncFiles, false);
}
+ if (0 < sourcerootFiles.length) {
+ FileUtil.sleepPastFinalModifiedTime(sourcerootFiles);
+ }
+ }
+ File[] files = FileUtil.getBaseDirFiles(sandbox.stagingDir, srcPaths);
+ if (0 < files.length) {
+ FileUtil.sleepPastFinalModifiedTime(files);
}
} catch (IllegalArgumentException e) {
validator.fail("staging - bad input", e);
diff --git a/testing/src/org/aspectj/testing/harness/bridge/IncCompilerRun.java b/testing/src/org/aspectj/testing/harness/bridge/IncCompilerRun.java
index dc2e858bc..b4302ac63 100644
--- a/testing/src/org/aspectj/testing/harness/bridge/IncCompilerRun.java
+++ b/testing/src/org/aspectj/testing/harness/bridge/IncCompilerRun.java
@@ -16,6 +16,7 @@ package org.aspectj.testing.harness.bridge;
import java.io.File;
import java.io.FileFilter;
import java.io.IOException;
+import java.util.*;
import java.util.ArrayList;
import java.util.Arrays;
import java.util.Collections;
@@ -109,6 +110,8 @@ public class IncCompilerRun implements IAjcRun {
int numDeletes;
int numFails;
}
+ // sigh - delay until after last last-mod-time
+ final ArrayList copied = new ArrayList();
final intHolder holder = new intHolder();
FileFilter deleteOrCount = new FileFilter() {
final String clip = ".delete" + toSuffix;
@@ -119,6 +122,7 @@ public class IncCompilerRun implements IAjcRun {
if (!path.endsWith(clip)) {
holder.numCopies++;
validator.info("copying file: " + path);
+ copied.add(file);
} else {
doCopy = false;
path = path.substring(0, path.length()-clip.length()) + toSuffix;
@@ -143,6 +147,10 @@ public class IncCompilerRun implements IAjcRun {
} else {
result = (0 == holder.numFails);
}
+ if (0 < copied.size()) {
+ File[] files = (File[]) copied.toArray(new File[0]);
+ FileUtil.sleepPastFinalModifiedTime(files);
+ }
} catch (NullPointerException npe) {
validator.fail("staging - input", npe);
} catch (IOException e) {