Uploaded image for project: 'JDK'
  1. JDK
  2. JDK-8350013

Add a test for JDK-8150442

XMLWordPrintable

    • Icon: Enhancement Enhancement
    • Resolution: Fixed
    • Icon: P4 P4
    • 25
    • None
    • tools
    • b13
    • generic
    • windows

      Create a test to verify jpackage adds OS-version condition in msi/exe installers and that this condition works.

      OS-version condition was implemented in JDK-8150442.

      msi/exe installer will block if the version of Windows where it executes is older than some value.

      The test can use a custom OS-version condition that always fails, blocking the installer with this condition. Something like:
      ---
      <Wix xmlns="http://schemas.microsoft.com/wix/2006/wi">
        <Fragment>
          <Condition Message="Not supported on this version of Windows">0</Condition>
          <ComponentGroup Id="FragmentOsCondition"/>
        </Fragment>
      </Wix>
      ---

      It is a variant of "os-condition.wxf" file at [1]

      To implement this test, it is necessary to alter the PackageTest helper class to allow failed installations. Currently, if an installer fails, the test fails. However, the suggested test scenario should be the opposite - if the installer fails, the test passes.

      [1] https://github.com/openjdk/jdk/blob/c2fc94782669ae1645014ee3bfeba957dbff4669/src/jdk.jpackage/windows/classes/jdk/jpackage/internal/resources/os-condition.wxf

            asemenyuk Alexey Semenyuk
            asemenyuk Alexey Semenyuk
            Votes:
            0 Vote for this issue
            Watchers:
            3 Start watching this issue

              Created:
              Updated:
              Resolved: