aboutsummaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorJonas Devlieghere <jonas@devlieghere.com>2024-10-31 10:39:03 -0700
committerJonas Devlieghere <jonas@devlieghere.com>2024-10-31 10:39:48 -0700
commit88591aa0ca7e4d99da353d49f91ea63e43fb55e0 (patch)
tree861827b3c0b37ad650e8bb4a4e3e5f56b731ab10
parenta9a8351ef181610559687679a40efe24649f9600 (diff)
downloadllvm-88591aa0ca7e4d99da353d49f91ea63e43fb55e0.zip
llvm-88591aa0ca7e4d99da353d49f91ea63e43fb55e0.tar.gz
llvm-88591aa0ca7e4d99da353d49f91ea63e43fb55e0.tar.bz2
[lldb] Remove lldb-repro utility
Remove lldb-repro which was used to run the test suite against a reproducer. The corresponding functionality has been removed from LLDB so there's no need for the tool anymore.
-rw-r--r--lldb/test/API/lit.cfg.py6
-rw-r--r--lldb/test/Shell/Driver/LocalLLDBInit.test1
-rw-r--r--lldb/test/Shell/Driver/TestCore.test2
-rw-r--r--lldb/test/Shell/Driver/TestError.test1
-rw-r--r--lldb/test/Shell/Driver/TestFile.test2
-rw-r--r--lldb/test/Shell/Driver/TestHelp.test2
-rw-r--r--lldb/test/Shell/Driver/TestPositionalArgs.test2
-rw-r--r--lldb/test/Shell/Driver/TestRepl.test2
-rw-r--r--lldb/test/Shell/Process/TestEnvironment.test1
-rw-r--r--lldb/test/Shell/Quit/TestQuitExitCode-30.test1
-rw-r--r--lldb/test/Shell/Quit/TestQuitExitCode30.test1
-rw-r--r--lldb/test/Shell/Quit/TestQuitExitCodeHexA.test1
-rw-r--r--lldb/test/Shell/Register/x86-64-read.test1
-rw-r--r--lldb/test/Shell/Register/x86-64-ymm-read.test1
-rw-r--r--lldb/test/Shell/Register/x86-multithread-write.test1
-rw-r--r--lldb/test/Shell/ScriptInterpreter/Lua/bindings.test2
-rw-r--r--lldb/test/Shell/ScriptInterpreter/Lua/convenience_variables.test2
-rw-r--r--lldb/test/Shell/ScriptInterpreter/Lua/io.test2
-rw-r--r--lldb/test/Shell/ScriptInterpreter/Lua/lua-python.test1
-rw-r--r--lldb/test/Shell/ScriptInterpreter/Lua/print.test2
-rw-r--r--lldb/test/Shell/ScriptInterpreter/Lua/quit.test2
-rw-r--r--lldb/test/Shell/ScriptInterpreter/Python/Crashlog/lit.local.cfg3
-rw-r--r--lldb/test/Shell/ScriptInterpreter/Python/fail_breakpoint_oneline.test2
-rw-r--r--lldb/test/Shell/ScriptInterpreter/Python/sb_address_exception.test2
-rw-r--r--lldb/test/Shell/ScriptInterpreter/Python/scripted_breakpoint.test2
-rw-r--r--lldb/test/Shell/ScriptInterpreter/Python/scripted_breakpoint_lua.test1
-rw-r--r--lldb/test/Shell/Subprocess/lit.local.cfg2
-rw-r--r--lldb/test/Shell/SymbolFile/DWARF/x86/debug_loc.s2
-rw-r--r--lldb/test/Shell/SymbolFile/NativePDB/lit.local.cfg2
-rw-r--r--lldb/test/Shell/SymbolFile/PDB/lit.local.cfg2
-rw-r--r--lldb/test/Shell/helper/toolchain.py17
-rw-r--r--lldb/test/Shell/lit.cfg.py9
-rw-r--r--lldb/utils/CMakeLists.txt1
-rw-r--r--lldb/utils/lldb-repro/CMakeLists.txt23
-rwxr-xr-xlldb/utils/lldb-repro/lldb-repro.py86
35 files changed, 0 insertions, 190 deletions
diff --git a/lldb/test/API/lit.cfg.py b/lldb/test/API/lit.cfg.py
index 6481ae8..c8e4a4c 100644
--- a/lldb/test/API/lit.cfg.py
+++ b/lldb/test/API/lit.cfg.py
@@ -268,12 +268,6 @@ if is_configured("lldb_libs_dir"):
if is_configured("lldb_framework_dir"):
dotest_cmd += ["--framework", config.lldb_framework_dir]
-if (
- "lldb-repro-capture" in config.available_features
- or "lldb-repro-replay" in config.available_features
-):
- dotest_cmd += ["--skip-category=lldb-dap", "--skip-category=std-module"]
-
if "lldb-simulator-ios" in config.available_features:
dotest_cmd += ["--apple-sdk", "iphonesimulator", "--platform-name", "ios-simulator"]
elif "lldb-simulator-watchos" in config.available_features:
diff --git a/lldb/test/Shell/Driver/LocalLLDBInit.test b/lldb/test/Shell/Driver/LocalLLDBInit.test
index e1b66a0..5db545e 100644
--- a/lldb/test/Shell/Driver/LocalLLDBInit.test
+++ b/lldb/test/Shell/Driver/LocalLLDBInit.test
@@ -1,5 +1,4 @@
# REQUIRES: python
-# UNSUPPORTED: lldb-repro
#
# RUN: mkdir -p %t.root
# RUN: mkdir -p %t.home
diff --git a/lldb/test/Shell/Driver/TestCore.test b/lldb/test/Shell/Driver/TestCore.test
index 2472617..cca8171 100644
--- a/lldb/test/Shell/Driver/TestCore.test
+++ b/lldb/test/Shell/Driver/TestCore.test
@@ -1,4 +1,2 @@
-# UNSUPPORTED: lldb-repro
-#
# RUN: not %lldb -c /bogus/path 2>&1 | FileCheck %s
# CHECK: error: file specified in --core (-c) option doesn't exist
diff --git a/lldb/test/Shell/Driver/TestError.test b/lldb/test/Shell/Driver/TestError.test
index 141c3dd..3d34a72 100644
--- a/lldb/test/Shell/Driver/TestError.test
+++ b/lldb/test/Shell/Driver/TestError.test
@@ -1,3 +1,2 @@
-UNSUPPORTED: lldb-repro
RUN: not %lldb --arch 2>&1 | FileCheck %s
CHECK: error: argument to '--arch' is missing
diff --git a/lldb/test/Shell/Driver/TestFile.test b/lldb/test/Shell/Driver/TestFile.test
index 776baf8..0e80594 100644
--- a/lldb/test/Shell/Driver/TestFile.test
+++ b/lldb/test/Shell/Driver/TestFile.test
@@ -1,4 +1,2 @@
-# UNSUPPORTED: lldb-repro
-#
# RUN: not %lldb -f /bogus/path 2>&1 | FileCheck %s
# CHECK: error: file specified in --file (-f) option doesn't exist
diff --git a/lldb/test/Shell/Driver/TestHelp.test b/lldb/test/Shell/Driver/TestHelp.test
index 2521b31..703000b 100644
--- a/lldb/test/Shell/Driver/TestHelp.test
+++ b/lldb/test/Shell/Driver/TestHelp.test
@@ -1,5 +1,3 @@
-UNSUPPORTED: lldb-repro
-
RUN: %lldb --help | FileCheck %s
RUN: cat %S/../../../docs/man/lldb.rst | FileCheck %s
diff --git a/lldb/test/Shell/Driver/TestPositionalArgs.test b/lldb/test/Shell/Driver/TestPositionalArgs.test
index b4fa48f3..0dbad97 100644
--- a/lldb/test/Shell/Driver/TestPositionalArgs.test
+++ b/lldb/test/Shell/Driver/TestPositionalArgs.test
@@ -1,5 +1,3 @@
-UNSUPPORTED: lldb-repro
-
RUN: echo "int main() { return 0; }" | %clang_host -x c - -o %t.foo
RUN: %lldb -x -b %t.foo bar baz quux | FileCheck %s
diff --git a/lldb/test/Shell/Driver/TestRepl.test b/lldb/test/Shell/Driver/TestRepl.test
index a0bf8c2..0838639 100644
--- a/lldb/test/Shell/Driver/TestRepl.test
+++ b/lldb/test/Shell/Driver/TestRepl.test
@@ -1,5 +1,3 @@
-# UNSUPPORTED: lldb-repro
-#
# RUN: echo ':quit' | %lldb -x --repl -O 'expr 42' -S %S/Inputs/Print2.in -o 'expr 999999' -s %s 2>&1 | FileCheck %s
# CHECK: {{w}}arning: commands specified to run after file load (via -o or -s) are ignored in REPL mode
# CHECK: (int) $0 = 42
diff --git a/lldb/test/Shell/Process/TestEnvironment.test b/lldb/test/Shell/Process/TestEnvironment.test
index e6d6e56..a9c624b 100644
--- a/lldb/test/Shell/Process/TestEnvironment.test
+++ b/lldb/test/Shell/Process/TestEnvironment.test
@@ -1,5 +1,4 @@
UNSUPPORTED: system-windows
-UNSUPPORTED: lldb-repro
The double quotes around "BAR" ensure we don't match the command.
diff --git a/lldb/test/Shell/Quit/TestQuitExitCode-30.test b/lldb/test/Shell/Quit/TestQuitExitCode-30.test
index b0b02bd..2f15398c 100644
--- a/lldb/test/Shell/Quit/TestQuitExitCode-30.test
+++ b/lldb/test/Shell/Quit/TestQuitExitCode-30.test
@@ -1,4 +1,3 @@
# UNSUPPORTED: system-windows
-# UNSUPPORTED: lldb-repro
# RUN: %python %S/expect_exit_code.py 226 %lldb -b -s %s
q -30
diff --git a/lldb/test/Shell/Quit/TestQuitExitCode30.test b/lldb/test/Shell/Quit/TestQuitExitCode30.test
index 92ad3c6..e5ff634 100644
--- a/lldb/test/Shell/Quit/TestQuitExitCode30.test
+++ b/lldb/test/Shell/Quit/TestQuitExitCode30.test
@@ -1,4 +1,3 @@
# UNSUPPORTED: system-windows
-# UNSUPPORTED: lldb-repro
# RUN: %python %S/expect_exit_code.py 30 %lldb -b -s %s
q 30
diff --git a/lldb/test/Shell/Quit/TestQuitExitCodeHexA.test b/lldb/test/Shell/Quit/TestQuitExitCodeHexA.test
index 59b7103..ca0e2d5 100644
--- a/lldb/test/Shell/Quit/TestQuitExitCodeHexA.test
+++ b/lldb/test/Shell/Quit/TestQuitExitCodeHexA.test
@@ -1,4 +1,3 @@
# UNSUPPORTED: system-windows
-# UNSUPPORTED: lldb-repro
# RUN: %python %S/expect_exit_code.py 10 %lldb -b -s %s
q 0xA
diff --git a/lldb/test/Shell/Register/x86-64-read.test b/lldb/test/Shell/Register/x86-64-read.test
index ac3d4d1..fc09319 100644
--- a/lldb/test/Shell/Register/x86-64-read.test
+++ b/lldb/test/Shell/Register/x86-64-read.test
@@ -1,4 +1,3 @@
-# UNSUPPORTED: lldb-repro
# XFAIL: system-windows
# REQUIRES: native && target-x86_64
# RUN: %clangxx_host %p/Inputs/x86-64-read.cpp -o %t
diff --git a/lldb/test/Shell/Register/x86-64-ymm-read.test b/lldb/test/Shell/Register/x86-64-ymm-read.test
index be9133b..0d01b09 100644
--- a/lldb/test/Shell/Register/x86-64-ymm-read.test
+++ b/lldb/test/Shell/Register/x86-64-ymm-read.test
@@ -1,4 +1,3 @@
-# UNSUPPORTED: lldb-repro
# XFAIL: system-windows
# REQUIRES: native && target-x86_64 && native-cpu-avx
# RUN: %clangxx_host %p/Inputs/x86-ymm-read.cpp -o %t
diff --git a/lldb/test/Shell/Register/x86-multithread-write.test b/lldb/test/Shell/Register/x86-multithread-write.test
index 30273a6..cc02b32 100644
--- a/lldb/test/Shell/Register/x86-multithread-write.test
+++ b/lldb/test/Shell/Register/x86-multithread-write.test
@@ -1,7 +1,6 @@
# XFAIL: system-windows
# REQUIRES: native && (target-x86 || target-x86_64)
# UNSUPPORTED: system-debugserver
-# UNSUPPORTED: lldb-repro
# RUN: %clangxx_host %p/Inputs/x86-multithread-write.cpp -o %t -pthread
# RUN: %lldb -b -s %s %t | FileCheck %s
diff --git a/lldb/test/Shell/ScriptInterpreter/Lua/bindings.test b/lldb/test/Shell/ScriptInterpreter/Lua/bindings.test
index d453f11..f53f46b 100644
--- a/lldb/test/Shell/ScriptInterpreter/Lua/bindings.test
+++ b/lldb/test/Shell/ScriptInterpreter/Lua/bindings.test
@@ -1,5 +1,3 @@
-# UNSUPPORTED: lldb-repro
-#
# RUN: cat %s | %lldb --script-language lua 2>&1 | FileCheck %s
script
debugger = lldb.SBDebugger.Create()
diff --git a/lldb/test/Shell/ScriptInterpreter/Lua/convenience_variables.test b/lldb/test/Shell/ScriptInterpreter/Lua/convenience_variables.test
index 6ebcb95..a76378b 100644
--- a/lldb/test/Shell/ScriptInterpreter/Lua/convenience_variables.test
+++ b/lldb/test/Shell/ScriptInterpreter/Lua/convenience_variables.test
@@ -1,5 +1,3 @@
-# UNSUPPORTED: lldb-repro
-#
# This tests that the convenience variables are not nil. Given that there is no
# target we only expect the debugger to be valid.
#
diff --git a/lldb/test/Shell/ScriptInterpreter/Lua/io.test b/lldb/test/Shell/ScriptInterpreter/Lua/io.test
index 80b3b13..f9ef84e 100644
--- a/lldb/test/Shell/ScriptInterpreter/Lua/io.test
+++ b/lldb/test/Shell/ScriptInterpreter/Lua/io.test
@@ -1,5 +1,3 @@
-# UNSUPPORTED: lldb-repro
-#
# RUN: rm -rf %t.stderr %t.stdout
# RUN: cat %s | %lldb --script-language lua 2> %t.stderr > %t.stdout
# RUN: cat %t.stdout | FileCheck %s --check-prefix STDOUT
diff --git a/lldb/test/Shell/ScriptInterpreter/Lua/lua-python.test b/lldb/test/Shell/ScriptInterpreter/Lua/lua-python.test
index 38b4986..b81bddc 100644
--- a/lldb/test/Shell/ScriptInterpreter/Lua/lua-python.test
+++ b/lldb/test/Shell/ScriptInterpreter/Lua/lua-python.test
@@ -1,5 +1,4 @@
# REQUIRES: python
-# UNSUPPORTED: lldb-repro
# RUN: mkdir -p %t
# RUN: cd %t
diff --git a/lldb/test/Shell/ScriptInterpreter/Lua/print.test b/lldb/test/Shell/ScriptInterpreter/Lua/print.test
index f73d100..9df24e8 100644
--- a/lldb/test/Shell/ScriptInterpreter/Lua/print.test
+++ b/lldb/test/Shell/ScriptInterpreter/Lua/print.test
@@ -1,5 +1,3 @@
-# UNSUPPORTED: lldb-repro
-#
# RUN: rm -rf %t.stderr %t.stdout
# RUN: cat %s | %lldb --script-language lua 2> %t.stderr > %t.stdout
# RUN: cat %t.stdout | FileCheck %s --check-prefix STDOUT
diff --git a/lldb/test/Shell/ScriptInterpreter/Lua/quit.test b/lldb/test/Shell/ScriptInterpreter/Lua/quit.test
index 0cef4c2..d66e17e 100644
--- a/lldb/test/Shell/ScriptInterpreter/Lua/quit.test
+++ b/lldb/test/Shell/ScriptInterpreter/Lua/quit.test
@@ -1,5 +1,3 @@
-# UNSUPPORTED: lldb-repro
-#
# RUN: cat %s | %lldb --script-language lua 2>&1 | FileCheck %s
script
print(95000 + 126)
diff --git a/lldb/test/Shell/ScriptInterpreter/Python/Crashlog/lit.local.cfg b/lldb/test/Shell/ScriptInterpreter/Python/Crashlog/lit.local.cfg
index b72b294..52bffae 100644
--- a/lldb/test/Shell/ScriptInterpreter/Python/Crashlog/lit.local.cfg
+++ b/lldb/test/Shell/ScriptInterpreter/Python/Crashlog/lit.local.cfg
@@ -1,9 +1,6 @@
if 'system-darwin' not in config.available_features:
config.unsupported = True
-if 'lldb-repro' in config.available_features:
- config.unsupported = True
-
config.environment["LLDB_APPLE_DSYMFORUUID_EXECUTABLE"] = ""
# Temporary parallel image loading deadlock workaround
diff --git a/lldb/test/Shell/ScriptInterpreter/Python/fail_breakpoint_oneline.test b/lldb/test/Shell/ScriptInterpreter/Python/fail_breakpoint_oneline.test
index 6724464..d661e0a 100644
--- a/lldb/test/Shell/ScriptInterpreter/Python/fail_breakpoint_oneline.test
+++ b/lldb/test/Shell/ScriptInterpreter/Python/fail_breakpoint_oneline.test
@@ -1,5 +1,3 @@
-# UNSUPPORTED: lldb-repro
-#
# RUN: %lldb -s %s --script-language python 2>&1 | FileCheck %s
b main
breakpoint command add -s python -o "1234_foo"
diff --git a/lldb/test/Shell/ScriptInterpreter/Python/sb_address_exception.test b/lldb/test/Shell/ScriptInterpreter/Python/sb_address_exception.test
index 9b8def2..9ce9837 100644
--- a/lldb/test/Shell/ScriptInterpreter/Python/sb_address_exception.test
+++ b/lldb/test/Shell/ScriptInterpreter/Python/sb_address_exception.test
@@ -1,5 +1,3 @@
-# UNSUPPORTED: lldb-repro
-#
# Test that the SBAddress properties throw an exception when used outside of
# the interactive script interpreter.
#
diff --git a/lldb/test/Shell/ScriptInterpreter/Python/scripted_breakpoint.test b/lldb/test/Shell/ScriptInterpreter/Python/scripted_breakpoint.test
index 9f87a7d..f6fff5f 100644
--- a/lldb/test/Shell/ScriptInterpreter/Python/scripted_breakpoint.test
+++ b/lldb/test/Shell/ScriptInterpreter/Python/scripted_breakpoint.test
@@ -1,5 +1,3 @@
-# UNSUPPORTED: lldb-repro
-#
# Test that the scripting language argument to "breakpoint command" is honored
# even if the global scripting language is different.
#
diff --git a/lldb/test/Shell/ScriptInterpreter/Python/scripted_breakpoint_lua.test b/lldb/test/Shell/ScriptInterpreter/Python/scripted_breakpoint_lua.test
index c86ae90..5346d4a 100644
--- a/lldb/test/Shell/ScriptInterpreter/Python/scripted_breakpoint_lua.test
+++ b/lldb/test/Shell/ScriptInterpreter/Python/scripted_breakpoint_lua.test
@@ -1,5 +1,4 @@
# REQUIRES: python
-# UNSUPPORTED: lldb-repro
#
# RUN: cat %s | %lldb --script-language lua 2>&1 | FileCheck %s
b main
diff --git a/lldb/test/Shell/Subprocess/lit.local.cfg b/lldb/test/Shell/Subprocess/lit.local.cfg
deleted file mode 100644
index c9b378b..0000000
--- a/lldb/test/Shell/Subprocess/lit.local.cfg
+++ /dev/null
@@ -1,2 +0,0 @@
-if 'lldb-repro' in config.available_features:
- config.unsupported = True
diff --git a/lldb/test/Shell/SymbolFile/DWARF/x86/debug_loc.s b/lldb/test/Shell/SymbolFile/DWARF/x86/debug_loc.s
index f8e8bfb..427db97 100644
--- a/lldb/test/Shell/SymbolFile/DWARF/x86/debug_loc.s
+++ b/lldb/test/Shell/SymbolFile/DWARF/x86/debug_loc.s
@@ -2,8 +2,6 @@
# behavior in the invalid cases is not particularly important, but it should be
# "reasonable".
-# UNSUPPORTED: lldb-repro
-
# RUN: llvm-mc -triple=x86_64-pc-linux -filetype=obj %s --defsym LOC=0 > %t
# RUN: %lldb %t -o "image lookup -v -a 0" -o "image lookup -v -a 2" \
# RUN: -o "image dump symfile" -o exit | FileCheck %s
diff --git a/lldb/test/Shell/SymbolFile/NativePDB/lit.local.cfg b/lldb/test/Shell/SymbolFile/NativePDB/lit.local.cfg
deleted file mode 100644
index c9b378b..0000000
--- a/lldb/test/Shell/SymbolFile/NativePDB/lit.local.cfg
+++ /dev/null
@@ -1,2 +0,0 @@
-if 'lldb-repro' in config.available_features:
- config.unsupported = True
diff --git a/lldb/test/Shell/SymbolFile/PDB/lit.local.cfg b/lldb/test/Shell/SymbolFile/PDB/lit.local.cfg
deleted file mode 100644
index c9b378b..0000000
--- a/lldb/test/Shell/SymbolFile/PDB/lit.local.cfg
+++ /dev/null
@@ -1,2 +0,0 @@
-if 'lldb-repro' in config.available_features:
- config.unsupported = True
diff --git a/lldb/test/Shell/helper/toolchain.py b/lldb/test/Shell/helper/toolchain.py
index 81ae490..42968128 100644
--- a/lldb/test/Shell/helper/toolchain.py
+++ b/lldb/test/Shell/helper/toolchain.py
@@ -283,20 +283,3 @@ def use_support_substitutions(config):
llvm_config.add_tool_substitutions(support_tools, additional_tool_dirs)
_disallow(config, "clang")
-
-
-def use_lldb_repro_substitutions(config, mode):
- lldb_init = _get_lldb_init_path(config)
- substitutions = [
- ToolSubst(
- "%lldb",
- command=FindTool("lldb-repro"),
- extra_args=[mode, "--no-lldbinit", "-S", lldb_init],
- ),
- ToolSubst(
- "%lldb-init",
- command=FindTool("lldb-repro"),
- extra_args=[mode, "-S", lldb_init],
- ),
- ]
- llvm_config.add_tool_substitutions(substitutions, [config.lldb_tools_dir])
diff --git a/lldb/test/Shell/lit.cfg.py b/lldb/test/Shell/lit.cfg.py
index 9a7b7188..24c910d 100644
--- a/lldb/test/Shell/lit.cfg.py
+++ b/lldb/test/Shell/lit.cfg.py
@@ -59,15 +59,6 @@ if "Thread" in config.llvm_use_sanitizer:
config.environment["TSAN_OPTIONS"] = "halt_on_error=1"
-# Support running the test suite under the lldb-repro wrapper. This makes it
-# possible to capture a test suite run and then rerun all the test from the
-# just captured reproducer.
-lldb_repro_mode = lit_config.params.get("lldb-run-with-repro", None)
-if lldb_repro_mode:
- config.available_features.add("lldb-repro")
- lit_config.note("Running Shell tests in {} mode.".format(lldb_repro_mode))
- toolchain.use_lldb_repro_substitutions(config, lldb_repro_mode)
-
if config.lldb_platform_url and config.cmake_sysroot and config.enable_remote:
if re.match(r".*-linux.*", config.target_triple):
config.available_features.add("remote-linux")
diff --git a/lldb/utils/CMakeLists.txt b/lldb/utils/CMakeLists.txt
index 00c81e6..d08f66f 100644
--- a/lldb/utils/CMakeLists.txt
+++ b/lldb/utils/CMakeLists.txt
@@ -1,3 +1,2 @@
add_subdirectory(lit-cpuid)
add_subdirectory(lldb-dotest)
-add_subdirectory(lldb-repro)
diff --git a/lldb/utils/lldb-repro/CMakeLists.txt b/lldb/utils/lldb-repro/CMakeLists.txt
deleted file mode 100644
index 8ca02b9..0000000
--- a/lldb/utils/lldb-repro/CMakeLists.txt
+++ /dev/null
@@ -1,23 +0,0 @@
-add_custom_target(lldb-repro)
-add_dependencies(lldb-repro lldb-test-depends)
-set_target_properties(lldb-repro PROPERTIES FOLDER "LLDB/Utils")
-
-# Generate lldb-repro Python script for each build mode.
-if(LLDB_BUILT_STANDALONE)
- set(config_types ".")
- if(CMAKE_CONFIGURATION_TYPES)
- set(config_types ${CMAKE_CONFIGURATION_TYPES})
- endif()
-
- foreach(config_type ${config_types})
- string(REPLACE ${CMAKE_CFG_INTDIR} ${config_type} config_runtime_output_dir ${LLVM_RUNTIME_OUTPUT_INTDIR})
- configure_file(lldb-repro.py ${config_runtime_output_dir}/lldb-repro COPYONLY)
- endforeach()
-elseif(NOT "${CMAKE_CFG_INTDIR}" STREQUAL ".")
- foreach(LLVM_BUILD_MODE ${CMAKE_CONFIGURATION_TYPES})
- string(REPLACE ${CMAKE_CFG_INTDIR} ${LLVM_BUILD_MODE} LLDB_REPRO_DIR ${LLVM_RUNTIME_OUTPUT_INTDIR})
- configure_file(lldb-repro.py ${LLDB_REPRO_DIR}/lldb-repro COPYONLY)
- endforeach()
-else()
- configure_file(lldb-repro.py ${LLVM_RUNTIME_OUTPUT_INTDIR}/lldb-repro COPYONLY)
-endif()
diff --git a/lldb/utils/lldb-repro/lldb-repro.py b/lldb/utils/lldb-repro/lldb-repro.py
deleted file mode 100755
index 30788d6..0000000
--- a/lldb/utils/lldb-repro/lldb-repro.py
+++ /dev/null
@@ -1,86 +0,0 @@
-#!/usr/bin/env python
-"""lldb-repro
-
-lldb-repro is a utility to transparently capture and replay debugger sessions
-through the command line driver. Its used to test the reproducers by running
-the test suite twice.
-
-During the first run, with 'capture' as its first argument, it captures a
-reproducer for every lldb invocation and saves it to a well-know location
-derived from the arguments and current working directory.
-
-During the second run, with 'replay' as its first argument, the test suite is
-run again but this time every invocation of lldb replays the previously
-recorded session.
-"""
-
-import hashlib
-import os
-import shutil
-import subprocess
-import sys
-import tempfile
-
-
-def help():
- print("usage: {} capture|replay [args]".format(sys.argv[0]))
-
-
-def main():
- if len(sys.argv) < 2:
- help()
- return 1
-
- # Compute an MD5 hash based on the input arguments and the current working
- # directory.
- h = hashlib.md5()
- h.update(" ".join(sys.argv[2:]).encode("utf-8"))
- h.update(os.getcwd().encode("utf-8"))
- input_hash = h.hexdigest()
-
- # Use the hash to "uniquely" identify a reproducer path.
- reproducer_path = os.path.join(tempfile.gettempdir(), input_hash)
-
- # Create a new lldb invocation with capture or replay enabled.
- lldb = os.path.join(os.path.dirname(sys.argv[0]), "lldb")
- new_args = [lldb]
- if sys.argv[1] == "replay":
- new_args.extend(["--replay", reproducer_path])
- elif sys.argv[1] == "capture":
- new_args.extend(
- [
- "--capture",
- "--capture-path",
- reproducer_path,
- "--reproducer-generate-on-exit",
- ]
- )
- new_args.extend(sys.argv[2:])
- else:
- help()
- return 1
-
- exit_code = subprocess.call(new_args)
-
- # The driver always exists with a zero exit code during replay. Store the
- # exit code and return that for tests that expect a non-zero exit code.
- exit_code_path = os.path.join(reproducer_path, "exit_code.txt")
- if sys.argv[1] == "replay":
- replay_exit_code = exit_code
- with open(exit_code_path, "r") as f:
- exit_code = int(f.read())
- if replay_exit_code != 0:
- print("error: replay failed with exit code {}".format(replay_exit_code))
- print("invocation: " + " ".join(new_args))
- # Return 1 if the expected exit code is 0 or vice versa.
- return 1 if (exit_code == 0) else 0
- shutil.rmtree(reproducer_path, True)
- elif sys.argv[1] == "capture":
- with open(exit_code_path, "w") as f:
- f.write("%d" % exit_code)
-
- return exit_code
-
-
-if __name__ == "__main__":
- exit(main())