-
Notifications
You must be signed in to change notification settings - Fork 15.2k
[lit] Add --report-failures-only option for lit test reports #115439
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
Changes from 1 commit
17f4900
4140e14
edc0935
1ebd26c
5d16c98
e09e4f1
784e24e
0c7747f
f18430a
6793a94
82a70bf
c58f133
File filter
Filter by extension
Conversations
Jump to
Diff view
Diff view
There are no files selected for viewing
| Original file line number | Diff line number | Diff line change |
|---|---|---|
|
|
@@ -22,6 +22,8 @@ def __init__(self, output_file): | |
| self.output_file = output_file | ||
| # Set by the option parser later. | ||
| self.use_unique_output_file_name = False | ||
| self.skipped_codes = {lit.Test.EXCLUDED, | ||
| lit.Test.SKIPPED, lit.Test.UNSUPPORTED} | ||
|
||
|
|
||
| def write_results(self, tests, elapsed): | ||
| if self.use_unique_output_file_name: | ||
|
|
@@ -114,8 +116,6 @@ def remove_invalid_xml_chars(s): | |
|
|
||
|
|
||
| class XunitReport(Report): | ||
| skipped_codes = {lit.Test.EXCLUDED, lit.Test.SKIPPED, lit.Test.UNSUPPORTED} | ||
|
|
||
| def _write_results_to_file(self, tests, elapsed, file): | ||
| tests.sort(key=by_suite_and_test_path) | ||
| tests_by_suite = itertools.groupby(tests, lambda t: t.suite) | ||
|
|
@@ -273,8 +273,6 @@ def _write_results_to_file(self, tests, elapsed, file): | |
|
|
||
|
|
||
| class TimeTraceReport(Report): | ||
| skipped_codes = {lit.Test.EXCLUDED, lit.Test.SKIPPED, lit.Test.UNSUPPORTED} | ||
|
|
||
| def _write_results_to_file(self, tests, elapsed, file): | ||
| # Find when first test started so we can make start times relative. | ||
| first_start_time = min([t.result.start for t in tests]) | ||
|
|
||
| Original file line number | Diff line number | Diff line change |
|---|---|---|
| @@ -0,0 +1,17 @@ | ||
| # UNSUPPORTED: system-windows | ||
|
|
||
| # Check xunit output | ||
rpatel321 marked this conversation as resolved.
Outdated
Show resolved
Hide resolved
|
||
| # RUN: rm -rf %t.xunit.xml | ||
| # RUN: not %{lit} --report-failures-only --xunit-xml-output %t.xunit.xml %{inputs}/xunit-output | ||
| # If xmllint is installed verify that the generated xml is well-formed | ||
| # RUN: sh -c 'if command -v xmllint 2>/dev/null; then xmllint --noout %t.xunit.xml; fi' | ||
|
||
| # RUN: FileCheck < %t.xunit.xml %s | ||
|
||
|
|
||
| # CHECK: <?xml version="1.0" encoding="UTF-8"?> | ||
| # CHECK-NEXT: <testsuites time="{{[0-9.]+}}"> | ||
| # CHECK-NEXT: <testsuite name="test-data" tests="5" failures="1" skipped="3" time="{{[0-9.]+}}"> | ||
| # CHECK-NEXT: <testcase classname="test-data.test-data" name="bad&name.ini" time="{{[0-1]\.[0-9]+}}"> | ||
| # CHECK-NEXT: <failure><![CDATA[& < > ]]]]><![CDATA[> &"]]></failure> | ||
| # CHECK-NEXT: </testcase> | ||
| # CHECK-NEXT: </testsuite> | ||
| # CHECK-NEXT: </testsuites> | ||
Uh oh!
There was an error while loading. Please reload this page.