RFR: 8288961: jpackage: test MSI installation fix

Alex Kasko akasko at openjdk.org
Wed Jun 22 12:00:18 UTC 2022


Please review this minor fix to the jpackage test suite.

When `INSTALL` and `UNINSTALL` actions are enabled for jpackage test suite runs (disabled by default), installation of `EXE` and `MSI` packages is performed. `EXE` package is invoked directly and `MSI` package is installed using `msiexec` utility. In both cases the path of the packages starts with a "." (current dir) symbol, it is processed correctly with EXE installation, but not with MSI, example:


[03:52:19.634] TRACE: assertTrue(): Check [.\\test.bcc14973\\output\\FileAssociationsTest-1.0.msi] path exists
[03:52:19.634] TRACE: assertTrue(): Check [.\\test.bcc14973\\output\\FileAssociationsTest-1.0.msi] is a file
[03:52:19.634] TRACE: exec: Execute [msiexec /qn /norestart /i .\\test.bcc14973\\output\\FileAssociationsTest-1.0.msi](5); discard I/O...
[03:52:19.790] TRACE: exec: Done. Exit code: 1619
[03:52:19.805] ERROR: Expected [0]. Actual [1619]: Check command [msiexec /qn /norestart /i .\\test.bcc14973\\output\\FileAssociationsTest-1.0.msi](5) exited with 0 code 


Is is proposed to normalize the path passed to `msiexec`, in this case installation will succeed:


[03:56:52.429] TRACE: assertTrue(): Check [.\\test.bcc14973\\output\\FileAssociationsTest-1.0.msi] path exists
[03:56:52.429] TRACE: assertTrue(): Check [.\\test.bcc14973\\output\\FileAssociationsTest-1.0.msi] is a file
[03:56:52.429] TRACE: exec: Execute [msiexec /qn /norestart /i test.bcc14973\\output\\FileAssociationsTest-1.0.msi](5); discard I/O...
[03:56:57.067] TRACE: exec: Done. Exit code: 0
[03:56:57.067] TRACE: assertEquals(0): Check command [msiexec /qn /norestart /i test.bcc14973\\output\\FileAssociationsTest-1.0.msi](5) exited with 0 code

-------------

Commit messages:
 - 8288961: jpackage: test MSI installation fix

Changes: https://git.openjdk.org/jdk/pull/9236/files
 Webrev: https://webrevs.openjdk.org/?repo=jdk&pr=9236&range=00
  Issue: https://bugs.openjdk.org/browse/JDK-8288961
  Stats: 1 line in 1 file changed: 0 ins; 0 del; 1 mod
  Patch: https://git.openjdk.org/jdk/pull/9236.diff
  Fetch: git fetch https://git.openjdk.org/jdk pull/9236/head:pull/9236

PR: https://git.openjdk.org/jdk/pull/9236


More information about the core-libs-dev mailing list