Skip to content

Conversation

@nycrat
Copy link
Member

@nycrat nycrat commented Feb 1, 2026

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 --suite and ./tbots.py test gameplay --suite

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

  • Function & Class comments: All function definitions (usually in the .h file) should have a javadoc style comment at the start of them. For examples, see the functions defined in thunderbots/software/geom. Similarly, all classes should have an associated Javadoc comment explaining the purpose of the class.
  • Remove all commented out code
  • Remove extra print statements: for example, those just used for testing
  • Resolve all TODO's: All TODO (or similar) statements should either be completed or associated with a github issue

@nycrat nycrat requested review from a team, JoshuaWu7, StarrryNight, adrianchan787 and axiev1 and removed request for a team February 4, 2026 06:46
Copy link
Contributor

@StarrryNight StarrryNight left a 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?

Copy link
Member

@williamckha williamckha left a 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 \\
Copy link
Member

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

Copy link
Member Author

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

@williamckha
Copy link
Member

Looks good to me. Will we want to add other test suites like Robot Software or AutoRef'd game?

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.

@adrianchan787
Copy link
Contributor

looks good i think!

@nycrat
Copy link
Member Author

nycrat commented Feb 8, 2026

@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

@Andrewyx
Copy link
Contributor

Andrewyx commented Feb 8, 2026

@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:

  • ./tbots.py test by default runs the test suites or ./tbots.py test . if that makes more sense?

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

Add command to tbots.py to run entire test suites

5 participants