From f8fccb14de2e925245d7e8b6b1f13e7ec5836eb0 Mon Sep 17 00:00:00 2001
From: Michal Gorny <mgorny@gentoo.org>
Date: Sun, 19 May 2019 09:27:52 +0000
Subject: [PATCH] [lldb] [lit] Skip more tests when Python is unavailable

LocalLLDBInit.test requires Python module loading support.
CommandScriptImmediateOutput tests are specific to running scripts.
Disable all of them when Python support is disabled.

llvm-svn: 361115
---
 lldb/lit/Commands/CommandScriptImmediateOutput/lit.local.cfg | 2 ++
 lldb/lit/Driver/LocalLLDBInit.test                           | 1 +
 2 files changed, 3 insertions(+)
 create mode 100644 lldb/lit/Commands/CommandScriptImmediateOutput/lit.local.cfg

diff --git a/lldb/lit/Commands/CommandScriptImmediateOutput/lit.local.cfg b/lldb/lit/Commands/CommandScriptImmediateOutput/lit.local.cfg
new file mode 100644
index 000000000000..d880a5f420b8
--- /dev/null
+++ b/lldb/lit/Commands/CommandScriptImmediateOutput/lit.local.cfg
@@ -0,0 +1,2 @@
+if not "python" in config.available_features:
+    config.unsupported = True
diff --git a/lldb/lit/Driver/LocalLLDBInit.test b/lldb/lit/Driver/LocalLLDBInit.test
index 04bcca425c1b..69b7781415a3 100644
--- a/lldb/lit/Driver/LocalLLDBInit.test
+++ b/lldb/lit/Driver/LocalLLDBInit.test
@@ -1,3 +1,4 @@
+# REQUIRES: python
 # RUN: mkdir -p %t.root
 # RUN: mkdir -p %t.home
 # RUN: cp %S/Inputs/.lldbinit %t.root