mirror of
https://gitflic.ru/project/openide/openide.git
synced 2026-09-27 10:03:11 +07:00
fix test expectations
This commit is contained in:
@@ -152,10 +152,8 @@ public class BuildOperations {
|
||||
try {
|
||||
final Map<T, Set<File>> cleanedSources = new java.util.HashMap<T, Set<File>>();
|
||||
|
||||
ProjectBuilderLogger logger = context.getLoggingManager().getProjectBuilderLogger();
|
||||
final Collection<String> outputsToLog = logger.isEnabled() ? new LinkedList<String>() : null;
|
||||
final THashSet<File> dirsToDelete = new THashSet<File>(FileUtil.FILE_HASHING_STRATEGY);
|
||||
final THashSet<String> deletedPaths = new THashSet<String>();
|
||||
final Collection<String> deletedPaths = new ArrayList<String>();
|
||||
|
||||
dirtyFilesHolder.processDirtyFiles(new FileProcessor<R, T>() {
|
||||
private final Map<T, SourceToOutputMapping> mappingsCache = new java.util.HashMap<T, SourceToOutputMapping>(); // cache the mapping locally
|
||||
@@ -172,9 +170,6 @@ public class BuildOperations {
|
||||
if (outputs != null) {
|
||||
final boolean shouldPruneOutputDirs = target instanceof ModuleBasedTarget;
|
||||
for (String output : outputs) {
|
||||
if (outputsToLog != null) {
|
||||
outputsToLog.add(output);
|
||||
}
|
||||
final File outFile = new File(output);
|
||||
final boolean deleted = outFile.delete();
|
||||
if (deleted) {
|
||||
@@ -198,9 +193,13 @@ public class BuildOperations {
|
||||
}
|
||||
});
|
||||
|
||||
if (outputsToLog != null && context.isMake()) {
|
||||
logger.logDeletedFiles(outputsToLog);
|
||||
if (context.isMake()) {
|
||||
final ProjectBuilderLogger logger = context.getLoggingManager().getProjectBuilderLogger();
|
||||
if (logger.isEnabled()) {
|
||||
logger.logDeletedFiles(deletedPaths);
|
||||
}
|
||||
}
|
||||
|
||||
if (!deletedPaths.isEmpty()) {
|
||||
context.processMessage(new FileDeletedEvent(deletedPaths));
|
||||
}
|
||||
|
||||
+1
-1
@@ -23,7 +23,7 @@ public class RebuildArtifactOnConfigurationChangeTest extends ArtifactBuilderTes
|
||||
a.getRootElement().addChild(JpsPackagingElementFactory.getInstance().createDirectoryCopy(dir2));
|
||||
buildAll();
|
||||
assertOutput(a, fs().file("a.txt", "a").file("b.txt", "b"));
|
||||
assertCopied("dir1/a.txt", "dir2/b.txt");
|
||||
assertDeletedAndCopied("out/artifacts/a/a.txt", "dir1/a.txt", "dir2/b.txt");
|
||||
buildAllAndAssertUpToDate();
|
||||
}
|
||||
|
||||
|
||||
Reference in New Issue
Block a user