Integrated: 8334238: Enhance AddLShortcutTest jpackage test
Alexey Semenyuk
asemenyuk at openjdk.org
Thu Aug 7 02:05:31 UTC 2025
On Thu, 31 Jul 2025 22:42:02 GMT, Alexey Semenyuk <asemenyuk at openjdk.org> wrote:
> - 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.
This pull request has now been integrated.
Changeset: 7e484e2a
Author: Alexey Semenyuk <asemenyuk at openjdk.org>
URL: https://git.openjdk.org/jdk/commit/7e484e2a63e40740282b3da5d7b10e9f500bf6ab
Stats: 2823 lines in 23 files changed: 2093 ins; 492 del; 238 mod
8334238: Enhance AddLShortcutTest jpackage test
Reviewed-by: almatvee
-------------
PR: https://git.openjdk.org/jdk/pull/26584
More information about the core-libs-dev
mailing list