Files
clang-p2996/lldb/test/Shell/Target/target-label.test
Vladislav Dzhidzhoev 32e90bbe57 [lldb][test] Support remote run of Shell tests (#95986)
1. This commit adds LLDB_TEST_PLATFORM_URL, LLDB_TEST_SYSROOT,
LLDB_TEST_PLATFORM_WORKING_DIR, LLDB_SHELL_TESTS_DISABLE_REMOTE cmake
flags to pass arguments for cross-compilation and remote running of both Shell&API tests.
2. To run Shell tests remotely, it adds 'platform select' and 'platform connect' commands to %lldb
substitution.
3. 'remote-linux' feature added to lit to disable tests failing with
remote execution.
4. A separate working directory is assigned to each test to avoid
conflicts during parallel test execution.
5. Remote Shell testing is run only when LLDB_TEST_SYSROOT is set for
building test sources. The recommended compiler for that is Clang.

---------

Co-authored-by: Vladimir Vereschaka <vvereschaka@accesssoftek.com>
2024-10-07 20:31:33 +02:00

41 lines
1.0 KiB
Plaintext

# REQUIRES: python
# UNSUPPORTED: system-windows
# RUN: %lldb -b -o 'settings set interpreter.stop-command-source-on-error false' -s %s 2>&1 | FileCheck %s
target create -l "ls" /bin/ls
target list
# CHECK: * target #0 (ls): [[LS_PATH:.*]]
script lldb.target.SetLabel("")
target list
# CHECK: * target #0: [[LS_PATH]]
target create -l "cat" /bin/cat
target list
# CHECK: target #0: [[LS_PATH]]
# CHECK-NEXT: * target #1 (cat): [[CAT_PATH:.*]]
target create -l "cat" /bin/cat
# CHECK: Cannot use label 'cat' since it's set in target #1.
target create -l 42 /bin/cat
# CHECK: error: Cannot use integer as target label.
target select 0
# CHECK: * target #0: [[LS_PATH]]
# CHECK-NEXT: target #1 (cat): [[CAT_PATH]]
target select cat
# CHECK: target #0: [[LS_PATH]]
# CHECK-NEXT: * target #1 (cat): [[CAT_PATH]]
script lldb.target.GetLabel()
# CHECK: 'cat'
script lldb.debugger.GetTargetAtIndex(0).SetLabel('Not cat')
# CHECK: success
target list
# CHECK: target #0 (Not cat): [[LS_PATH]]
# CHECK-NEXT: * target #1 (cat): [[CAT_PATH]]