Currently llvm-lit /path/to/src does not work for many compiler-rt tests which is not developer-friendly.
The reason for this is compiler-rt tests (asan, ubsan etc..) are really multi-config'd tests that have configurations for different architectures and dynamic/static linking. Currently we generate one TestSuite for each configuration at build directory side which could be invoked like llvm-lit /path/to/build/config-linux-dynamic. We could not do llvm-lit /path/to/src for all configurations because in LIT, class TestSuite has only one config object.
- make class TestSuite own more than one TestConfig and update clients accordingly.
- a multi-config'd TestSuite is recognized by text files with suffix '.multi.cfg'. The '.multi.cfg' file contents is <test suite name> /path/to/cfg_dir1/lit.site.cfg /path/to/cfg_dir2/lit.site.cfg ...
- currently there exists testSuiteCache to avoid reloading same TestConfig twice when exec dir is in tree.(See llvm\utils\lit\tests\Inputs\exec-discovery-in-tree for examples). This patch add a testConfigCache to solve the same issue since class TestSuite is able to own multiple TestConfig now.
- changes in utils/lit/lit/main.py handles the printing of discovered test-suite properly.
- this is needed by D73981