[all-commits] [llvm/llvm-project] bb26eb: [lldb] Fix dotest argument order
Felipe de Azevedo Piovezan via All-commits
all-commits at lists.llvm.org
Fri Aug 26 03:53:47 PDT 2022
Branch: refs/heads/main
Home: https://github.com/llvm/llvm-project
Commit: bb26ebb4d18c1877cc6fd17aa803609abeb95096
https://github.com/llvm/llvm-project/commit/bb26ebb4d18c1877cc6fd17aa803609abeb95096
Author: Felipe de Azevedo Piovezan <fpiovezan at apple.com>
Date: 2022-08-26 (Fri, 26 Aug 2022)
Changed paths:
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
Log Message:
-----------
[lldb] Fix dotest argument order
When running LLDB API tests, a user can override test arguments with
LLDB_TEST_USER_ARGS. However, these flags used to be concatenated with a
CMake-derived variable LLDB_TEST_COMMON_ARGS, as below:
```
set(LLDB_DOTEST_ARGS ${LLDB_TEST_COMMON_ARGS};${LLDB_TEST_USER_ARGS}
CACHE INTERNAL STRING)
```
This is problematic, because LLDB_TEST_COMMON_ARGS must be processed
first, while LLDB_TEST_USER_ARGS args must be processed last, so that
user overrides are respected. Currently, if a user attempts to override
one of the "inferred" flags, the user's request is ignored. This is the
case, for example, with `--libcxx-include-dir` and
`--libcxx-library-dir`. Both flags are needed by the greendragon bots.
This commit removes the concatenation above, keeping the two original
variables throughout the entire flow, processing the user's flag last.
The variable LLDB_TEST_COMMON_ARGS needs to be a CACHE property, but it
is modified throughout the CMake file with `set` or `list` or `string`
commands, which don't work with properties. As such, a temporary
variable `LLDB_TEST_COMMON_ARGS_VAR` is created.
This was tested locally by invoking CMake with:
-DLLDB_TEST_USER_ARGS="--libcxx-include-dir=blah --libcxx-library-dir=blah2"
and checking that tests failed appropriately.
Differential Revision: https://reviews.llvm.org/D132642
More information about the All-commits
mailing list