Skip to content

Commit

Permalink
Fix /private/tmp/Eclipse.app/../Eclipse/features/net.openchrom.jre.ma…
Browse files Browse the repository at this point in the history
…cosx.cocoa.aarch64.feature_17.0.11/jre/jdk-17.0.11+9-jre/Contents/Home/lib/libjli.dylibdoes

not exist

Ignore AUT configuration if Runner is explicitly given a VM in command
line.
Resolve VM paths relative to configuration file location.
  • Loading branch information
basilevs committed May 3, 2024
1 parent b51d488 commit 7553feb
Show file tree
Hide file tree
Showing 8 changed files with 97 additions and 13 deletions.
2 changes: 1 addition & 1 deletion build_runner.sh
Original file line number Diff line number Diff line change
Expand Up @@ -9,7 +9,7 @@
# Contributors:
# Xored Software Inc - initial API and implementation and/or initial documentation
#*******************************************************************************
export MAVEN_OPTS="-Xms512m -Xmx756m -XX:MaxPermSize=256m"
export MAVEN_OPTS="-Xms512m -Xmx756m"

OPTIONS="-Dtycho.localArtifacts=ignore $@"

Expand Down
49 changes: 49 additions & 0 deletions devenv/launches/RCPTT Runner.launch
Original file line number Diff line number Diff line change
@@ -0,0 +1,49 @@
<?xml version="1.0" encoding="UTF-8" standalone="no"?>
<launchConfiguration type="org.eclipse.pde.ui.RuntimeWorkbench">
<booleanAttribute key="append.args" value="true"/>
<stringAttribute key="application" value="org.eclipse.rcptt.runner.headless"/>
<booleanAttribute key="askclear" value="false"/>
<booleanAttribute key="automaticAdd" value="false"/>
<booleanAttribute key="automaticIncludeRequirements" value="true"/>
<booleanAttribute key="automaticValidate" value="true"/>
<stringAttribute key="bootstrap" value=""/>
<stringAttribute key="checked" value="[NONE]"/>
<booleanAttribute key="clearConfig" value="true"/>
<booleanAttribute key="clearws" value="true"/>
<booleanAttribute key="clearwslog" value="false"/>
<stringAttribute key="configLocation" value="${workspace_loc}/.metadata/.plugins/org.eclipse.pde.core/RCPTT Runner"/>
<booleanAttribute key="default" value="false"/>
<setAttribute key="deselected_workspace_bundles"/>
<booleanAttribute key="includeOptional" value="false"/>
<stringAttribute key="location" value="${workspace_loc}/../runtime-RCPTTRunner"/>
<booleanAttribute key="org.eclipse.debug.core.ATTR_FORCE_SYSTEM_CONSOLE_ENCODING" value="false"/>
<booleanAttribute key="org.eclipse.jdt.launching.ATTR_ATTR_USE_ARGFILE" value="false"/>
<booleanAttribute key="org.eclipse.jdt.launching.ATTR_SHOW_CODEDETAILS_IN_EXCEPTION_MESSAGES" value="true"/>
<booleanAttribute key="org.eclipse.jdt.launching.ATTR_USE_START_ON_FIRST_THREAD" value="true"/>
<stringAttribute key="org.eclipse.jdt.launching.JRE_CONTAINER" value="org.eclipse.jdt.launching.JRE_CONTAINER/org.eclipse.jdt.internal.debug.ui.launcher.StandardVMType/JavaSE-17"/>
<stringAttribute key="org.eclipse.jdt.launching.PROGRAM_ARGUMENTS" value="-os ${target.os} -ws ${target.ws} -arch ${target.arch} -nl ${target.nl} -consoleLog&#10;-aut /private/tmp/Eclipse.app -autArgs '-eclipse.password;/private/tmp/lablicate/exec-process/master' -autWsPrefix /private/tmp/lablicate/exec-process/../results/demo//aut-workspace- -autConsolePrefix /private/tmp/lablicate/exec-process/../results/demo//aut-out- -autVM /Users/vasiligulevich/.p2/pool/plugins/org.eclipse.justj.openjdk.hotspot.jre.full.macosx.aarch64_21.0.2.v20240123-0840/jre -htmlReport /private/tmp/lablicate/exec-process/../results/demo//results.html -junitReport /private/tmp/lablicate/exec-process/../results/demo//results.xml -import /private/tmp/lablicate/exec-process -tests exec-process.test"/>
<stringAttribute key="org.eclipse.jdt.launching.SOURCE_PATH_PROVIDER" value="org.eclipse.pde.ui.workbenchClasspathProvider"/>
<stringAttribute key="org.eclipse.jdt.launching.VM_ARGUMENTS" value="-Dorg.eclipse.swt.graphics.Resource.reportNonDisposed=true"/>
<stringAttribute key="pde.version" value="3.3"/>
<stringAttribute key="product" value="org.eclipse.rcptt.platform.product"/>
<setAttribute key="selected_target_bundles">
<setEntry value="org.eclipse.equinox.app@default:default"/>
<setEntry value="org.eclipse.equinox.p2.transport.ecf@default:default"/>
<setEntry value="org.eclipse.osgi.compatibility.state@default:false"/>
<setEntry value="org.eclipse.swt.cocoa.macosx.aarch64@default:false"/>
</setAttribute>
<setAttribute key="selected_workspace_bundles">
<setEntry value="org.eclipse.rcptt.ctx.workbench@default:default"/>
<setEntry value="org.eclipse.rcptt.runner@default:default"/>
<setEntry value="org.eclipse.rcptt.updates.aspectj.e44x@default:default"/>
<setEntry value="org.eclipse.rcptt.updates.kepler@default:default"/>
<setEntry value="org.eclipse.rcptt.updates.runtime.e4x@default:default"/>
</setAttribute>
<booleanAttribute key="show_selected_only" value="false"/>
<stringAttribute key="templateConfig" value="${target_home}/configuration/config.ini"/>
<booleanAttribute key="tracing" value="false"/>
<booleanAttribute key="useCustomFeatures" value="false"/>
<booleanAttribute key="useDefaultConfig" value="true"/>
<booleanAttribute key="useDefaultConfigArea" value="true"/>
<booleanAttribute key="useProduct" value="false"/>
</launchConfiguration>
Original file line number Diff line number Diff line change
Expand Up @@ -25,6 +25,8 @@
import java.net.MalformedURLException;
import java.net.URI;
import java.net.URL;
import java.nio.file.Path;
import java.nio.file.Paths;
import java.util.ArrayList;
import java.util.Arrays;
import java.util.Collection;
Expand Down Expand Up @@ -1030,11 +1032,17 @@ private String getVmArg(File eclipseIniFile) {
}

public String getVmFromIniFile() {
for (File file : getAppIniFiles()) {
String result = getVmArg(file);
if (result != null) {
return result;
for (File iniFile : getAppIniFiles()) {
String result = getVmArg(iniFile);
if (result == null) {
continue;
}
Path iniPath = iniFile.toPath();
Path vmPath = Paths.get(result);
if (!vmPath.isAbsolute()) {
vmPath = iniPath.getParent().resolve(vmPath);
}
return vmPath.toString();
}
return null;
}
Expand Down
11 changes: 11 additions & 0 deletions rcp/contexts/org.eclipse.rcptt.ctx.preferences.ui/.project
Original file line number Diff line number Diff line change
Expand Up @@ -25,4 +25,15 @@
<nature>org.eclipse.pde.PluginNature</nature>
<nature>org.eclipse.jdt.core.javanature</nature>
</natures>
<filteredResources>
<filter>
<id>1714208078953</id>
<name></name>
<type>10</type>
<matcher>
<id>org.eclipse.ui.ide.multiFilter</id>
<arguments>1.0-name-matches-true-false-target</arguments>
</matcher>
</filter>
</filteredResources>
</projectDescription>
2 changes: 1 addition & 1 deletion runner/org.eclipse.rcptt.runner/.classpath
Original file line number Diff line number Diff line change
@@ -1,6 +1,6 @@
<?xml version="1.0" encoding="UTF-8"?>
<classpath>
<classpathentry kind="con" path="org.eclipse.jdt.launching.JRE_CONTAINER/org.eclipse.jdt.internal.debug.ui.launcher.StandardVMType/JavaSE-1.6"/>
<classpathentry kind="con" path="org.eclipse.jdt.launching.JRE_CONTAINER/org.eclipse.jdt.internal.debug.ui.launcher.StandardVMType/JavaSE-17"/>
<classpathentry kind="con" path="org.eclipse.pde.core.requiredPlugins"/>
<classpathentry kind="src" path="src"/>
<classpathentry kind="output" path="bin"/>
Expand Down
Original file line number Diff line number Diff line change
@@ -0,0 +1,9 @@
eclipse.preferences.version=1
org.eclipse.jdt.core.compiler.codegen.targetPlatform=17
org.eclipse.jdt.core.compiler.compliance=17
org.eclipse.jdt.core.compiler.problem.assertIdentifier=error
org.eclipse.jdt.core.compiler.problem.enablePreviewFeatures=disabled
org.eclipse.jdt.core.compiler.problem.enumIdentifier=error
org.eclipse.jdt.core.compiler.problem.reportPreviewFeatures=warning
org.eclipse.jdt.core.compiler.release=enabled
org.eclipse.jdt.core.compiler.source=17
Original file line number Diff line number Diff line change
Expand Up @@ -190,7 +190,7 @@ public String addJvmFromIniFile() {
}
if (!file.exists()) {
System.out
.println(file + "does not exist");
.println(file + " does not exist");
return null;
}

Expand All @@ -207,6 +207,13 @@ public String addJvmFromIniFile() {
.println("Unknown file system layout of Java VM from ini file");
return null;
}

try {
file = file.getCanonicalFile();
} catch (IOException e) {
e.printStackTrace();
return null;
}

IVMInstallType type = JavaRuntime.getVMInstallType(VM_INSTALL_TYPE);
if (type == null) {
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -209,12 +209,12 @@ private ILaunchConfiguration createAUTLaunchConfiguration(String autWorkspace, i
"org.eclipse.jdt.launching.JRE_CONTAINER/org.eclipse.jdt.internal.debug.ui.launcher.StandardVMType/"
+ autVM);
config.setAttribute(IPDEConstants.APPEND_ARGS_EXPLICITLY, true);
}

String vmFromIni = manager.addJvmFromIniFile();
if (vmFromIni != null) {
config.setAttribute(IJavaLaunchConfigurationConstants.ATTR_JRE_CONTAINER_PATH, vmFromIni);
config.setAttribute(IPDEConstants.APPEND_ARGS_EXPLICITLY, true);
} else {
String vmFromIni = manager.addJvmFromIniFile();
if (vmFromIni != null) {
config.setAttribute(IJavaLaunchConfigurationConstants.ATTR_JRE_CONTAINER_PATH, vmFromIni);
config.setAttribute(IPDEConstants.APPEND_ARGS_EXPLICITLY, true);
}
}

if (conf.enableSoftwareInstallation)
Expand Down

0 comments on commit 7553feb

Please sign in to comment.