-
Notifications
You must be signed in to change notification settings - Fork 1.6k
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
Java: Port all integration tests to pytest #17315
Conversation
This is also used by the integration tests.
Some notes: * These tests rely on a variety of fixtures * The previous maven-wrapper checks were checking for the version of maven installed by looking at the checked-in wrapper script. I dropped this behavior. * I replaced a lot of test queries that queried for a (subset of) source archive files with the source_archive fixture. In particular, tests that excluded properties files from being listed in the expected output now include them. It's much faster to generate this list via the fixture instead of using CodeQL for it.
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.
two minor stylistic nits, otherwise looks good to me!
commands.run(["javac", "mod1/module-info.java", "mod1/mod1pkg/Mod1Class.java", "-d", "mod1obj"]) | ||
commands.run( | ||
[ | ||
"jar", | ||
"-c", | ||
"-f", | ||
"mod1.jar", | ||
"-C", | ||
"mod1obj", | ||
"mod1pkg/Mod1Class.class", | ||
"--release", | ||
"9", | ||
"-C", | ||
"mod1obj", | ||
"module-info.class", | ||
] | ||
) |
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.
Stylistic nit, you can use strings instead of lists of strings, and combine the two calls:
commands.run(["javac", "mod1/module-info.java", "mod1/mod1pkg/Mod1Class.java", "-d", "mod1obj"]) | |
commands.run( | |
[ | |
"jar", | |
"-c", | |
"-f", | |
"mod1.jar", | |
"-C", | |
"mod1obj", | |
"mod1pkg/Mod1Class.class", | |
"--release", | |
"9", | |
"-C", | |
"mod1obj", | |
"module-info.class", | |
] | |
) | |
commands.run( | |
"javac mod1/module-info.java mod1/mod1pkg/Mod1Class.java -d mod1obj", | |
"jar -c -f mod1.jar -C mod1obj mod1pkg/Mod1Class.class --release 9 -C mod1obj module-info.class", | |
) |
commands.run(["javac", "mod1/module-info.java", "mod1/mod1pkg/Mod1Class.java", "-d", "mod1obj"]) | ||
commands.run( | ||
[ | ||
"jar", | ||
"-c", | ||
"-f", | ||
"mod1.jar", | ||
"-C", | ||
"mod1obj", | ||
"mod1pkg/Mod1Class.class", | ||
"--release", | ||
"9", | ||
"-C", | ||
"mod1obj", | ||
"module-info.class", | ||
] | ||
) |
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.
as above, you can combine the commands.run
calls and use one-line strings
Some notes:
It's much faster to generate this list via the fixture instead of using a codeql query.