File tree Expand file tree Collapse file tree 1 file changed +17
-8
lines changed
eclipse.platform.releng/bundles/org.eclipse.test/src/org/eclipse/test Expand file tree Collapse file tree 1 file changed +17
-8
lines changed Original file line number Diff line number Diff line change 11/*******************************************************************************
2- * Copyright (c) 2016 IBM Corporation and others.
2+ * Copyright (c) 2016, 2025 IBM Corporation and others.
33 *
44 * This program and the accompanying materials
55 * are made available under the terms of the Eclipse Public License 2.0
@@ -124,13 +124,22 @@ public static File getResultsDirectory() {
124124 }
125125
126126 private static File getJunitReportOutput () {
127- String [] args = Platform .getCommandLineArgs ();
128- for (int i = 0 ; i < args .length - 1 ; i ++) {
129- if ("-junitReportOutput" .equals (args [i ])) { // see library.xml and org.eclipse.test.EclipseTestRunner
130- return new File (args [i + 1 ]).getAbsoluteFile ();
131- }
132- }
133- return null ;
127+ boolean platformAvailable = false ;
128+ try {
129+ Class .forName ("org.eclipse.core.runtime.Platform" , false , Screenshots .class .getClassLoader ());
130+ platformAvailable = true ;
131+ } catch (ClassNotFoundException e ) {
132+ platformAvailable = false ;
133+ }
134+ if (platformAvailable ) {
135+ String [] args = Platform .getCommandLineArgs ();
136+ for (int i = 0 ; i < args .length - 1 ; i ++) {
137+ if ("-junitReportOutput" .equals (args [i ])) { // see library.xml and org.eclipse.test.EclipseTestRunner
138+ return new File (args [i + 1 ]).getAbsoluteFile ();
139+ }
140+ }
141+ }
142+ return null ;
134143 }
135144
136145 /**
You can’t perform that action at this time.
0 commit comments