[Lldb-commits] [PATCH] D20193: test infra: catch bad decorators and import errors

Zachary Turner via lldb-commits lldb-commits at lists.llvm.org
Fri May 13 11:38:57 PDT 2016


No issues on Windows, looks good over here.

On Wed, May 11, 2016 at 6:03 PM Todd Fiala <todd.fiala at gmail.com> wrote:

> tfiala created this revision.
> tfiala added reviewers: labath, zturner.
> tfiala added subscribers: lldb-commits, zturner.
>
> 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.
>
> http://reviews.llvm.org/D20193
>
> Files:
>   packages/Python/lldbsuite/test/dotest.py
>
> packages/Python/lldbsuite/test/issue_verification/TestInvalidDecorator.py.park
>   packages/Python/lldbsuite/test_event/event_builder.py
>   packages/Python/lldbsuite/test_event/formatter/pickled.py
>
> packages/Python/lldbsuite/test_event/test/resources/invalid_decorator/TestInvalidDecorator.py
>
> packages/Python/lldbsuite/test_event/test/src/TestCatchInvalidDecorator.py
>   packages/Python/lldbsuite/test_event/test/src/event_collector.py
>
>
-------------- next part --------------
An HTML attachment was scrubbed...
URL: <http://lists.llvm.org/pipermail/lldb-commits/attachments/20160513/46b16390/attachment.html>


More information about the lldb-commits mailing list