teak-llvm/lldb/packages/Python/lldbsuite/test/functionalities
Pavel Labath 7c94582f90 Add "lldb-test breakpoint" command and convert the case-sensitivity test to use it
Summary:
The command takes two input arguments: a module to use as a debug target
and a file containing a list of commands. The command will execute each
of the breakpoint commands in the file and dump the breakpoint state
after each one.

The commands are expected to be breakpoint set/remove/etc. commands, but
I explicitly allow any lldb command here, so you can do things like
change setting which impact breakpoint resolution, etc. There is also a
"-persistent" flag, which causes lldb-test to *not* automatically clear
the breakpoint list after each command. Right now I don't use it, but
the idea behind it was that it could be used to test more complex
combinations of breakpoint commands (set+modify, set+disable, etc.).

Right now the command prints out only the basic breakpoint state, but
more information can be easily added there.  To enable easy matching of
the "at least one breakpoint location found" state, the command
explicitly prints out the string "At least one breakpoint location.".

To enable testing of breakpoints set with an absolute paths, I add the
ability to perform rudimentary substitutions on the commands: right now
the string %p is replaced by the directory which contains the command
file (so, under normal circumstances, this will perform the same
substitution as lit would do for %p).

I use this command to rewrite the TestBreakpointCaseSensitivity test --
the test was checking about a dozen breakpoint commands, but it was
launching a new process for each one, so it took about 90 seconds to
run. The new test takes about 0.3 seconds for me, which is approximately
a 300x speedup.

Reviewers: davide, zturner, jingham

Subscribers: luporl, lldb-commits

Differential Revision: https://reviews.llvm.org/D43686

llvm-svn: 326112
2018-02-26 18:50:16 +00:00
..
abbreviation *** This commit represents a complete reformatting of the LLDB source code 2016-09-06 20:57:50 +00:00
alias
apropos_with_process Wrap all references to build artifacts in the LLDB testsuite (NFC) 2018-01-19 23:24:35 +00:00
archives Wrap all references to build artifacts in the LLDB testsuite (NFC) 2018-01-19 23:24:35 +00:00
asan Wrap all references to build artifacts in the LLDB testsuite (NFC) 2018-01-19 23:24:35 +00:00
attach_resume Compile the LLDB tests out-of-tree. 2018-01-30 18:29:16 +00:00
avoids-fd-leak [testsuite] Reintroduce test to check leaking. 2018-02-12 18:06:34 +00:00
backticks *** This commit represents a complete reformatting of the LLDB source code 2016-09-06 20:57:50 +00:00
breakpoint Add "lldb-test breakpoint" command and convert the case-sensitivity test to use it 2018-02-26 18:50:16 +00:00
command_history *** This commit represents a complete reformatting of the LLDB source code 2016-09-06 20:57:50 +00:00
command_regex *** This commit represents a complete reformatting of the LLDB source code 2016-09-06 20:57:50 +00:00
command_script Wrap all references to build artifacts in the LLDB testsuite (NFC) 2018-01-19 23:24:35 +00:00
command_script_alias *** This commit represents a complete reformatting of the LLDB source code 2016-09-06 20:57:50 +00:00
command_script_immediate_output Compile the LLDB tests out-of-tree. 2018-01-30 18:29:16 +00:00
command_source Implement interactive command interruption 2017-10-05 23:41:28 +00:00
completion Rewrite this test not to use pexpect. 2018-01-30 18:43:31 +00:00
conditional_break Wrap all references to build artifacts in the LLDB testsuite (NFC) 2018-01-19 23:24:35 +00:00
darwin_log Wrap all references to build artifacts in the LLDB testsuite (NFC) 2018-01-19 23:24:35 +00:00
data-formatter [ObjC] Fix the NSConcreteData formatter and test it 2018-02-22 23:48:21 +00:00
dead-strip Wrap all references to build artifacts in the LLDB testsuite (NFC) 2018-01-19 23:24:35 +00:00
disassembly Wrap all references to build artifacts in the LLDB testsuite (NFC) 2018-01-19 23:24:35 +00:00
dynamic_value_child_count Wrap all references to build artifacts in the LLDB testsuite (NFC) 2018-01-19 23:24:35 +00:00
embedded_interpreter Wrap all references to build artifacts in the LLDB testsuite (NFC) 2018-01-19 23:24:35 +00:00
exec [dotest] make debug info variant accessible in setUp() 2018-02-05 11:30:46 +00:00
expr-doesnt-deadlock Wrap all references to build artifacts in the LLDB testsuite (NFC) 2018-01-19 23:24:35 +00:00
fat_archives Compile the LLDB tests out-of-tree. 2018-01-30 18:29:16 +00:00
format Wrap all references to build artifacts in the LLDB testsuite (NFC) 2018-01-19 23:24:35 +00:00
frame_var Wrap all references to build artifacts in the LLDB testsuite (NFC) 2018-01-19 23:24:35 +00:00
frame_var_scope Fix an issue where frame variable -s <varname> would not show the scope even though the user asked for it 2016-10-26 19:17:49 +00:00
frame-diagnose Enforce that tests building with buildDefault set NO_DEBUG_INFO_TESTCASE 2018-01-30 17:02:42 +00:00
frame-language Compile the LLDB tests out-of-tree. 2018-01-30 18:29:16 +00:00
gdb_remote_client Add SBDebugger::GetBuildConfiguration and use it to skip an XML test 2018-02-19 15:06:28 +00:00
history Fix !N and !-N commands and add a test case. 2017-04-19 23:21:04 +00:00
inferior-assert Wrap all references to build artifacts in the LLDB testsuite (NFC) 2018-01-19 23:24:35 +00:00
inferior-changed Wrap all references to build artifacts in the LLDB testsuite (NFC) 2018-01-19 23:24:35 +00:00
inferior-crashing Wrap all references to build artifacts in the LLDB testsuite (NFC) 2018-01-19 23:24:35 +00:00
inline-stepping Wrap all references to build artifacts in the LLDB testsuite (NFC) 2018-01-19 23:24:35 +00:00
jitloader_gdb Wrap all references to build artifacts in the LLDB testsuite (NFC) 2018-01-19 23:24:35 +00:00
launch_with_shellexpand Compile the LLDB tests out-of-tree. 2018-01-30 18:29:16 +00:00
load_unload Only throw -fPIC when building a shared library 2018-02-08 23:10:29 +00:00
longjmp Wrap all references to build artifacts in the LLDB testsuite (NFC) 2018-01-19 23:24:35 +00:00
memory Wrap all references to build artifacts in the LLDB testsuite (NFC) 2018-01-19 23:24:35 +00:00
mtc/simple Wrap all references to build artifacts in the LLDB testsuite (NFC) 2018-01-19 23:24:35 +00:00
multidebugger_commands *** This commit represents a complete reformatting of the LLDB source code 2016-09-06 20:57:50 +00:00
nested_alias Wrap all references to build artifacts in the LLDB testsuite (NFC) 2018-01-19 23:24:35 +00:00
non-overlapping-index-variable-i [test] Fix a test that never compiled under -fmodules 2018-01-25 21:20:29 +00:00
nosucharch Wrap all references to build artifacts in the LLDB testsuite (NFC) 2018-01-19 23:24:35 +00:00
object-file *** This commit represents a complete reformatting of the LLDB source code 2016-09-06 20:57:50 +00:00
paths *** This commit represents a complete reformatting of the LLDB source code 2016-09-06 20:57:50 +00:00
platform Fix PlatformPythonTestCase.test_platform_list for the build bots 2017-08-09 15:49:15 +00:00
plugins Compile the LLDB tests out-of-tree. 2018-01-30 18:29:16 +00:00
postmortem TestLinuxCore -- add a check for thread name 2018-02-05 12:34:09 +00:00
pre_run_dylibs Only throw -fPIC when building a shared library 2018-02-08 23:10:29 +00:00
process_attach Fix a couple of more tests to not create files in the source tree 2018-02-21 15:33:53 +00:00
process_group Fix a couple of more tests to not create files in the source tree 2018-02-21 15:33:53 +00:00
process_launch replace os.mkdirs with lldbutil.mkdir_p (NFC) 2018-01-31 21:39:00 +00:00
process_save_core Compile the LLDB tests out-of-tree. 2018-01-30 18:29:16 +00:00
ptr_refs Wrap all references to build artifacts in the LLDB testsuite (NFC) 2018-01-19 23:24:35 +00:00
recursion Wrap all references to build artifacts in the LLDB testsuite (NFC) 2018-01-19 23:24:35 +00:00
register Compile the LLDB tests out-of-tree. 2018-01-30 18:29:16 +00:00
rerun Wrap all references to build artifacts in the LLDB testsuite (NFC) 2018-01-19 23:24:35 +00:00
return-value Added lldbutil.run_to_name_breakpoint and use it in one test. 2018-02-01 21:35:50 +00:00
set-data Wrap all references to build artifacts in the LLDB testsuite (NFC) 2018-01-19 23:24:35 +00:00
signal Rewrite the flaky test_restart_bug test in a more deterministic way 2018-02-08 10:37:23 +00:00
single-quote-in-filename-to-lldb replace os.mkdirs with lldbutil.mkdir_p (NFC) 2018-01-31 21:39:00 +00:00
step-avoids-no-debug Compile the LLDB tests out-of-tree. 2018-01-30 18:29:16 +00:00
stop-hook Compile the LLDB tests out-of-tree. 2018-01-30 18:29:16 +00:00
target_command Compile the LLDB tests out-of-tree. 2018-01-30 18:29:16 +00:00
testid add a simple test case to validate test id() 2016-10-03 22:49:13 +00:00
thread Fix breakpoint thread name conditionals after breakpoint options refactor. 2018-02-23 21:10:42 +00:00
tsan Wrap all references to build artifacts in the LLDB testsuite (NFC) 2018-01-19 23:24:35 +00:00
tty Wrap all references to build artifacts in the LLDB testsuite (NFC) 2018-01-19 23:24:35 +00:00
type_completion Wrap all references to build artifacts in the LLDB testsuite (NFC) 2018-01-19 23:24:35 +00:00
type_lookup Wrap all references to build artifacts in the LLDB testsuite (NFC) 2018-01-19 23:24:35 +00:00
ubsan Fix TestUbsanBasic 2018-02-23 05:03:10 +00:00
unwind Wrap all references to build artifacts in the LLDB testsuite (NFC) 2018-01-19 23:24:35 +00:00
value_md5_crash Wrap all references to build artifacts in the LLDB testsuite (NFC) 2018-01-19 23:24:35 +00:00
watchpoint Build each testcase variant in its own subdirectory and remove the srcdir lock file 2018-02-06 18:22:51 +00:00