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

Don't suppress jpackage logging in tests when it is detecting packaging tools in the system

XMLWordPrintable

    • Icon: Enhancement Enhancement
    • Resolution: Fixed
    • Icon: P4 P4
    • 23
    • 23
    • tools
    • b26
    • generic
    • generic

      Currently, when jpackage packaging test is executed the output is the following:

      [19:16:29.586] Create: SimplePackageTest.test
      [19:16:29.587] [ RUN ] SimplePackageTest.test
      [19:16:29.663] TRACE: Bundler rpm supported
      [19:16:29.674] TRACE: Actions: [[initialize], [create], [unpack], [verify-install], [finalize]]

      It is OK when jpackage can locate packaging tools (rpmbuild, wix, etc), but when it can not, it is impossible to understand what did it do and what went wrong. In case there is no "rpmbuild" tool in the system the output is not informative:

      [19:16:29.586] Create: SimplePackageTest.test
      [19:16:29.587] [ RUN ] SimplePackageTest.test
      [19:16:29.674] TRACE: Actions: [[initialize], [create], [unpack], [verify-install], [finalize]]

      However, jpackage logs the actions it takes to locate packaging tools. It can be found later in the test log:

      [19:16:30.313] TRACE: exec: Execute [jpackage --input ./test/input --dest ./test/output --name SimplePackageTest --type rpm --main-jar hello.jar --main-class Hello -J-Djlink.debug=true --verbose](15); inherit I/O...
      [19:16:30.469] Running dpkg
      [19:16:30.493] Running rpmbuild

      We should not suppress jpackage logging of actions it takes to detect packaging tools when requested from jpackage test.

      When jpackage output will to be suppressed the test log will be:

      [19:16:29.586] Create: SimplePackageTest.test
      [19:16:29.587] [ RUN ] SimplePackageTest.test
      [19:16:29.621] Running dpkg
      [19:16:29.633] Running dpkg-deb
      [19:16:29.651] Running rpmbuild
      [19:16:29.663] TRACE: Bundler rpm supported
      [19:16:29.674] TRACE: Actions: [[initialize], [create], [unpack], [verify-install], [finalize]]

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

              Created:
              Updated:
              Resolved: