summaryrefslogtreecommitdiffstats
path: root/lldb/packages/Python/lldbsuite/test/dotest.py
diff options
context:
space:
mode:
authorTodd Fiala <todd.fiala@gmail.com>2015-12-02 21:12:17 +0000
committerTodd Fiala <todd.fiala@gmail.com>2015-12-02 21:12:17 +0000
commit194913ffbe955633092a871c5f9a44bd43adb8d3 (patch)
treea812ad1991d3a9ef2b9357cf7b115d7bcfb287d5 /lldb/packages/Python/lldbsuite/test/dotest.py
parent2f713eb4388613c630c71ba80093332280f34098 (diff)
downloadbcm5719-llvm-194913ffbe955633092a871c5f9a44bd43adb8d3.tar.gz
bcm5719-llvm-194913ffbe955633092a871c5f9a44bd43adb8d3.zip
Make --results-file stdout implied if unspecified when using a results formatter.
Also cleans up pylint warnings (stock settings) in the modified function. llvm-svn: 254546
Diffstat (limited to 'lldb/packages/Python/lldbsuite/test/dotest.py')
-rw-r--r--lldb/packages/Python/lldbsuite/test/dotest.py16
1 files changed, 13 insertions, 3 deletions
diff --git a/lldb/packages/Python/lldbsuite/test/dotest.py b/lldb/packages/Python/lldbsuite/test/dotest.py
index 8a09d29eaf5..94fd9793daf 100644
--- a/lldb/packages/Python/lldbsuite/test/dotest.py
+++ b/lldb/packages/Python/lldbsuite/test/dotest.py
@@ -935,7 +935,15 @@ def setupTestResults():
# Connect to the specified localhost port.
results_file_object, cleanup_func = createSocketToLocalPort(
results_port)
- default_formatter_name = "lldbsuite.test.test_results.RawPickledFormatter"
+ default_formatter_name = (
+ "lldbsuite.test.test_results.RawPickledFormatter")
+
+ # If we have a results formatter name specified and we didn't specify
+ # a results file, we should use stdout.
+ if results_formatter_name is not None and results_file_object is None:
+ # Use stdout.
+ results_file_object = sys.stdout
+ cleanup_func = None
if results_file_object:
# We care about the formatter. Choose user-specified or, if
@@ -945,7 +953,8 @@ def setupTestResults():
else:
formatter_name = default_formatter_name
- # Create an instance of the class. First figure out the package/module.
+ # Create an instance of the class.
+ # First figure out the package/module.
components = formatter_name.split(".")
module = importlib.import_module(".".join(components[:-1]))
@@ -963,7 +972,8 @@ def setupTestResults():
command_line_options)
# Create the TestResultsFormatter given the processed options.
- results_formatter_object = clazz(results_file_object, formatter_options)
+ results_formatter_object = clazz(
+ results_file_object, formatter_options)
# Start the results formatter session - we'll only have one
# during a given dotest process invocation.
OpenPOWER on IntegriCloud