Fix breakpoint-command.test when no script interpreter is compiled in.
authorMitch Phillips <31459023+hctim@users.noreply.github.com>
Mon, 12 Dec 2022 22:00:19 +0000 (14:00 -0800)
committerMitch Phillips <31459023+hctim@users.noreply.github.com>
Mon, 12 Dec 2022 22:12:52 +0000 (14:12 -0800)
My local build is with -DLLVM_ENABLE_PROJECTS=lldb, but I don't compile
with -DLLDB_ENABLE_PYTHON=True or -DLLDB_ENABLE_LUA=True. This results
in there being no script interpreter.

The test lldb/test/Shell/Breakpoint/breakpoint-command.test has an
implicit dependency on a script interpreter being available.

This patch makes that dependency clear. If you have a script
interpreter, the test gets run, otherwise it gets skipped. This means
that folks (like me) who naively use -DLLVM_ENABLE_PROJECTS=lldb can
continue to run check-all without breakages.

Reviewed By: JDevlieghere

Differential Revision: https://reviews.llvm.org/D139463

lldb/test/Shell/Breakpoint/breakpoint-command.test

index 1236c55..2bca6a9 100644 (file)
@@ -1,3 +1,5 @@
+# REQUIRES: lua || python
+
 # RUN: %build %p/Inputs/dummy-target.c -o %t.out
 # RUN: %lldb %t.out -o 'b main' -o 'break command add 1 -o "script print(95000 + 126)"' -o 'r' | FileCheck %s