teak-llvm/lldb/packages/Python/lldbsuite/test
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
..
android/platform [lldb][NFC] Remove unused imports in python tests 2019-08-02 08:06:22 +00:00
api [lldb][NFC] Remove unused imports in python tests 2019-08-02 08:06:22 +00:00
arm [lldb][NFC] Remove unused imports in python tests 2019-08-02 08:06:22 +00:00
benchmarks [lldb][NFC] Remove unused imports in python tests 2019-08-02 08:06:22 +00:00
driver/batch_mode [lldb][NFC] Remove unused imports in python tests 2019-08-02 08:06:22 +00:00
expression_command dotest: improvements to the pexpect tests 2019-08-30 09:07:42 +00:00
functionalities dotest: improvements to the pexpect tests 2019-08-30 09:07:42 +00:00
help [lldb][NFC] Merge multiple TestApropos.py 2019-08-21 14:22:59 +00:00
iohandler/completion dotest: improvements to the pexpect tests 2019-08-30 09:07:42 +00:00
issue_verification Update the file headers across all of the LLVM projects in the monorepo 2019-01-19 08:50:56 +00:00
lang [lldb][NFC] Also test operator new/new[]/delete/delete[]/comma/addr-of 2019-08-29 09:39:33 +00:00
linux [lldb][NFC] Remove unused imports in python tests 2019-08-02 08:06:22 +00:00
logging [lldb][NFC] Remove unused imports in python tests 2019-08-02 08:06:22 +00:00
macosx TestFunctionStarts.py: add synchronization 2019-08-26 17:14:05 +00:00
make [lldb][test_suite] skip tests of libstdcpp on Android and clean up 2019-07-23 00:28:26 +00:00
plugins [dotest] Don't set the DWARF version override in CFLAGS_EXTRA. 2019-08-20 23:56:32 +00:00
python_api [API] Have SBCommandReturnObject::GetOutput/Error return "" instead of nullptr 2019-08-14 08:11:20 +00:00
quit Allow specifying an exit code for the 'quit' command 2018-07-11 17:18:01 +00:00
sample_test [lldb][NFC] Remove unused imports in python tests 2019-08-02 08:06:22 +00:00
sanity [test] Fix various module cache bugs and inconsistencies 2019-08-29 18:37:05 +00:00
settings [lldb] Add tests for 'settings remove' and fix error message typos 2019-08-21 13:24:21 +00:00
source-manager [lldb][NFC] Remove unused imports in python tests 2019-08-02 08:06:22 +00:00
terminal [lldb][NFC] Remove unused imports in python tests 2019-08-02 08:06:22 +00:00
test_runner [lldb][NFC] Remove unused imports in python tests 2019-08-02 08:06:22 +00:00
tools TestAppleSimulatorOSType: Pass the --standalone argument to simctl 2019-08-22 21:44:10 +00:00
types [lldb][NFC] Remove unused imports in python tests 2019-08-02 08:06:22 +00:00
warnings/uuid Update the file headers across all of the LLVM projects in the monorepo 2019-01-19 08:50:56 +00:00
__init__.py
.categories
bench.py [lldb][NFC] Remove unused imports in python tests 2019-08-02 08:06:22 +00:00
concurrent_base.py [lldb][NFC] Remove unused imports in python tests 2019-08-02 08:06:22 +00:00
configuration.py [test] Fix various module cache bugs and inconsistencies 2019-08-29 18:37:05 +00:00
darwin_log.py [lldb][NFC] Remove unused imports in python tests 2019-08-02 08:06:22 +00:00
decorators.py [dotest] Add --dwarf-version to override the tested DWARF version. 2019-08-19 16:04:21 +00:00
dotest_args.py [test] Fix various module cache bugs and inconsistencies 2019-08-29 18:37:05 +00:00
dotest.py [test] Fix various module cache bugs and inconsistencies 2019-08-29 18:37:05 +00:00
lldb_pylint_helper.py Update the file headers across all of the LLVM projects in the monorepo 2019-01-19 08:50:56 +00:00
lldbbench.py
lldbcurses.py [lldb][NFC] Remove unused imports in python tests 2019-08-02 08:06:22 +00:00
lldbdwarf.py Fix whitespace in the python test suite. 2018-07-27 22:20:59 +00:00
lldbinline.py [testsuite] Fix TestUnicodeString to work with Py2 and Py3. 2019-02-20 00:54:07 +00:00
lldbpexpect.py dotest: improvements to the pexpect tests 2019-08-30 09:07:42 +00:00
lldbplatform.py [dotest] Remove dead code 2019-07-26 01:58:18 +00:00
lldbplatformutil.py [dotest] Remove dead code 2019-07-26 01:58:18 +00:00
lldbtest_config.py [dotest] Add the ability to set environment variables for the inferior. 2019-06-26 16:12:08 +00:00
lldbtest.py [test] Fix various module cache bugs and inconsistencies 2019-08-29 18:37:05 +00:00
lldbutil.py [lldb][NFC] Remove unused imports in python tests 2019-08-02 08:06:22 +00:00
lock.py [lldb][NFC] Remove unused imports in python tests 2019-08-02 08:06:22 +00:00
Makefile
README-TestSuite Reflow readme 2018-12-17 21:18:12 +00:00
redo.py
test_categories.py [lldb][NFC] Cleanup mentions and code related to lldb-mi 2019-07-19 15:55:23 +00:00
test_result.py [dotest] Remove -q (quiet) flag. 2019-08-28 16:28:58 +00:00