RFR: 8288961: jpackage: test MSI installation fix

Alex Kasko akasko at openjdk.org
Tue Jun 28 11:34:46 UTC 2022


On Wed, 22 Jun 2022 11:53:39 GMT, Alex Kasko <akasko at openjdk.org> wrote:

> 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

Thanks for the reviews! I don't have Committer role in JDK Project, would appreciate if someone can push it.

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

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


More information about the core-libs-dev mailing list