[all-commits] [llvm/llvm-project] e97b99: [lldb] Remove LLDB session dir and just store test...
Raphael Isemann via All-commits
all-commits at lists.llvm.org
Fri Dec 4 02:48:30 PST 2020
Branch: refs/heads/main
Home: https://github.com/llvm/llvm-project
Commit: e97b991eef63663d1f635813fe375354edb7b51a
https://github.com/llvm/llvm-project/commit/e97b991eef63663d1f635813fe375354edb7b51a
Author: Raphael Isemann <teemperor at gmail.com>
Date: 2020-12-04 (Fri, 04 Dec 2020)
Changed paths:
M lldb/examples/test/.lldb-loggings
M lldb/examples/test/usage-lldb-loggings
M lldb/packages/Python/lldbsuite/test/configuration.py
M lldb/packages/Python/lldbsuite/test/dotest.py
M lldb/packages/Python/lldbsuite/test/dotest_args.py
M lldb/packages/Python/lldbsuite/test/lldbtest.py
M lldb/test/API/CMakeLists.txt
M lldb/test/API/lit.cfg.py
M lldb/test/API/lit.site.cfg.py.in
M lldb/utils/lldb-dotest/CMakeLists.txt
M lldb/utils/lldb-dotest/lldb-dotest.in
Log Message:
-----------
[lldb] Remove LLDB session dir and just store test traces in the respective test build directory
Test runs log some of their output to files inside the LLDB session dir. This
session dir is shared between all tests, so all the tests have to make sure they
choose a unique file name inside that directory. We currently choose by default
`<test-class-name>-<test-method-name>` as the log file name. However, that means
that if not every test class in the test suite has a unique class name, then we
end up with a race condition as two tests will try to write to the same log
file.
I already tried in D83767 changing the format to use the test file basename
instead (which we already require to be unique for some other functionality),
but it seems the code for getting the basename didn't work on Windows.
This patch instead just changes that dotest stores the log files in the build
directory for the current test. We know that directory is unique for this test,
so no need to generate some unique file name now. Also removes all the
environment vars and parameters related to the now unused session dir.
The new log paths now look like this for a failure in 'TestCppOperators`:
```
./lldb-test-build.noindex/lang/cpp/operators/TestCppOperators.test_dwarf/Failure.log
./lldb-test-build.noindex/lang/cpp/operators/TestCppOperators.test_dsym/Failure.log
./lldb-test-build.noindex/lang/cpp/operators/TestCppOperators.test_gmodules/Failure.log
```
Reviewed By: labath
Differential Revision: https://reviews.llvm.org/D92498
More information about the All-commits
mailing list