teak-llvm/lldb/packages/Python/lldbsuite/test/expression_command
Pavel Labath 12a7e6c09c dotest: improvements to the pexpect tests
Summary:
While working on r370054, i've found it frustrating that the test output
was compeletely unhelpful in case of failures. Therefore I've decided to
improve that. In this I reuse the PExpectTest class, which was one of
our mechanisms for running pexpect tests, but which has gotten orhpaned
in the mean time.

I've replaced the existing send methods with a "expect" method, which
I've tried to design so that it has a similar interface to the expect
method in regular non-pexpect dotest tests (as it essentially does
something very similar). I've kept the ability to dump the transcript of
the pexpect communication to stdout in the "trace" mode, as that is a
very handy way to figure out what the test is doing. I've also removed
the "expect_string" method used in the existing tests -- I've found this
to be unhelpful because it hides the message that would be normally
displayed by the EOF exception. Although vebose, this message includes
some important information, like what strings we were searching for,
what were the last bits of lldb output, etc. I've also beefed up the
class to automatically disable the debug info test duplication, and
auto-skip tests when the host platform does not support pexpect.

This patch ports TestMultilineCompletion and TestIOHandlerCompletion to
the new class. It also deletes TestFormats as it is not testing anything
(definitely not formats) -- it was committed with the test code
commented out (r228207), and then the testing code was deleted in
r356000.

Reviewers: teemperor, JDevlieghere, davide

Subscribers: aprantl, lldb-commits

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

llvm-svn: 370449
2019-08-30 09:07:42 +00:00
..
anonymous-struct [lldbsuite] Un-xfail tests on Windows that are now passing 2018-12-19 19:04:01 +00:00
argument_passing_restrictions Disable TestArgumentPassingRestrictions for clang < 7 2019-05-02 18:26:46 +00:00
calculator_mode
call-function [test] Remove flakiness decorator from TestObjCDynamicSBType 2018-12-30 06:10:03 +00:00
call-overridden-method [lit, lldbsuite] Disable tests that are failing because of pr21765 and pr24489 2018-05-17 16:58:00 +00:00
call-restarts [lldb] [Process/NetBSD] Report stopped process on SIGSTOP 2019-07-25 20:27:40 +00:00
call-throws Fix whitespace in the python test suite. 2018-07-27 22:20:59 +00:00
cast_int_to_anonymous_enum typedef enum -> enum 2019-05-14 08:55:50 +00:00
char [lldbsuite] Un-xfail tests on Windows that are now passing (pt.2) 2018-12-19 19:10:25 +00:00
class_template_specialization_empty_pack Fix handling of CreateTemplateParameterList when there is an empty pack 2019-01-30 21:48:56 +00:00
completion [lldb][NFC] Remove unused imports in python tests 2019-08-02 08:06:22 +00:00
completion-crash1 [lldb][NFC] Check in crashing test case 2019-07-30 12:20:03 +00:00
completion-crash2 [lldb][NFC] Check in another crashing test case 2019-07-31 12:06:22 +00:00
completion-crash-incomplete-record [lldb][NFC] Check in completion crash test case 2019-07-31 12:15:21 +00:00
completion-crash-lambda Improve anonymous class heuristic in ClangASTContext::CreateRecordType 2019-08-14 22:30:29 +00:00
completion-in-lambda-and-unnnamed-class Improve anonymous class heuristic in ClangASTContext::CreateRecordType 2019-08-14 22:30:29 +00:00
context-object [Expressions] Add support of expressions evaluation in some object's context 2019-02-05 09:14:36 +00:00
context-object-objc [Expressions] Add support of expressions evaluation in some object's context 2019-02-05 09:14:36 +00:00
dollar-in-variable [lldb] Disable TestDollarInVariable.py on Windows 2019-07-11 00:35:31 +00:00
dont_allow_jit [lldb][NFC] Remove unused imports in python tests 2019-08-02 08:06:22 +00:00
expr-in-syscall [lldb][NFC] Remove unused imports in python tests 2019-08-02 08:06:22 +00:00
fixits Fix whitespace in the python test suite. 2018-07-27 22:20:59 +00:00
formatters [lldb] [test] Mark failing tests XFAIL on NetBSD 2019-03-04 16:54:06 +00:00
function_template_specialization_temp_args Fix CreateFunctionTemplateSpecialization to prevent dangling poiner to stack memory 2019-07-17 20:16:13 +00:00
import_builtin_fileid Adding test to cover the correct import of SourceLocation pertaining to a built-in during expression parsing 2019-03-06 18:03:54 +00:00
import-std-module [lldb][NFC] Fix import-std-module tests that relied on fix-its to pass 2019-07-30 13:11:59 +00:00
inline-namespace Correctly look up declarations in inline namespaces 2019-03-12 07:45:04 +00:00
ir-interpreter [lldb][NFC] Remove unused imports in python tests 2019-08-02 08:06:22 +00:00
ir-interpreter-phi-nodes [lldb][NFC] Remove unused imports in python tests 2019-08-02 08:06:22 +00:00
issue_11588 [lldb][NFC] Remove unused imports in python tests 2019-08-02 08:06:22 +00:00
macros
multiline-completion dotest: improvements to the pexpect tests 2019-08-30 09:07:42 +00:00
namespace_local_var_same_name_cpp_and_c Fixed some minor style issues in rLLDB359921 [NFC] 2019-05-03 21:01:45 +00:00
namespace_local_var_same_name_obj_c Fix for ambiguous lookup in expressions between local variable and namespace 2019-05-03 19:59:22 +00:00
options [lldb][NFC] Remove unused imports in python tests 2019-08-02 08:06:22 +00:00
persist_objc_pointeetype
persistent_ptr_update
persistent_types [lldb][NFC] Remove unused imports in python tests 2019-08-02 08:06:22 +00:00
persistent_variables [lldb][NFC] Remove unused imports in python tests 2019-08-02 08:06:22 +00:00
po_verbosity
pr35310 [lldbsuite] Un-xfail tests on Windows that are now passing (pt.2) 2018-12-19 19:10:25 +00:00
radar_8638051 [lldb][NFC] Remove unused imports in python tests 2019-08-02 08:06:22 +00:00
radar_9531204 [lldb][NFC] Remove unused imports in python tests 2019-08-02 08:06:22 +00:00
radar_9673664 [lldb][NFC] Remove unused imports in python tests 2019-08-02 08:06:22 +00:00
rdar42038760 [IRInterpreter] Fix misevaluation of interpretation expressions with urem. 2018-07-12 00:31:04 +00:00
rdar44436068 Don't run TestBreakpointThumbCodesection.py on darwin systems; 2019-01-17 22:26:25 +00:00
save_jit_objects [lldb][NFC] Remove unused imports in python tests 2019-08-02 08:06:22 +00:00
scoped_enums Rename test directory 2019-01-24 18:24:17 +00:00
test [lldb][NFC] Remove unused imports in python tests 2019-08-02 08:06:22 +00:00
timeout [lldb] [Process/NetBSD] Report stopped process on SIGSTOP 2019-07-25 20:27:40 +00:00
top-level [lldb][NFC] Remove unused imports in python tests 2019-08-02 08:06:22 +00:00
two-files
unicode-in-variable [lldb] Fix handling of dollar characters in expr command 2019-07-10 21:04:01 +00:00
unwind_expression [lldb][NFC] Remove unused imports in python tests 2019-08-02 08:06:22 +00:00
vector_of_enums Fix for regression test, since we rely on the formatter for std::vector in the test we need a libc++ category. 2019-03-28 20:25:57 +00:00
weak_symbols [lldb][NFC] Remove unused imports in python tests 2019-08-02 08:06:22 +00:00
xvalue Fix whitespace in the python test suite. 2018-07-27 22:20:59 +00:00
.categories