llvm-project/lldb/test
Raphael Isemann 101f37a1b3 [lldb][NFC] Rewrite CPP11EnumTypes test to make it faster
TestCPP11EnumTypes is one of the most expensive tests on my system and takes
around 35 seconds to run. A relatively large amount of that time is actually
doing CPU intensive work it seems (and not waiting on timeouts like other
slow tests).

The main issue is that this test repeatedly compiles the same source files
with different compiler defines. The test is also including standard library
headers, so it will also build all system modules with the gmodules debug
info variant. This leads to the problem that this test ends up compiling all
system Clang modules 8 times (one for each subtest with a unique define). As
the system modules are quite large, this causes that this test spends most
of its runtime just recompiling all system modules on macOS.

There is also the small issue that this test is starting and start-stopping
the test process a few hundred times.

This rewrites the test to instead just use a macro to instantiate all the
enum types in a single source and uses global variables to test the values
(which means there is no more need to continue/stop or even start a process).

I kept running all the debug info variants (event though it doesn't seem really
relevant) to keep this as NFC as possible.

This reduced the test runtime by around 1.5 seconds on my system (or in relative
numbers, the runtime of this test decreases by 95%).
2020-09-04 13:45:42 +02:00
..
API [lldb][NFC] Rewrite CPP11EnumTypes test to make it faster 2020-09-04 13:45:42 +02:00
Shell [lldb] Make symbol list output from `image dump symtab` not depend on internal ordering of DenseMap 2020-09-03 10:27:19 +02:00
Unit [lldb] Get rid of helper CMake variables for Python 2020-08-17 08:47:52 -07:00
CMakeLists.txt [lldb] [testsuite] Add split-file for check-lldb dependencies 2020-08-18 18:10:55 +02:00
lit.cfg.py [test] Cleanup top-level lit.cfg.py 2019-10-10 19:51:47 +00:00
lit.site.cfg.py.in [lldb] Get rid of helper CMake variables for Python 2020-08-17 08:47:52 -07:00