llvm-project/lldb/packages/Python/lldbsuite/test
Sean Callanan 579e70c9b0 Add a DiagnosticManager replace error streams in the expression parser.
We want to do a better job presenting errors that occur when evaluating
expressions. Key to this effort is getting away from a model where all
errors are spat out onto a stream where the client has to take or leave
all of them.

To this end, this patch adds a new class, DiagnosticManager, which
contains errors produced by the compiler or by LLDB as an expression
is created. The DiagnosticManager can dump itself to a log as well as
to a string. Clients will (in the future) be able to filter out the
errors they're interested in by ID or present subsets of these errors
to the user.

This patch is not intended to change the *users* of errors - only to
thread DiagnosticManagers to all the places where streams are used. I
also attempt to standardize our use of errors a bit, removing trailing
newlines and making clients omit 'error:', 'warning:' etc. and instead
pass the Severity flag.

The patch is testsuite-neutral, with modifications to one part of the
MI tests because it relied on "error: error:" being erroneously
printed. This patch fixes the MI variable handling and the testcase.

<rdar://problem/22864976>

llvm-svn: 263859
2016-03-19 00:03:59 +00:00
..
android/platform Move the rest of the tests over to using the new decorator module. 2016-02-04 23:04:17 +00:00
api Change over the broadcaster/listener process to hold shared or weak pointers 2016-03-07 21:50:25 +00:00
arm_emulation Move the rest of the tests over to using the new decorator module. 2016-02-04 23:04:17 +00:00
attic Move lldb/test to lldb/packages/Python/lldbsuite/test. 2015-10-28 17:43:26 +00:00
benchmarks Remove expectedFailureWindows decorator. 2016-02-08 19:34:59 +00:00
driver/batch_mode Remove expectedFailureWindows decorator. 2016-02-08 19:34:59 +00:00
example Move lldb/test to lldb/packages/Python/lldbsuite/test. 2015-10-28 17:43:26 +00:00
expression_command Add regression test for expressions calling functions taking anonymous struct typedef arguments 2016-03-15 13:02:11 +00:00
functionalities Add a DiagnosticManager replace error streams in the expression parser. 2016-03-19 00:03:59 +00:00
help Add some test coverage for the changes in alias help 2016-03-15 01:43:00 +00:00
issue_verification test infra: fix lldbinline tests to work with rerun 2015-12-22 17:14:47 +00:00
lang Switch from unittest2.expectedFailure to our own decorator on TestSTL 2016-03-16 10:39:33 +00:00
linux Move the rest of the tests over to using the new decorator module. 2016-02-04 23:04:17 +00:00
logging Move the rest of the tests over to using the new decorator module. 2016-02-04 23:04:17 +00:00
macosx Make sure code that is in the middle of figuring out the correct architecture 2016-02-18 23:58:45 +00:00
make Remove CRLF line endings from test_common.h 2016-01-11 10:27:31 +00:00
plugins Adjust for Python-3. 2016-02-12 20:30:47 +00:00
python_api Extend XFlaky in TestProcessIO to linux as well 2016-03-14 11:19:39 +00:00
settings Remove the skipUnlessArch decorator. 2016-02-09 00:36:22 +00:00
source-manager Add reverse file remapping for breakpoint set 2016-03-04 11:26:44 +00:00
terminal Remove expected failure and skip decorators for host os. 2016-02-09 21:36:02 +00:00
test_runner wire timeouts and exceptional inferior process exits through the test event system 2015-12-09 06:45:43 +00:00
tools Add a DiagnosticManager replace error streams in the expression parser. 2016-03-19 00:03:59 +00:00
types Move the rest of the tests over to using the new decorator module. 2016-02-04 23:04:17 +00:00
warnings/uuid Move the rest of the tests over to using the new decorator module. 2016-02-04 23:04:17 +00:00
.categories Move lldb/test to lldb/packages/Python/lldbsuite/test. 2015-10-28 17:43:26 +00:00
Makefile Move lldb/test to lldb/packages/Python/lldbsuite/test. 2015-10-28 17:43:26 +00:00
README-TestSuite Centralize the handling of attach permissions on linux in tests 2016-01-11 10:24:50 +00:00
__init__.py Get rid of global variables in dotest.py 2015-12-08 01:15:30 +00:00
bench-history Move lldb/test to lldb/packages/Python/lldbsuite/test. 2015-10-28 17:43:26 +00:00
bench.py Python 3 - Turn on absolute imports, and fix existing imports. 2015-11-05 19:22:28 +00:00
configuration.py test infra: enable single-worker rerun phase for flakey tests. 2015-12-14 21:28:46 +00:00
crashinfo.c Move lldb/test to lldb/packages/Python/lldbsuite/test. 2015-10-28 17:43:26 +00:00
curses_results.py Rename test_results.py to result_formatter.py. 2015-12-07 21:23:41 +00:00
decorators.py Remove expectedFailureFreeBSD decorator 2016-02-19 19:25:03 +00:00
dosep.py fixed test suite crash when --platform-name doesn't start with 'remote-' 2016-01-22 20:20:48 +00:00
dotest.py Eliminate the TestStarted-XXX and TestFinished-XXX files from check-lldb runs. 2016-03-10 15:41:11 +00:00
dotest_args.py test infra: enable single-worker rerun phase for flakey tests. 2015-12-14 21:28:46 +00:00
dotest_channels.py Propagate socket_error exception from handle_read. Otherwise Ninja crashes. 2015-12-15 23:51:27 +00:00
lldb_pylint_helper.py Updated lldb_pylint_helper to work with recent Python package changes. 2015-11-10 20:01:33 +00:00
lldbbench.py Python 3 - Turn on absolute imports, and fix existing imports. 2015-11-05 19:22:28 +00:00
lldbcurses.py Python 3 - Turn on absolute imports, and fix existing imports. 2015-11-05 19:22:28 +00:00
lldbinline.py Move the rest of the tests over to using the new decorator module. 2016-02-04 23:04:17 +00:00
lldbpexpect.py Don't automtically try to import pexpect in lldbpexpect. 2016-01-27 18:49:25 +00:00
lldbplatform.py Add target and host platform enumerations so we're not using strings. 2016-02-18 18:50:02 +00:00
lldbplatformutil.py Add target and host platform enumerations so we're not using strings. 2016-02-18 18:50:02 +00:00
lldbtest.py Made self.expect() errors a little more readable in the testsuite. 2016-03-08 18:58:48 +00:00
lldbtest_config.py Move lldb/test to lldb/packages/Python/lldbsuite/test. 2015-10-28 17:43:26 +00:00
lldbutil.py Fix some issues with bytes and strings in Python 3. 2016-01-25 23:21:18 +00:00
lock.py Move lldb/test to lldb/packages/Python/lldbsuite/test. 2015-10-28 17:43:26 +00:00
redo.py Move lldb/test to lldb/packages/Python/lldbsuite/test. 2015-10-28 17:43:26 +00:00
result_formatter.py test infra: fix lldbinline tests to work with rerun 2015-12-22 17:14:47 +00:00
test_categories.py Don't run dwo tests for windows targets. 2016-01-11 18:49:30 +00:00
test_result.py Make test categories composable 2015-12-14 13:17:18 +00:00
xunit_formatter.py test infra: support test reruns in xunit formatter. 2015-12-15 23:25:56 +00:00