Commit Graph

8 Commits

Author SHA1 Message Date
Tim Hammerquist e4885f8999 fix xunit attribute parsing
llvm-svn: 297538
2017-03-11 00:58:41 +00:00
Sean Callanan 62a6b8b2bf Updated the results formatter to eliminate redundant data.
The testsuite's results formatter maintains a result_status_counts
structure solely for the purpose of setting the return status code
after the testsuite has run.  This data is redundant with the
result_events structure that contains the results of individual
tests.

There are subtle bugs arising from this redundancy that make some
builds report no errors but a nonzero status.  Rather than try to
make sure these two are always in agreement, I've just rewritten
the code that used to use the counts to now use the per-test
results.

<rdar://problem/30496966>

llvm-svn: 295522
2017-02-18 01:07:51 +00:00
Todd Fiala 8cc2bddb32 test infra: clear file-charged issues on rerun of file
This change addresses the corner case bug in the test
infrastructure where a test file times out *outside*
of any running test method.  In those cases, the issue
was charged to the file, not to a test method within
the file.  When that file is re-run successfully,
none of the test-method-level successes would clear
the file-level issue.

This change fixes that: for all test files that are
getting rerun (whether by being marked flaky or
via the --rerun-all-issues flag), file-level test
issues are searched for in each of those files.  Each
file-level issue found in the rerun file list then
gets cleared.

A test of this feature is added to issue_verification,
using the technique there of moving the *.py.park file
to *.py to do an end-to-end validation.

This change also adds a .gitignore entry for pyenv
project-level files and fixes up a few minor pep8
formatting violations in files I touched.

Fixes:
llvm.org/pr27423

llvm-svn: 282990
2016-10-01 00:17:08 +00:00
Kate Stone b9c1b51e45 *** This commit represents a complete reformatting of the LLDB source code
*** to conform to clang-format’s LLVM style.  This kind of mass change has
*** two obvious implications:

Firstly, merging this particular commit into a downstream fork may be a huge
effort.  Alternatively, it may be worth merging all changes up to this commit,
performing the same reformatting operation locally, and then discarding the
merge for this particular commit.  The commands used to accomplish this
reformatting were as follows (with current working directory as the root of
the repository):

    find . \( -iname "*.c" -or -iname "*.cpp" -or -iname "*.h" -or -iname "*.mm" \) -exec clang-format -i {} +
    find . -iname "*.py" -exec autopep8 --in-place --aggressive --aggressive {} + ;

The version of clang-format used was 3.9.0, and autopep8 was 1.2.4.

Secondly, “blame” style tools will generally point to this commit instead of
a meaningful prior commit.  There are alternatives available that will attempt
to look through this change and find the appropriate prior commit.  YMMV.

llvm-svn: 280751
2016-09-06 20:57:50 +00:00
Todd Fiala 4728cf7e85 surface build error content through test event system
Summary:
print build errors nicely in test output

This test infrastructure change adds a new Python exception
for test subject builds that fail.  The output of the build
command is captured and propagated to both the textual test
output display code and to the test event system.

The ResultsFormatter objects have been modified to do something
more useful with this information.  The xUnit formatter
now replaces the non-informative Python build error stacktrace
with the build error content.  The curses ResultsFormatter
prints a 'B' for build errors rather than 'E'.

The xUnit output, in particular, makes it much easier for
developers to track down test subject build errors that cause
test failures when reports come in from CI.

Reviewers: granata.enrico

Subscribers: llvm-commits

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

llvm-svn: 269525
2016-05-14 00:42:30 +00:00
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
Adrian McCarthy d285007720 Fix send and receive of ACK byte in test infrastructure for Python 3.5
Python 3.5 is pickier about the distinction between chars and bytes (and strings and bytearrays) than Python 2.7.

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

llvm-svn: 267562
2016-04-26 15:15:29 +00:00
Todd Fiala 49d3c15c3e test infra: move test event-related handling into its own package
This change moves all the test event handling and its related
ResultsFormatter classes out of the packages/Python/lldbsuite/test dir
into a packages/Python/lldbsuite/test_event package. Formatters are
moved into a sub-package under that.

I am limiting the scope of this change to just the motion and a few
minor issues caught by a static Python checker (e.g. removing unused
import statements).

This is a pre-step for adding package-level tests to the test event
system. I also intend to simplify test event results formatter selection
after I make sure this doesn't break anybody.

See:
http://reviews.llvm.org/D19288

Reviewed by:
Pavel Labath

llvm-svn: 266885
2016-04-20 16:27:27 +00:00