-
Notifications
You must be signed in to change notification settings - Fork 124
Add --suite flag to tbots.py to run entire test suites #3586
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
base: master
Are you sure you want to change the base?
Conversation
StarrryNight
left a comment
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 to me. Will we want to add other test suites like Robot Software or AutoRef'd game?
williamckha
left a comment
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.
LGTM just one question
| //software/simulated_tests/... \\ | ||
| //software/ai/hl/... \\ | ||
| //software/ai/navigator/...""", | ||
| b"software_tests": b"""-- //... -//software:unix_full_system \\ |
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.
is the -- necessary? It's not present in the simulated_gameplay_tests
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.
It's required since the command it uses the - to ignore some bazel targets and it doesn't work without having -- first
Probably not necessary, robot software tests in CI don't do much other than build thunderloop and run redis tests. We also already have an autoref option you can add when running thunderscope. |
|
looks good i think! |
|
@Andrewyx what do you think? I know you suggested potentially not using a flag at all and just adding some specific targets for test suites which would be documented/autocompleted by tbots.py. I think it would be beneficial to make it easier to find the list of possible test suites that it can run, but I'm more inclined to do it another way, maybe refactoring tbots.py so it can actually have multiple commands and creating a suite command and it will show the targets in the help/autocomplete for that specific command |
Yeah upon reviewing this code again, I don't see a reason we should be using fuzzy finder for this given we only have 2 test suites, and it is unlikely we are going to have more in the future (at most 1 more if we design onboard test suites). Digging into the semantics of this design. Considering the purpose of fuzzy finder, which is to reduce the cognitive overhead of explicitly remembering particular tests, its use case is not really beneficial when only 2 options are in our search space. This means that developers will be responsible for remembering these 2 options (even if not 1:1 exactly thanks to fuzzy find). Ideally, we should design this invocation to be as intuitive as possible, and reduce the load being placed on users to remember specific targets. This is my reasoning for how this task might best be approached. Here are an option I thought of for this UX if you want my brainstorming:
|
Description
This PR adds a --suite / -s flag to tbots.py which changes the search space of the fuzzy finder from all the bazel targets to just "software_tests" and "simulated_gameplay_tests" which run their respective test suite.
Testing Done
Ran both software and simulated gameplay test using
./tbots.py test software --suiteand./tbots.py test gameplay --suiteResolved Issues
resolves #3585
Length Justification and Key Files to Review
N/A
Review Checklist
It is the reviewers responsibility to also make sure every item here has been covered
.hfile) should have a javadoc style comment at the start of them. For examples, see the functions defined inthunderbots/software/geom. Similarly, all classes should have an associated Javadoc comment explaining the purpose of the class.TODO(or similar) statements should either be completed or associated with a github issue