LLDB has three major testing strategies: unit tests, tests that exercise the SB API though dotest.py and what we currently call lit tests. The later is rather confusing as we're now using lit as the driver for all three types of tests. As most of this grew organically, the directory structure in the lldb repository doesn't really make this clear. The 'lit' tests are part of the root and among these tests there's a Unit and Suite folder for the unit and dotest-tests. This makes it impossible to run just the lit tests.
This patch changes the directory layout to match the 3 testing strategies, each with their own directory and their own configuration file. I've opted to name the directories after the testing tool, so dotest for the dotest.py tests and filecheck for the lit tests. This means there are now 3 directories under lit with 3 corresponding targets in addition to the usual check-lldb:
- check-lldb-unittests (replaces check-lldb-unit)
- check-lldb-dotest
- check-lldb-filecheck
Each directory defines its own lit test suite (which was already the case). The top level directory also has a lit.cfg.py which is there for check-lldb and is mostly empty.
Current layout:
lit ├── CMakeLists.txt ├── lit-lldb-init.in ├── lit.cfg.py ├── lit.site.cfg.py.in ├── Breakpoint ├── BuildScript ├── Commands ├── Driver ├── ExecControl ├── Expr ├── Heap ├── Host ├── Minidump ├── Modules ├── ObjectFile ├── Process ├── Python ├── Quit ├── Register ├── Reproducer ├── Settings ├── Suite <- dotest ├── SymbolFile ├── Unit <- unittests ├── Unwind ├── Watchpoint ├── dotest ├── filecheck ├── helper └── lldb
New layout:
lit ├── CMakeLists.txt ├── lit.cfg.py ├── dotest ├── filecheck └── unittests
My goal is to move the unit test and dotest files into their corresponding subdirectories, remove them from the root and finally rename lit to tests. This is the first step in that direction.