81 }
82
83 /**
84 * Return combination of {@link JpsArg} as a String array
85 */
86 public static String[] asCmdArray(List<JpsArg> jpsArgs) {
87 List<String> list = new ArrayList<>();
88 for (JpsArg jpsArg : jpsArgs) {
89 list.add("-" + jpsArg.toString());
90 }
91 return list.toArray(new String[list.size()]);
92 }
93
94 }
95
96 /**
97 * VM arguments to start test application with.
98 * -XX:+UsePerfData is required for running the tests on embedded platforms.
99 */
100 public static final String[] VM_ARGS = {
101 "-XX:+UsePerfData", "-Xmx512m", "-XX:+PrintGCDetails",
102 "-Dmultiline.prop=value1\nvalue2\r\nvalue3"
103 };
104 /**
105 * VM flag to start test application with
106 */
107 public static final String VM_FLAG = "+DisableExplicitGC";
108
109 private static File vmFlagsFile = null;
110 private static List<String> testVmArgs = null;
111 private static File manifestFile = null;
112
113 /**
114 * Create a file containing VM_FLAG in the working directory
115 */
116 public static File getVmFlagsFile() throws IOException {
117 if (vmFlagsFile == null) {
118 vmFlagsFile = new File("vmflags");
119 try (BufferedWriter output = new BufferedWriter(new FileWriter(vmFlagsFile))) {
120 output.write(VM_FLAG);
121 }
|
81 }
82
83 /**
84 * Return combination of {@link JpsArg} as a String array
85 */
86 public static String[] asCmdArray(List<JpsArg> jpsArgs) {
87 List<String> list = new ArrayList<>();
88 for (JpsArg jpsArg : jpsArgs) {
89 list.add("-" + jpsArg.toString());
90 }
91 return list.toArray(new String[list.size()]);
92 }
93
94 }
95
96 /**
97 * VM arguments to start test application with.
98 * -XX:+UsePerfData is required for running the tests on embedded platforms.
99 */
100 public static final String[] VM_ARGS = {
101 "-XX:+UsePerfData", "-Xmx512m", "-Xlog:gc*=debug",
102 "-Dmultiline.prop=value1\nvalue2\r\nvalue3"
103 };
104 /**
105 * VM flag to start test application with
106 */
107 public static final String VM_FLAG = "+DisableExplicitGC";
108
109 private static File vmFlagsFile = null;
110 private static List<String> testVmArgs = null;
111 private static File manifestFile = null;
112
113 /**
114 * Create a file containing VM_FLAG in the working directory
115 */
116 public static File getVmFlagsFile() throws IOException {
117 if (vmFlagsFile == null) {
118 vmFlagsFile = new File("vmflags");
119 try (BufferedWriter output = new BufferedWriter(new FileWriter(vmFlagsFile))) {
120 output.write(VM_FLAG);
121 }
|