Skip to content

Commit

Permalink
8288989: Make tests not depend on the source code
Browse files Browse the repository at this point in the history
Reviewed-by: mcimadamore
  • Loading branch information
asotona committed Dec 14, 2023
1 parent d2ba3b1 commit 2838a91
Show file tree
Hide file tree
Showing 2 changed files with 11 additions and 3 deletions.
Original file line number Diff line number Diff line change
Expand Up @@ -50,8 +50,12 @@

public class TestDocletExample extends TestRunner {
public static void main(String... args) throws Exception {
var t = new TestDocletExample();
t.runTests(m -> new Object[] { Path.of(m.getName()) });
try {
var t = new TestDocletExample();
t.runTests(m -> new Object[] { Path.of(m.getName()) });
} catch (SnippetUtils.ConfigurationException e) {
System.err.println("NOTE: " + e.getMessage() + "; test skipped");
}
}

SnippetUtils snippets;
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -58,7 +58,11 @@
*/
public class TestJavaxToolsSnippets extends TestRunner {
public static void main(String... args) throws Exception {
new TestJavaxToolsSnippets().runTests(m -> new Object[] { Path.of(m.getName()) });
try {
new TestJavaxToolsSnippets().runTests(m -> new Object[] { Path.of(m.getName()) });
} catch (SnippetUtils.ConfigurationException e) {
System.err.println("NOTE: " + e.getMessage() + "; test skipped");
}
}

SnippetUtils snippets = new SnippetUtils("java.compiler");
Expand Down

5 comments on commit 2838a91

@openjdk-notifier
Copy link

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

@asotona
Copy link
Member Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

/backport jdk22

@openjdk
Copy link

@openjdk openjdk bot commented on 2838a91 Dec 14, 2023

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

@asotona the backport was successfully created on the branch backport-asotona-2838a916 in my personal fork of openjdk/jdk22. To create a pull request with this backport targeting openjdk/jdk22:master, just click the following link:

➡️ Create pull request

The title of the pull request is automatically filled in correctly and below you find a suggestion for the pull request body:

Hi all,

This pull request contains a backport of commit 2838a916 from the openjdk/jdk repository.

The commit being backported was authored by Adam Sotona on 14 Dec 2023 and was reviewed by Maurizio Cimadamore.

Thanks!

If you need to update the source branch of the pull then run the following commands in a local clone of your personal fork of openjdk/jdk22:

$ git fetch https://github.com/openjdk-bots/jdk22.git backport-asotona-2838a916:backport-asotona-2838a916
$ git checkout backport-asotona-2838a916
# make changes
$ git add paths/to/changed/files
$ git commit --message 'Describe additional changes made'
$ git push https://github.com/openjdk-bots/jdk22.git backport-asotona-2838a916

@GoeLin
Copy link
Member

@GoeLin GoeLin commented on 2838a91 Mar 18, 2024

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

/backport jdk21u-dev

@openjdk
Copy link

@openjdk openjdk bot commented on 2838a91 Mar 18, 2024

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

@GoeLin the backport was successfully created on the branch backport-GoeLin-2838a916 in my personal fork of openjdk/jdk21u-dev. To create a pull request with this backport targeting openjdk/jdk21u-dev:master, just click the following link:

➡️ Create pull request

The title of the pull request is automatically filled in correctly and below you find a suggestion for the pull request body:

Hi all,

This pull request contains a backport of commit 2838a916 from the openjdk/jdk repository.

The commit being backported was authored by Adam Sotona on 14 Dec 2023 and was reviewed by Maurizio Cimadamore.

Thanks!

If you need to update the source branch of the pull then run the following commands in a local clone of your personal fork of openjdk/jdk21u-dev:

$ git fetch https://github.com/openjdk-bots/jdk21u-dev.git backport-GoeLin-2838a916:backport-GoeLin-2838a916
$ git checkout backport-GoeLin-2838a916
# make changes
$ git add paths/to/changed/files
$ git commit --message 'Describe additional changes made'
$ git push https://github.com/openjdk-bots/jdk21u-dev.git backport-GoeLin-2838a916

Please sign in to comment.