The `testing.XXX` settings (added in
https://github.com/llvm/llvm-project/pull/177279 and currently just
`testing.inject-variable-location-error`) are supposed to only exist in
asserts builds. However, we never added it as a global property to the
`Debugger`, so the setting wasn't actually usable, in any build.
The one test that did use it [skipped the test on
error](230e465617/lldb/test/API/commands/expression/diagnostics/TestExprDiagnostics.py (L286-L288))
as a way to mimick "only run test in asserts mode". However, this just
meant the test never ran.
This patch registers the property and adds a test that ensures an
asserts-LLDB does allow access to it from the CLI.
8 lines
270 B
Plaintext
8 lines
270 B
Plaintext
# REQUIRES: asserts
|
|
#
|
|
# Tests that the global 'testing.XXX' settings are available when building with asserts.
|
|
#
|
|
# RUN: %lldb -o 'settings show testing.inject-variable-location-error' -b | FileCheck %s
|
|
#
|
|
# CHECK: testing.inject-variable-location-error (boolean) = false
|