-
Notifications
You must be signed in to change notification settings - Fork 5.8k
8351372: Improve negative tests coverage of jpackage #23936
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
8351372: Improve negative tests coverage of jpackage #23936
Conversation
…ning tests if multiple tests have the same description
…gBundle.cannedFormattedString()
…rmattedString.CannedArgument interface to make CannedFormattedString instances provide system-independent test descriptions.
…t --name option but with --runtime-image option. Allow to use arguments with CannedFormattedString that get their values from JPackageCommand instance. Make JPackageCommand.validateOutput(CannedFormattedString) more robust and allow it to take an array of canned formatted strings.
👋 Welcome back asemenyuk! A progress list of the required criteria for merging this PR into |
@alexeysemenyukoracle This change now passes all automated pre-integration checks. ℹ️ This project also has non-automated pre-integration requirements. Please see the file CONTRIBUTING.md for details. After integration, the commit message for the final commit will be:
You can use pull request commands such as /summary, /contributor and /issue to adjust it as needed. At the time when this comment was updated there had been 55 new commits pushed to the
As there are no conflicts, your changes will automatically be rebased on top of these commits when integrating. If you prefer to avoid this automatic rebasing, please check the documentation for the /integrate command for further details. ➡️ To integrate this PR with the above commit message to the |
@alexeysemenyukoracle The following label will be automatically applied to this pull request:
When this pull request is ready to be reviewed, an "RFR" email will be sent to the corresponding mailing list. If you would like to change these labels, use the /label pull request command. |
…ype(); Add PackageType.isEnabled(). Make PackageType.isEnabled() and PackageType.isSupported() public.
d3a3551
to
67cbfb0
Compare
…non-empty directory
…r tests covering `--runtime-image` option and the negative test duplicates a test in ErrorTest (the one covering ERR_MacAppStoreRuntimeBinExists)
…rTest test cases: '--mac-sign option is required' -> 'error.app-image.mac-sign.required'; 'Option [--mac-app-store] is not valid' -> 'ERR_InvalidOptionWithAppImageSigning'.
…mmands(). It duplicates `ERR_MissingJLinkOptMacAppStore` test case in ErrorTest
…t and is less strict on analyzing error output
…e runtime is used
…ame from the runtime image directory name if `--name` option is not given
67cbfb0
to
dc5974f
Compare
@sashamatveev PTAL |
Webrevs
|
Filed the CSR by accident. |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Looks good with minor comments.
@@ -32,9 +32,23 @@ | |||
|
|||
public class SigningBase { | |||
|
|||
enum CertIndex { | |||
ASCII_INDEX(0), | |||
UNICODE_INDEX(0), |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
This one should be 1. Looks like we had a bug.
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Fixed
JPackageStringBundle.MAIN.cannedFormattedString("ERR_MissingArgument", "--input")}, | ||
testSpec().addArgs("--type", "invalid-type") | ||
.error("ERR_InvalidInstallerType", "invalid-type"), | ||
// no --input for non-mular app |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
non-mular
-> non-modular
/integrate |
Going to push as commit 3aa6d62.
Your commit was automatically rebased without conflicts. |
@alexeysemenyukoracle Pushed as commit 3aa6d62. 💡 You may see a message that your pull request was closed with unmerged commits. This can be safely ignored. |
Changes to tests:
CannedFormattedString
class to validate error messages in jpackage output strictly.Changes to jpackage:
java.nio.file.NoSuchFileException
asjdk.internal.opt.CommandLine.parse()
throws this exception instead ofjava.io.FileNotFoundException
to indicate missing command file. The issue was uncovered with the new ErrorTest test case forERR_CannotParseOptions
error ID.ERR_MissingArgument
witherror.no-input-parameter
as the error is not missing argument of--input
parameter, but missing--input
parameter itself. The issue was uncovered with the new ErrorTest test cases forERR_MissingArgument
and ``error.no-input-parameter` error IDs.--input
parameter is handled earlier in DeployParams.Progress
Issues
Reviewers
Reviewing
Using
git
Checkout this PR locally:
$ git fetch https://git.openjdk.org/jdk.git pull/23936/head:pull/23936
$ git checkout pull/23936
Update a local copy of the PR:
$ git checkout pull/23936
$ git pull https://git.openjdk.org/jdk.git pull/23936/head
Using Skara CLI tools
Checkout this PR locally:
$ git pr checkout 23936
View PR using the GUI difftool:
$ git pr show -t 23936
Using diff file
Download this PR as a diff file:
https://git.openjdk.org/jdk/pull/23936.diff
Using Webrev
Link to Webrev Comment