mirror of
https://github.com/JetBrains/JetBrainsRuntime.git
synced 2025-12-06 09:29:38 +01:00
JBR-8255 pass WLToolkit-related settings to subprocesses launched by tests
This commit is contained in:
@@ -78,15 +78,17 @@ public class JEditorPaneFontFallback {
|
||||
private static BufferedImage renderJEditorPaneInSubprocess(String fontFamilyName, boolean afterFontInfoCaching)
|
||||
throws Exception {
|
||||
String tmpFileName = "image.png";
|
||||
Process process = Runtime.getRuntime().exec(new String[]{
|
||||
String[] processCmd = new String[]{
|
||||
System.getProperty("java.home") + File.separator + "bin" + File.separator + "java",
|
||||
"-cp",
|
||||
System.getProperty("test.classes", "."),
|
||||
System.getProperty("test.java.opts", ""),
|
||||
JEditorPaneRenderer.class.getName(),
|
||||
fontFamilyName,
|
||||
Boolean.toString(afterFontInfoCaching),
|
||||
tmpFileName
|
||||
});
|
||||
tmpFileName};
|
||||
System.out.println("===> Sub-process command: " + String.join(" ", processCmd));
|
||||
Process process = Runtime.getRuntime().exec(processCmd);
|
||||
int exitCode = process.waitFor();
|
||||
try {
|
||||
System.out.println("===> Sub-process stdout:");
|
||||
|
||||
@@ -66,6 +66,7 @@ public class bug8081019 {
|
||||
private static void runProcess() throws Exception {
|
||||
String javaPath = System.getProperty("java.home", "");
|
||||
String command = javaPath + File.separator + "bin" + File.separator + "java"
|
||||
+ " " + System.getProperty("test.java.opts", "")
|
||||
+ " " + bug8081019.class.getName() + " " + RUN_TEST;
|
||||
|
||||
Process process = Runtime.getRuntime().exec(command);
|
||||
|
||||
@@ -57,7 +57,7 @@ then
|
||||
exit 0
|
||||
else
|
||||
echo "There is GTK 3 library: we should use it"
|
||||
strace -o strace.log -fe open,openat ${TESTJAVA}/bin/java -cp ${TESTCLASSPATH} -Djdk.gtk.version=3 ProvokeGTK
|
||||
strace -o strace.log -fe open,openat ${TESTJAVA}/bin/java -cp ${TESTCLASSPATH} ${TESTJAVAOPTS} -Djdk.gtk.version=3 ProvokeGTK
|
||||
EXECRES=$?
|
||||
grep 'libgtk-3.*=\ *[0-9]*$' strace.log > logg
|
||||
fi
|
||||
|
||||
@@ -226,7 +226,7 @@ public final class UnninstallUIMemoryLeaks {
|
||||
private static Process runProcess(LookAndFeelInfo laf) throws Exception {
|
||||
ProcessBuilder pb = ProcessTools.createLimitedTestJavaProcessBuilder(
|
||||
"-Dswing.defaultlaf=" + laf.getClassName(), "-Xmx9m",
|
||||
"-XX:+HeapDumpOnOutOfMemoryError",
|
||||
"-XX:+HeapDumpOnOutOfMemoryError", System.getProperty("test.java.opts", ""),
|
||||
UnninstallUIMemoryLeaks.class.getSimpleName(), "mark");
|
||||
return ProcessTools.startProcess(laf.getName(), pb);
|
||||
}
|
||||
|
||||
@@ -50,7 +50,8 @@ public class bug8234913 {
|
||||
List<String> argsList = new ArrayList<>();
|
||||
Collections.addAll(argsList, args);
|
||||
Collections.addAll(argsList, "-Xmn8m");
|
||||
Collections.addAll(argsList, "-Dtest.class.path=" + System.getProperty("test.class.path", "."));
|
||||
Collections.addAll(argsList, "-Dtest.class.path=" + System.getProperty("test.class.path", ".")
|
||||
+ " " + System.getProperty("test.java.opts", ""));
|
||||
Collections.addAll(argsList, FontSizePercentTest.class.getName());
|
||||
return ProcessTools.createLimitedTestJavaProcessBuilder(argsList.toArray(new String[argsList.size()]));
|
||||
}
|
||||
|
||||
Reference in New Issue
Block a user