Skip to content
This repository was archived by the owner on May 21, 2019. It is now read-only.
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.

Commit c02a47f

Browse files
author
Zachary Turner
committedDec 7, 2015
Rename test_results.py to result_formatter.py.
There is already a class called LLDBTestResults which I would like to move into a separate file, but the most appropriate filename was taken. git-svn-id: https://llvm.org/svn/llvm-project/lldb/trunk@254946 91177308-0d34-0410-b5e6-96231b3b80d8
1 parent 5262074 commit c02a47f

File tree

5 files changed

+20
-19
lines changed

5 files changed

+20
-19
lines changed
 

‎packages/Python/lldbsuite/test/basic_results_formatter.py

Lines changed: 9 additions & 8 deletions
Original file line numberDiff line numberDiff line change
@@ -13,10 +13,11 @@
1313
import os
1414

1515
# Our imports
16-
from . import test_results
16+
from . import result_formatter
1717
import lldbsuite
1818

19-
class BasicResultsFormatter(test_results.ResultsFormatter):
19+
20+
class BasicResultsFormatter(result_formatter.ResultsFormatter):
2021
"""Provides basic test result output."""
2122
@classmethod
2223
def arg_parser(cls):
@@ -240,16 +241,16 @@ def _finish_output_no_lock(self):
240241
# Output each of the test result entries.
241242
categories = [
242243
# result id, printed name, print matching tests?, detail label
243-
[test_results.EventBuilder.STATUS_SUCCESS,
244+
[result_formatter.EventBuilder.STATUS_SUCCESS,
244245
"Success", False, None],
245-
[test_results.EventBuilder.STATUS_EXPECTED_FAILURE,
246+
[result_formatter.EventBuilder.STATUS_EXPECTED_FAILURE,
246247
"Expected Failure", False, None],
247-
[test_results.EventBuilder.STATUS_FAILURE,
248+
[result_formatter.EventBuilder.STATUS_FAILURE,
248249
"Failure", True, "FAIL"],
249-
[test_results.EventBuilder.STATUS_ERROR, "Error", True, "ERROR"],
250-
[test_results.EventBuilder.STATUS_UNEXPECTED_SUCCESS,
250+
[result_formatter.EventBuilder.STATUS_ERROR, "Error", True, "ERROR"],
251+
[result_formatter.EventBuilder.STATUS_UNEXPECTED_SUCCESS,
251252
"Unexpected Success", True, "UNEXPECTED SUCCESS"],
252-
[test_results.EventBuilder.STATUS_SKIP, "Skip", False, None]]
253+
[result_formatter.EventBuilder.STATUS_SKIP, "Skip", False, None]]
253254

254255
# Partition all the events by test result status
255256
result_events_by_status = self._partition_results_by_status(

‎packages/Python/lldbsuite/test/curses_results.py

Lines changed: 3 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -23,11 +23,11 @@
2323

2424
# LLDB modules
2525
from . import lldbcurses
26-
from . import test_results
27-
from .test_results import EventBuilder
26+
from . import result_formatter
27+
from .result_formatter import EventBuilder
2828

2929

30-
class Curses(test_results.ResultsFormatter):
30+
class Curses(result_formatter.ResultsFormatter):
3131
"""Receives live results from tests that are running and reports them to the terminal in a curses GUI"""
3232

3333
def __init__(self, out_file, options):

‎packages/Python/lldbsuite/test/dosep.py

Lines changed: 3 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -53,7 +53,7 @@
5353

5454
from . import dotest_channels
5555
from . import dotest_args
56-
from . import test_results
56+
from . import result_formatter
5757

5858
# Todo: Convert this folder layout to be relative-import friendly and don't hack up
5959
# sys.path like this
@@ -1429,9 +1429,9 @@ def main(print_details_on_success, num_threads, test_subdir,
14291429
# Figure out exit code by count of test result types.
14301430
issue_count = (
14311431
results_formatter.counts_by_test_result_status(
1432-
test_results.EventBuilder.STATUS_ERROR) +
1432+
result_formatter.EventBuilder.STATUS_ERROR) +
14331433
results_formatter.counts_by_test_result_status(
1434-
test_results.EventBuilder.STATUS_FAILURE) +
1434+
result_formatter.EventBuilder.STATUS_FAILURE) +
14351435
timeout_count)
14361436
# Return with appropriate result code
14371437
if issue_count > 0:

‎packages/Python/lldbsuite/test/dotest.py

Lines changed: 5 additions & 5 deletions
Original file line numberDiff line numberDiff line change
@@ -43,8 +43,8 @@
4343
from . import dotest_args
4444
from . import lldbtest_config
4545
from . import test_categories
46-
from . import test_results
47-
from .test_results import EventBuilder
46+
from . import result_formatter
47+
from .result_formatter import EventBuilder
4848
from ..support import seven
4949

5050
def is_exe(fpath):
@@ -795,7 +795,7 @@ def parseOptionsAndInitTestdirs():
795795
# Tell the event builder to create all events with these
796796
# key/val pairs in them.
797797
if len(entries) > 0:
798-
test_results.EventBuilder.add_entries_to_all_events(entries)
798+
result_formatter.EventBuilder.add_entries_to_all_events(entries)
799799

800800
# Gather all the dirs passed on the command line.
801801
if len(args.args) > 0:
@@ -930,13 +930,13 @@ def setupTestResults():
930930
else:
931931
results_file_object = open(results_filename, "w")
932932
cleanup_func = results_file_object.close
933-
default_formatter_name = "lldbsuite.test.test_results.XunitFormatter"
933+
default_formatter_name = "lldbsuite.test.result_formatter.XunitFormatter"
934934
elif results_port:
935935
# Connect to the specified localhost port.
936936
results_file_object, cleanup_func = createSocketToLocalPort(
937937
results_port)
938938
default_formatter_name = (
939-
"lldbsuite.test.test_results.RawPickledFormatter")
939+
"lldbsuite.test.result_formatter.RawPickledFormatter")
940940

941941
# If we have a results formatter name specified and we didn't specify
942942
# a results file, we should use stdout.

0 commit comments

Comments
 (0)