This changes Python API tests to use a single build shared across all test functions, instead of the previous default behavior of a separate build dir for each test function. This build behavior opt-out, tests can use the previous behavior of one individual (unshared) build directory per test function, by setting `SHARED_BUILD_TESTCASE` to False (in the test class). The motivation is to make the test suite more efficient, by not repeatedly building the same test source. When running tests on my macOS machine, this reduces the time of `ninja check-lldb-api` by almost 60% (sample numbers: from ~492s down to ~207s = 58%). Almost 5min time saved. Each test function still calls `self.build()`, but only the first call will do a build, in the subsequent tests `make` will be a no-op because the sources won't have changed.
17 KiB
17 KiB