-
Notifications
You must be signed in to change notification settings - Fork 922
[GITHUB-6925] Fixing debugger tests. #9302
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
base: master
Are you sure you want to change the base?
Changes from all commits
File filter
Filter by extension
Conversations
Jump to
Diff view
Diff view
There are no files selected for viewing
| Original file line number | Diff line number | Diff line change |
|---|---|---|
|
|
@@ -1575,8 +1575,8 @@ jobs: | |
| - name: debugger.jpda.projectsui | ||
| run: ant $OPTS -f java/debugger.jpda.projectsui test | ||
|
|
||
| # - name: debugger.jpda.truffle | ||
| # run: ant $OPTS -f java/debugger.jpda.truffle test | ||
| - name: debugger.jpda.truffle | ||
| run: ant $OPTS -f java/debugger.jpda.truffle test | ||
|
|
||
| - name: debugger.jpda.ui | ||
| run: ant $OPTS -f java/debugger.jpda.ui test-unit | ||
|
|
@@ -2560,9 +2560,7 @@ jobs: | |
| timeout-minutes: 60 | ||
| strategy: | ||
| matrix: | ||
| # TODO uses GraalVM 17 / 22.3.1 which is the last known release which offers all required language extensions | ||
| # GraalVM based on JDK 21+ doesn't support the 'gu' tool anymore - extensions are now regular application dependencies | ||
| graal: [ '22.3.1' ] | ||
| graal: [ '21.0.2' ] | ||
| fail-fast: false | ||
|
|
||
| steps: | ||
|
|
@@ -2581,14 +2579,11 @@ jobs: | |
|
|
||
| - name: Setup GraalVM ${{ matrix.graal }} | ||
| run: | | ||
| URL=https://github.com/graalvm/graalvm-ce-builds/releases/download/vm-${{ matrix.graal }}/graalvm-ce-java17-linux-amd64-${{ matrix.graal }}.tar.gz | ||
| URL=https://github.com/graalvm/graalvm-ce-builds/releases/download/jdk-${{ matrix.graal }}/graalvm-community-jdk-${{ matrix.graal }}_linux-x64_bin.tar.gz | ||
| curl -L $URL | tar -xz | ||
| GRAALVM=`pwd`/graalvm-ce-java17-${{ matrix.graal }} | ||
| GRAALVM=`pwd`/graalvm-community-jdk-${{ matrix.graal }} | ||
|
Comment on lines
-2586
to
+2584
Member
There was a problem hiding this comment. Choose a reason for hiding this commentThe reason will be displayed to describe this comment to others. Learn more. looks like the extracted folder is now different from the archive name. this worked for me locally: |
||
| echo "JAVA_HOME=$GRAALVM" >> $GITHUB_ENV | ||
|
|
||
| - name: Setup GraalVM Languages (python, R, ruby and js) | ||
| run: $JAVA_HOME/bin/gu install --no-progress python R ruby js | ||
|
|
||
| - name: platform/core.network | ||
| run: ant $OPTS -f platform/core.network test | ||
|
|
||
|
|
||
| Original file line number | Diff line number | Diff line change |
|---|---|---|
|
|
@@ -258,6 +258,12 @@ | |
| <test-dependencies> | ||
| <test-type> | ||
| <name>unit</name> | ||
| <test-dependency> | ||
| <code-name-base>org.netbeans.api.debugger.jpda</code-name-base> | ||
| <recursive/> | ||
| <compile-dependency/> | ||
| <test/> | ||
| </test-dependency> | ||
| <test-dependency> | ||
| <code-name-base>org.netbeans.core.startup</code-name-base> | ||
| <recursive/> | ||
|
|
@@ -266,25 +272,22 @@ | |
| <code-name-base>org.netbeans.libs.freemarker</code-name-base> | ||
| <recursive/> | ||
| </test-dependency> | ||
| <test-dependency> | ||
| <code-name-base>org.netbeans.libs.graaljs</code-name-base> | ||
|
Contributor
There was a problem hiding this comment. Choose a reason for hiding this commentThe reason will be displayed to describe this comment to others. Learn more. Graal.js is packaged as NetBeans module, so reusing it is a great idea. |
||
| </test-dependency> | ||
| <test-dependency> | ||
| <code-name-base>org.netbeans.libs.javacapi</code-name-base> | ||
| <recursive/> | ||
| </test-dependency> | ||
| <test-dependency> | ||
| <code-name-base>org.netbeans.modules.debugger.jpda</code-name-base> | ||
| <compile-dependency/> | ||
| <test/> | ||
| <code-name-base>org.netbeans.libs.junit4</code-name-base> | ||
| <compile-dependency/> | ||
| </test-dependency> | ||
| <test-dependency> | ||
| <code-name-base>org.netbeans.api.debugger.jpda</code-name-base> | ||
| <recursive/> | ||
| <code-name-base>org.netbeans.modules.debugger.jpda</code-name-base> | ||
| <compile-dependency/> | ||
| <test/> | ||
| </test-dependency> | ||
| <test-dependency> | ||
| <code-name-base>org.netbeans.libs.junit4</code-name-base> | ||
| <compile-dependency/> | ||
| </test-dependency> | ||
| <test-dependency> | ||
| <code-name-base>org.netbeans.modules.nbjunit</code-name-base> | ||
| <recursive/> | ||
|
|
||
| Original file line number | Diff line number | Diff line change |
|---|---|---|
|
|
@@ -209,50 +209,10 @@ public static JPDASupport attach (String[] vmArgs, String mainClass, String[] ar | |
| return new JPDASupport (jpdaDebugger, pio); | ||
| } | ||
|
|
||
| public static JPDASupport attachScript(String launcher, String path) throws IOException, DebuggerStartException { | ||
|
Contributor
There was a problem hiding this comment. Choose a reason for hiding this commentThe reason will be displayed to describe this comment to others. Learn more. Huge simplification by deleting a lot of code. Good work! |
||
| String [] cmdArray = new String [] { | ||
| launcherPath(launcher), | ||
| "--jvm", | ||
| "--vm.agentlib:jdwp=transport=dt_socket,suspend=y,server=y", | ||
| path | ||
| }; | ||
| Process process = Runtime.getRuntime ().exec (cmdArray); | ||
| String line = readLine (process.getInputStream ()); | ||
| int port = Integer.parseInt (line.substring (line.lastIndexOf (':') + 1).trim ()); | ||
| ProcessIO pio = new ProcessIO (process); | ||
| pio.go(); | ||
|
|
||
| VirtualMachineManager vmm = Bootstrap.virtualMachineManager(); | ||
| List aconnectors = vmm.attachingConnectors(); | ||
| AttachingConnector connector = null; | ||
| for (Iterator i = aconnectors.iterator(); i.hasNext();) { | ||
| AttachingConnector ac = (AttachingConnector) i.next(); | ||
| Transport t = ac.transport (); | ||
| if (t != null && t.name().equals("dt_socket")) { | ||
| connector = ac; | ||
| break; | ||
| } | ||
| } | ||
| if (connector == null) { | ||
| throw new RuntimeException("No attaching socket connector available"); | ||
| } | ||
|
|
||
| JPDADebugger jpdaDebugger = JPDADebugger.attach ( | ||
| "localhost", | ||
| port, | ||
| new Object[]{} | ||
| ); | ||
| return new JPDASupport(jpdaDebugger, pio); | ||
| } | ||
|
|
||
| private static String launcherPath(String launcher) { | ||
| return System.getProperty("java.home") + File.separatorChar + "bin" + File.separatorChar + launcher; | ||
| } | ||
|
|
||
| public static boolean isLauncherAvailable(String launcher) { | ||
| return Files.exists(Paths.get(launcherPath(launcher))); | ||
| } | ||
|
|
||
| // public interface ........................................................ | ||
|
|
||
| public void doContinue () { | ||
|
|
||
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
+1, I am really glad to see the tests being run regularly!