[Lldb-commits] [lldb] r355991 - Fix the broken Batch test by passing a custom module cache to the inferior lldb.
Adrian Prantl via lldb-commits
lldb-commits at lists.llvm.org
Tue Mar 12 15:20:30 PDT 2019
Author: adrian
Date: Tue Mar 12 15:20:29 2019
New Revision: 355991
URL: http://llvm.org/viewvc/llvm-project?rev=355991&view=rev
Log:
Fix the broken Batch test by passing a custom module cache to the inferior lldb.
Modified:
lldb/trunk/packages/Python/lldbsuite/test/driver/batch_mode/TestBatchMode.py
Modified: lldb/trunk/packages/Python/lldbsuite/test/driver/batch_mode/TestBatchMode.py
URL: http://llvm.org/viewvc/llvm-project/lldb/trunk/packages/Python/lldbsuite/test/driver/batch_mode/TestBatchMode.py?rev=355991&r1=355990&r2=355991&view=diff
==============================================================================
--- lldb/trunk/packages/Python/lldbsuite/test/driver/batch_mode/TestBatchMode.py (original)
+++ lldb/trunk/packages/Python/lldbsuite/test/driver/batch_mode/TestBatchMode.py Tue Mar 12 15:20:29 2019
@@ -47,10 +47,11 @@ class DriverBatchModeTest (TestBase):
import pexpect
exe = self.getBuildArtifact("a.out")
+ module_cache = self.getBuildArtifact("module.cache")
prompt = "(lldb) "
# Pass CRASH so the process will crash and stop in batch mode.
- run_commands = ' -b -o "break set -n main" -o "run" -o "continue" -k "frame var touch_me_not"'
+ run_commands = ' -b -o "settings set symbols.clang-modules-cache-path %s" -o "break set -n main" -o "run" -o "continue" -k "frame var touch_me_not"' % module_cache
self.child = pexpect.spawn(
'%s %s %s %s -- CRASH' %
(lldbtest_config.lldbExec, self.lldbOption, run_commands, exe))
@@ -87,10 +88,11 @@ class DriverBatchModeTest (TestBase):
import pexpect
exe = self.getBuildArtifact("a.out")
+ module_cache = self.getBuildArtifact("module.cache")
prompt = "(lldb) "
# Now do it again, and make sure if we don't crash, we quit:
- run_commands = ' -b -o "break set -n main" -o "run" -o "continue" '
+ run_commands = ' -b -o "settings set symbols.clang-modules-cache-path %s" -o "break set -n main" -o "run" -o "continue" '%module_cache
self.child = pexpect.spawn(
'%s %s %s %s -- NOCRASH' %
(lldbtest_config.lldbExec, self.lldbOption, run_commands, exe))
@@ -131,6 +133,7 @@ class DriverBatchModeTest (TestBase):
import pexpect
exe = self.getBuildArtifact("a.out")
+ module_cache = self.getBuildArtifact("module.cache")
prompt = "(lldb) "
# Finally, start up the process by hand, attach to it, and wait for its completion.
@@ -156,8 +159,8 @@ class DriverBatchModeTest (TestBase):
self.victim.expect("Waiting")
- run_commands = ' -b -o "process attach -p %d" -o "breakpoint set --file %s -p \'Stop here to unset keep_waiting\' -N keep_waiting" -o "continue" -o "break delete keep_waiting" -o "expr keep_waiting = 0" -o "continue" ' % (
- victim_pid, self.source)
+ run_commands = ' -b -o "settings set symbols.clang-modules-cache-path %s" -o "process attach -p %d" -o "breakpoint set --file %s -p \'Stop here to unset keep_waiting\' -N keep_waiting" -o "continue" -o "break delete keep_waiting" -o "expr keep_waiting = 0" -o "continue" ' % (
+ module_cache, victim_pid, self.source)
self.child = pexpect.spawn(
'%s %s %s %s' %
(lldbtest_config.lldbExec,
More information about the lldb-commits
mailing list