For debug build on macOS, runtime which used for test fill be located in /path/jdk-17/fastdebug and /path/jdk-17 will not contain any other files except fastdebug and in this case our check to decide if we need to copy app or runtime will return /path/jdk-17 which is not correct. Fixed by skipping this check for runtime and only using it for app. Also, added ignoring .DS_Store to test which is needed if user used Finder to look inside runtime folder which will cause .DS_Store to be created and will cause test to fail, since this file is not being packaged.
------------- Commit messages: - 8267056: tools/jpackage/share/RuntimePackageTest.java fails with NoSuchFileException Changes: https://git.openjdk.java.net/jdk/pull/4120/files Webrev: https://webrevs.openjdk.java.net/?repo=jdk&pr=4120&range=00 Issue: https://bugs.openjdk.java.net/browse/JDK-8267056 Stats: 15 lines in 2 files changed: 5 ins; 0 del; 10 mod Patch: https://git.openjdk.java.net/jdk/pull/4120.diff Fetch: git fetch https://git.openjdk.java.net/jdk pull/4120/head:pull/4120 PR: https://git.openjdk.java.net/jdk/pull/4120