-
-
Notifications
You must be signed in to change notification settings - Fork 652
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
Make test discovery for test_testprojects.py
IT more precise
#8395
Make test discovery for test_testprojects.py
IT more precise
#8395
Conversation
test_testprojects.py
IT more precise
91af7a4
to
67c85ca
Compare
67c85ca
to
f6231d3
Compare
# `test` to trigger side effects via the goal graph, such as compiling JVM code or generating | ||
# antlr code. Instead, we should run the specific command we are testing for that target type. | ||
# For example, `python_antlr_library` would only need `./pants gen`. | ||
for bfa in [ |
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.
Hm.
So, as discussed in Slack, I think that it would be better to do something like ./pants compile test lint
here (or whichever other goals) and wait for #8368 to land.
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.
Hm okay. I redesigned this PR around this feedback. Abandonded the goal of mapping target types -> commands; instead, everything now uses ./pants compile lint test
.
Also now blacklist certain target types, rather than this whitelist approach. IMO there is still value in skipping python_requirement_library
and files()
etc.
1) Blacklist certain target types, rather than whitelisting 2) Abandon idea of specific commands based on the target type. Everyone uses `./pants compile lint test` now
1) managed_jar_libraries is not recognized 2) target means that _everything_ will be skipped
Bump on this. I redesigned the approach and I think it's an improvement from before. |
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.
Thanks!
Problem
Currently,
test_testproject.py
runstest
against everything intestprojects::
andexamples::
, including thefiles()
targets we've been adding while porting to V2. We don't want those newfiles()
targets to be run here.Solution
We blacklist certain target types that don't make sense to test.
We also now run
./pants compile lint test
on every target. This does not make any difference now but prepares us for V2 where./pants test
doesn't trigger prerequisite goals as it does in V1.Result
We no longer test targets that don't make sense, like
files()
. This prepares us for chrooting this test by allowing us to ignore targets we don't care about.