Skip to content

8334238: Enhance AddLShortcutTest jpackage test #26584

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

Closed

Conversation

alexeysemenyukoracle
Copy link
Member

@alexeysemenyukoracle alexeysemenyukoracle commented Jul 31, 2025

  • Enhance AddLShortcutTest to cover more combinations of shortcut configurations of the main and additional launchers.
  • Test shortcuts in the predefined app image.

Additionally, rework launcher verification: move launcher icon and shortcut verification code from AdditionalLauncher into LauncherVerifier. This way launcher verification code is encapsulated in a single class that is applied to the main and additional launchers.

Rework launcher shortcut verification on Windows: Read shortcuts from MSI tables. This allows testing of expected and actual shortcuts without installing the MSI. This refactoring removed duplicated checks of file associations: It was performed for every additional launcher; now it is executed for the main launcher only. File association is bound to the main launcher, there is no point to verify it as many times as the number of launchers.

Implement launching launchers through shortcuts on Linux and Windows. The new AddLShortcutTest.testInvokeShortcuts test uses this new functionality.

Not directly related to the subject of the PR:

  • JPackageCommand: Added missing and removed redundant verifyMutable() calls. Converted "jpt-unpacked-folder" option into the member field. Added JPackageCommand.createMutableCopy() complementary to the existing JPackageCommand.createImmutableCopy().
  • Refactor TKit.waitForFileCreated() to use classes from the java.time package.
  • Added test/jdk/tools/jpackage/clean_test_output.sh Bash script filtering test logs to minimize noise in diffs.

Compared traces of IconTest, AddlauncherTest, and AddLShortcutTest tests with and without this patch to verify no unexpected changes in the coverage.


Progress

  • Change must be properly reviewed (1 review required, with at least 1 Reviewer)
  • Change must not contain extraneous whitespace
  • Commit message must refer to an issue

Issue

  • JDK-8334238: Enhance AddLShortcutTest jpackage test (Enhancement - P3)

Reviewers

Reviewing

Using git

Checkout this PR locally:
$ git fetch https://git.openjdk.org/jdk.git pull/26584/head:pull/26584
$ git checkout pull/26584

Update a local copy of the PR:
$ git checkout pull/26584
$ git pull https://git.openjdk.org/jdk.git pull/26584/head

Using Skara CLI tools

Checkout this PR locally:
$ git pr checkout 26584

View PR using the GUI difftool:
$ git pr show -t 26584

Using diff file

Download this PR as a diff file:
https://git.openjdk.org/jdk/pull/26584.diff

Using Webrev

Link to Webrev Comment

…I bundles. With this patch, there is no longer a need to install an MSI package to verify shortcuts.
… verify the contents of an icon file or just verify the icon file's availability.
…: follow-up for function renames in the AdditionalLauncher.
…ditionalLauncher. Introduce LauncherShortcut, LauncherVerifier, LauncherVerifier verifies attributes of any launcher - the main or additional. Add JPackageCommand.createMutableCopy(), hide the copy ctor.
…installed in the system folder on package install and uninstalled on package uninstall. Always verify contents of .desktop files.
…ations of startup directory in the main launcher and in the additional launcher; add testInvokeShortcuts() to invoke launchers through shortcuts and verify work directory; cover shortcuts in the predefined app image
@bridgekeeper
Copy link

bridgekeeper bot commented Jul 31, 2025

👋 Welcome back asemenyuk! A progress list of the required criteria for merging this PR into master will be added to the body of your pull request. There are additional pull request commands available for use with this pull request.

@openjdk
Copy link

openjdk bot commented Jul 31, 2025

@alexeysemenyukoracle This change now passes all automated pre-integration checks.

ℹ️ This project also has non-automated pre-integration requirements. Please see the file CONTRIBUTING.md for details.

After integration, the commit message for the final commit will be:

8334238: Enhance AddLShortcutTest jpackage test

Reviewed-by: almatvee

You can use pull request commands such as /summary, /contributor and /issue to adjust it as needed.

At the time when this comment was updated there had been no new commits pushed to the master branch. If another commit should be pushed before you perform the /integrate command, your PR will be automatically rebased. If you prefer to avoid any potential automatic rebasing, please check the documentation for the /integrate command for further details.

➡️ To integrate this PR with the above commit message to the master branch, type /integrate in a new comment.

@openjdk
Copy link

openjdk bot commented Jul 31, 2025

@alexeysemenyukoracle The following label will be automatically applied to this pull request:

  • core-libs

When this pull request is ready to be reviewed, an "RFR" email will be sent to the corresponding mailing list. If you would like to change these labels, use the /label pull request command.

@openjdk openjdk bot added the core-libs core-libs-dev@openjdk.org label Jul 31, 2025
@openjdk openjdk bot added the rfr Pull request is ready for review label Aug 1, 2025
@mlbridge
Copy link

mlbridge bot commented Aug 1, 2025

Webrevs

@openjdk
Copy link

openjdk bot commented Aug 6, 2025

⚠️ @alexeysemenyukoracle This pull request contains merges that bring in commits not present in the target repository. Since this is not a "merge style" pull request, these changes will be squashed when this pull request in integrated. If this is your intention, then please ignore this message. If you want to preserve the commit structure, you must change the title of this pull request to Merge <project>:<branch> where <project> is the name of another project in the OpenJDK organization (for example Merge jdk:master).

Copy link
Member

@sashamatveev sashamatveev left a comment

Choose a reason for hiding this comment

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

Looks good.

@openjdk openjdk bot added the ready Pull request is ready to be integrated label Aug 6, 2025
@alexeysemenyukoracle
Copy link
Member Author

/integrate

@openjdk
Copy link

openjdk bot commented Aug 7, 2025

Going to push as commit 7e484e2.

@openjdk openjdk bot added the integrated Pull request has been integrated label Aug 7, 2025
@openjdk openjdk bot closed this Aug 7, 2025
@openjdk openjdk bot removed ready Pull request is ready to be integrated rfr Pull request is ready for review labels Aug 7, 2025
@openjdk
Copy link

openjdk bot commented Aug 7, 2025

@alexeysemenyukoracle Pushed as commit 7e484e2.

💡 You may see a message that your pull request was closed with unmerged commits. This can be safely ignored.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
core-libs core-libs-dev@openjdk.org integrated Pull request has been integrated
Development

Successfully merging this pull request may close these issues.

2 participants