mirror of
https://gitflic.ru/project/openide/openide.git
synced 2026-02-05 08:06:56 +07:00
tests: support arg file shortening for fork mode (IDEA-243165)
GitOrigin-RevId: daa3dcdd25df61fd0fe8052081c407ec210c45d6
This commit is contained in:
committed by
intellij-monorepo-bot
parent
d46cbad180
commit
b5193374d2
@@ -16,6 +16,7 @@
|
||||
package com.intellij.rt.execution.testFrameworks;
|
||||
|
||||
import java.io.*;
|
||||
import java.nio.charset.Charset;
|
||||
import java.util.ArrayList;
|
||||
import java.util.List;
|
||||
import java.util.jar.Attributes;
|
||||
@@ -83,7 +84,21 @@ public abstract class ForkedByModuleSplitter {
|
||||
builder.add("-classpath");
|
||||
if (myDynamicClasspath.length() > 0) {
|
||||
try {
|
||||
builder.add(createClasspathJarFile(new Manifest(), classpath).getAbsolutePath());
|
||||
if ("ARGS_FILE".equals(myDynamicClasspath)) {
|
||||
File argFile = File.createTempFile("arg_file", null);
|
||||
argFile.deleteOnExit();
|
||||
FileOutputStream writer = new FileOutputStream(argFile);
|
||||
try {
|
||||
writer.write(classpath.getBytes(Charset.defaultCharset()));
|
||||
}
|
||||
finally {
|
||||
writer.close();
|
||||
}
|
||||
builder.add("@" + argFile.getAbsolutePath());
|
||||
}
|
||||
else {
|
||||
builder.add(createClasspathJarFile(new Manifest(), classpath).getAbsolutePath());
|
||||
}
|
||||
}
|
||||
catch (Throwable e) {
|
||||
builder.add(classpath);
|
||||
|
||||
Reference in New Issue
Block a user