xref: /llvm-project/lldb/test/Shell/ScriptInterpreter/Lua/lua-python.test (revision 3338819b08faa7f23f65fb4e67154583984ebf5c)
1# REQUIRES: python
2# UNSUPPORTED: lldb-repro
3
4# RUN: mkdir -p %t
5# RUN: cd %t
6# RUN: echo "int main() { return 0; }" | %clang_host -x c - -o a.out
7# RUN: cat %s | %lldb 2>&1 | FileCheck %s
8script -l lua --
9target = lldb.debugger:CreateTarget("a.out")
10print("target is valid:", tostring(target:IsValid()))
11lldb.debugger:SetSelectedTarget(target)
12quit
13# CHECK: target is valid: true
14script -l python --
15print("selected target: {}".format(lldb.debugger.GetSelectedTarget()))
16# CHECK: selected target: a.out
17