Add --suite flag to tbots.py to run entire test suites#3586
Add --suite flag to tbots.py to run entire test suites#3586nycrat wants to merge 6 commits intoUBC-Thunderbots:masterfrom
Conversation
StarrryNight
left a comment
There was a problem hiding this comment.
Looks good to me. Will we want to add other test suites like Robot Software or AutoRef'd game?
src/tbots.py
Outdated
| //software/simulated_tests/... \\ | ||
| //software/ai/hl/... \\ | ||
| //software/ai/navigator/...""", | ||
| b"software_tests": b"""-- //... -//software:unix_full_system \\ |
There was a problem hiding this comment.
is the -- necessary? It's not present in the simulated_gameplay_tests
There was a problem hiding this comment.
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:
|
Yea I think |
|
Actually I think |
|
Oh wait now that I'm thinking about it, we could just run |
|
I like it, simply because it means we can unify one interface for all testing, building, and running. Although I think our fuzzy finder still needs some more work, this is a good step so that people don't have to remember so many bazel commands. |
Description
This PR adds a --suite / -s flag to tbots.py which runs all the software and simulated gameplay tests like ci does.
Testing Done
Ran all the tests using
./tbots.py test --suiteand./tbots.py test -s. Old behaviour when only running or building a single target still works.Resolved 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