Description
Hi all!
Currently, lit
's config.excludes
works a bit strangely. Imagine I have a file tree:
tests/
├─ test0.v
├─ test1.v
├─ test1_includes/
│ ├─ include.v
├─ lit.cfg
(.v
here because I'm using lit
for Verilog-based tests)
test1.v
here uses test1_includes/include.v
. However, I don't want lit
to attempt to run include.v
as a test -- I want it to be ignored.
Currently, to get lit
to ignore include.v
, I need to add 'include.v'
to config.excludes
in lit.cfg
. But this is strange! It's not test1_includes/include.v
, which would make more sense. Instead, it has to just be the filename itself, not the path leading up to the file.
The problem with this is that now include.v
will be ignored everywhere in my test suite, which is not the intention.
There are a few ways I think this could be fixed:
- The easiest way would be to just allow for directory excludes -- then I could exclude
test1_includes
as a whole. - The next way would be to check for relative paths when looking at excludes. Then,
config.excludes
would includetest1_includes/include.v
instead ofinclude.v
, andinclude.v
wouldn't be excluded from the suite wherever else it appears.
In the short term I can get around this by just not having name collisions, but it seems like weird behavior in lit.
Thank you all!