Skip to content

Commit 4f84d9f

Browse files
committed
Auto merge of #157234 - Walnut356:test_package, r=jieyouxu
Convert `lldb_batchmode` to a package The new testing logic for #148483 will end up being a couple of python files, and it doesn't make sense to have them all as freefloating scripts in `src/etc`. I also made sure to update occurrences of `lldb_batchmode.py` in the code and documentation to point to the new package instead.
2 parents 4a31759 + c191595 commit 4f84d9f

4 files changed

Lines changed: 5 additions & 8 deletions

File tree

src/etc/lldb_batchmode/__init__.py

Lines changed: 1 addition & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1 @@
1+
from .runner import main as main
Lines changed: 1 addition & 5 deletions
Original file line numberDiff line numberDiff line change
@@ -166,7 +166,7 @@ def start_watchdog():
166166
def watchdog():
167167
while clock() < watchdog_max_time:
168168
time.sleep(1)
169-
print("TIMEOUT: lldb_batchmode.py has been running for too long. Aborting!")
169+
print("TIMEOUT: lldb_batchmode has been running for too long. Aborting!")
170170
thread.interrupt_main()
171171

172172
# Start the listener and let it run as a daemon
@@ -252,7 +252,3 @@ def main():
252252
sys.exit(1)
253253
finally:
254254
script_file.close()
255-
256-
257-
if __name__ == "__main__":
258-
main()

src/tools/compiletest/src/lib.rs

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -705,7 +705,7 @@ fn common_inputs_stamp(config: &Config) -> Stamp {
705705
"src/etc/gdb_load_rust_pretty_printers.py",
706706
"src/etc/gdb_lookup.py",
707707
"src/etc/gdb_providers.py",
708-
"src/etc/lldb_batchmode.py",
708+
"src/etc/lldb_batchmode",
709709
"src/etc/lldb_lookup.py",
710710
"src/etc/lldb_providers.py",
711711
];

tests/debuginfo/basic-stepping.rs

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -58,10 +58,10 @@
5858
//@ lldb-command: settings set stop-line-count-after 0
5959

6060
//@ lldb-command: run
61-
// In `breakpoint_callback()` in `./src/etc/lldb_batchmode.py` we do
61+
// In `breakpoint_callback()` in `./src/etc/lldb_batchmode/runner.py` we do
6262
// `SetSelectedFrame()`, which causes LLDB to show the current line and one line
6363
// before (since we changed `stop-line-count-before`). Note that
64-
// `normalize_whitespace()` in `lldb_batchmode.py` removes the newlines of the
64+
// `normalize_whitespace()` in `lldb_batchmode/runner.py` removes the newlines of the
6565
// output. So the current line and the line before actually ends up on the same
6666
// output line. That's fine.
6767
//@ lldb-check: [...]let mut c = 27;[...]

0 commit comments

Comments
 (0)