> Previously, the test expected a precise match between the produced and > expected error messages, but such a check fails when the test fails for > more than the expected reason, like when WiX is not available on > Windows. This patch changes the precise equality check with a substring > check to work around the problem. > > Validated this patch on a Windows box that doesn't have WiX available. > > --------- > - [x] I confirm that I make this contribution in accordance with the [OpenJDK > Interim AI Policy](https://openjdk.org/legal/ai).
Ashay Rane has updated the pull request incrementally with one additional commit since the last revision: Skip test if WiX isn't available or the test spec doesn't care about WiX Instead of relaxing the error check, this patch selectively skips test cases when the test case either doesn't care about WiX (like the `--help` or `--version` test cases) or when WiX is necessary to run the test case but WiX isn't available. To probe if WiX is available, we use reflection to call `jdk.jpackage.internal.WixTool.createToolSet()` and check whether the call resulted in an `InvocationTargetException`. The reason for using reflection as opposed to a static reference is that the `WixTool` package exists only in the Windows builds. ------------- Changes: - all: https://git.openjdk.org/jdk/pull/31282/files - new: https://git.openjdk.org/jdk/pull/31282/files/3aee5bab..3a806d36 Webrevs: - full: https://webrevs.openjdk.org/?repo=jdk&pr=31282&range=01 - incr: https://webrevs.openjdk.org/?repo=jdk&pr=31282&range=00-01 Stats: 55 lines in 1 file changed: 42 ins; 8 del; 5 mod Patch: https://git.openjdk.org/jdk/pull/31282.diff Fetch: git fetch https://git.openjdk.org/jdk.git pull/31282/head:pull/31282 PR: https://git.openjdk.org/jdk/pull/31282
