llvm-project/lldb/packages/Python/lldbsuite/test/issue_verification
Todd Fiala 7c5f7caa20 test infra: catch bad decorators and import-time errors
Summary:
This change enhances the LLDB test infrastructure to convert
load-time exceptions in a given Python test module into errors.
Before this change, specifying a non-existent test decorator,
or otherwise having some load-time error in a python test module,
would not get flagged as an error.

With this change, typos and other load-time errors in a python
test file get converted to errors and reported by the
test runner.

This change also includes test infrastructure tests that include
covering the new work here.  I'm going to wait until we have
these infrastructure tests runnable on the main platforms before
I try to work that into all the normal testing workflows.

The test infrastructure tests can be run by using the standard python module testing practice of doing the following:

cd packages/Python/lldbsuite/test_event
python -m unittest discover -s test/src -p 'Test*.py'

Those tests run the dotest inferior with a known broken test and verify that the errors are caught.  These tests did not pass until I modified dotest.py to capture them properly.

@zturner, if you have the chance, if you could try those steps above (the python -m unittest ... line) on Windows, that would be great if we can address any python2/3/Windows bits there.  I don't think there's anything fancy, but I didn't want to hook it into test flow until I know it works there.

I'll be slowly adding more tests that cover some of the other breakage I've occasionally seen that didn't get collected as part of the summarization.  This is the biggest one I'm aware of.

Reviewers: zturner, labath

Subscribers: zturner, lldb-commits

Differential Revision: http://reviews.llvm.org/D20193

llvm-svn: 269489
2016-05-13 21:36:26 +00:00
..
Makefile test infra: fix lldbinline tests to work with rerun 2015-12-22 17:14:47 +00:00
README.txt
TestExpectedTimeout.py.park [test] Add ability to expect timeouts 2015-12-16 12:09:45 +00:00
TestFail.py.park
TestInvalidDecorator.py.park test infra: catch bad decorators and import-time errors 2016-05-13 21:36:26 +00:00
TestRerunFail.py.park test infra: enable single-worker rerun phase for flakey tests. 2015-12-14 21:28:46 +00:00
TestRerunInline.py.park test infra: fix lldbinline tests to work with rerun 2015-12-22 17:14:47 +00:00
TestRerunTimeout.py.park fix a race is the LLDB test suite results collection 2016-04-18 16:09:21 +00:00
TestSignal.py.park
TestSignalOutsideTestMethod.py.park test infra: adds book-keeping for rerunnable tests 2015-12-12 19:26:56 +00:00
TestTimeout.py.park
disable.py enable timeout/exceptional exit support for xUnit formatter 2015-12-09 22:02:31 +00:00
enable.py enable timeout/exceptional exit support for xUnit formatter 2015-12-09 22:02:31 +00:00
inline_rerun_inferior.cpp test infra: fix lldbinline tests to work with rerun 2015-12-22 17:14:47 +00:00
rerun_base.py test infra: enable single-worker rerun phase for flakey tests. 2015-12-14 21:28:46 +00:00

README.txt

Tests in this directory are intentionally setup to
fail, error, timeout, etc. to verify that the buildbots
pick up errors.  The tests in this directory will be
parked/removed/renamed after verifying they trigger
as expected.