[Lldb-commits] [lldb] [lldb][test] Remove duplicate testcase names in API test-suite (PR #97043)

Pavel Labath via lldb-commits lldb-commits at lists.llvm.org
Mon Jul 8 01:16:52 PDT 2024


labath wrote:

> > > > LGTM. This has definitely come up in the past. If you feel motivated, I'm sure there must be a way to detect this issue in Python and we could have assert/warning/error that captures this at the dotest level.
> > > 
> > > 
> > > Agreed, making it part of `dotest` would be amazing. Maybe someone with better python knowledge has some ideas (@medismailben @kastiglione ?). In the meantime I'll have a think of how one might do that
> > 
> > 
> > I think instead of having this be part of our test-suite, I'd run it as part of PR testing in a GitHub action
> 
> The test suite would/will run as part of PR testing. Are you saying you would **only** run it at PR time? Why wait and not find out at your test? We already collect all the test names to run them as separate lit tests (similar but different problem) and I bet we also already iterate over the tests inside a file too to build the variants.

Yes, but we do that on a fully parsed representation of the class, where the name conflicts would not be visible. Michael's script constructs the ast of the python file, and walks that manually. In that sense this check does seem more of like a thing that a linter would do, but I don't know if there are existing linters that would flag this sort of thing..

https://github.com/llvm/llvm-project/pull/97043


More information about the lldb-commits mailing list