[Lldb-commits] [lldb] 88591aa - [lldb] Remove lldb-repro utility

Jonas Devlieghere via lldb-commits lldb-commits at lists.llvm.org
Thu Oct 31 10:39:54 PDT 2024


Author: Jonas Devlieghere
Date: 2024-10-31T10:39:48-07:00
New Revision: 88591aa0ca7e4d99da353d49f91ea63e43fb55e0

URL: https://github.com/llvm/llvm-project/commit/88591aa0ca7e4d99da353d49f91ea63e43fb55e0
DIFF: https://github.com/llvm/llvm-project/commit/88591aa0ca7e4d99da353d49f91ea63e43fb55e0.diff

LOG: [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.

Added: 
    

Modified: 
    lldb/test/API/lit.cfg.py
    lldb/test/Shell/Driver/LocalLLDBInit.test
    lldb/test/Shell/Driver/TestCore.test
    lldb/test/Shell/Driver/TestError.test
    lldb/test/Shell/Driver/TestFile.test
    lldb/test/Shell/Driver/TestHelp.test
    lldb/test/Shell/Driver/TestPositionalArgs.test
    lldb/test/Shell/Driver/TestRepl.test
    lldb/test/Shell/Process/TestEnvironment.test
    lldb/test/Shell/Quit/TestQuitExitCode-30.test
    lldb/test/Shell/Quit/TestQuitExitCode30.test
    lldb/test/Shell/Quit/TestQuitExitCodeHexA.test
    lldb/test/Shell/Register/x86-64-read.test
    lldb/test/Shell/Register/x86-64-ymm-read.test
    lldb/test/Shell/Register/x86-multithread-write.test
    lldb/test/Shell/ScriptInterpreter/Lua/bindings.test
    lldb/test/Shell/ScriptInterpreter/Lua/convenience_variables.test
    lldb/test/Shell/ScriptInterpreter/Lua/io.test
    lldb/test/Shell/ScriptInterpreter/Lua/lua-python.test
    lldb/test/Shell/ScriptInterpreter/Lua/print.test
    lldb/test/Shell/ScriptInterpreter/Lua/quit.test
    lldb/test/Shell/ScriptInterpreter/Python/Crashlog/lit.local.cfg
    lldb/test/Shell/ScriptInterpreter/Python/fail_breakpoint_oneline.test
    lldb/test/Shell/ScriptInterpreter/Python/sb_address_exception.test
    lldb/test/Shell/ScriptInterpreter/Python/scripted_breakpoint.test
    lldb/test/Shell/ScriptInterpreter/Python/scripted_breakpoint_lua.test
    lldb/test/Shell/SymbolFile/DWARF/x86/debug_loc.s
    lldb/test/Shell/helper/toolchain.py
    lldb/test/Shell/lit.cfg.py
    lldb/utils/CMakeLists.txt

Removed: 
    lldb/test/Shell/Subprocess/lit.local.cfg
    lldb/test/Shell/SymbolFile/NativePDB/lit.local.cfg
    lldb/test/Shell/SymbolFile/PDB/lit.local.cfg
    lldb/utils/lldb-repro/CMakeLists.txt
    lldb/utils/lldb-repro/lldb-repro.py


################################################################################
diff  --git a/lldb/test/API/lit.cfg.py b/lldb/test/API/lit.cfg.py
index 6481ae8b663c8c..c8e4a4c461f123 100644
--- a/lldb/test/API/lit.cfg.py
+++ b/lldb/test/API/lit.cfg.py
@@ -268,12 +268,6 @@ def delete_module_cache(path):
 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 e1b66a09984445..5db545e7ec5610 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 2472617235124b..cca8171da63126 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 141c3ddf0f5f31..3d34a72b14aba5 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 776baf8ba0c5e6..0e80594aeb1b52 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 2521b31a618836..703000b6452e96 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 b4fa48f3af38f1..0dbad97e888ca6 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 a0bf8c26fd575b..083863985a14b0 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 e6d6e56fc92035..a9c624b8a4ec89 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 b0b02bdf70041d..2f15398c7614e9 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 92ad3c6d1fe48a..e5ff634e713678 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 59b7103ad0863d..ca0e2d5acc3bc9 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 ac3d4d1e272497..fc093190c2560c 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 be9133b77d42c5..0d01b0937f1d1a 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 30273a6609dc80..cc02b323c72636 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 d453f11f1ec768..f53f46b54da2a3 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 6ebcb953a96e06..a76378b9aa785d 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 80b3b13cdd1de1..f9ef84e957c53e 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 38b4986a667308..b81bddc25177ae 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 f73d100459db54..9df24e8026507c 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 0cef4c2f2c177d..d66e17e25c73c0 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 b72b2941989317..52bffaeac372b8 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 67244641cf97f7..d661e0a05f0fb8 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 9b8def211966b2..9ce9837c8f2781 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 9f87a7d96e099e..f6fff5f51de8ec 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 
diff erent.
 #

diff  --git a/lldb/test/Shell/ScriptInterpreter/Python/scripted_breakpoint_lua.test b/lldb/test/Shell/ScriptInterpreter/Python/scripted_breakpoint_lua.test
index c86ae9057c502f..5346d4ae32b99e 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 c9b378b7a8a5a9..00000000000000
--- 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 f8e8bfba970f0d..427db9797add42 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 c9b378b7a8a5a9..00000000000000
--- 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 c9b378b7a8a5a9..00000000000000
--- 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 81ae490f6a7dc4..42968128f27026 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 9a7b71889f8dff..24c910d2fc561a 100644
--- a/lldb/test/Shell/lit.cfg.py
+++ b/lldb/test/Shell/lit.cfg.py
@@ -59,15 +59,6 @@
     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 00c81e655b7563..d08f66f7b6c56a 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 8ca02b9fb81933..00000000000000
--- 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 30788d6a815e1a..00000000000000
--- 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())


        


More information about the lldb-commits mailing list