[Lldb-commits] [lldb] r252498 - Add --curses shortcut for specifying the curses-based test results formatter.
Todd Fiala via lldb-commits
lldb-commits at lists.llvm.org
Mon Nov 9 10:51:04 PST 2015
Author: tfiala
Date: Mon Nov 9 12:51:04 2015
New Revision: 252498
URL: http://llvm.org/viewvc/llvm-project?rev=252498&view=rev
Log:
Add --curses shortcut for specifying the curses-based test results formatter.
This commit closes the following review:
http://reviews.llvm.org/D14488
Modified:
lldb/trunk/packages/Python/lldbsuite/test/dosep.py
lldb/trunk/packages/Python/lldbsuite/test/dotest.py
lldb/trunk/packages/Python/lldbsuite/test/dotest_args.py
Modified: lldb/trunk/packages/Python/lldbsuite/test/dosep.py
URL: http://llvm.org/viewvc/llvm-project/lldb/trunk/packages/Python/lldbsuite/test/dosep.py?rev=252498&r1=252497&r2=252498&view=diff
==============================================================================
--- lldb/trunk/packages/Python/lldbsuite/test/dosep.py (original)
+++ lldb/trunk/packages/Python/lldbsuite/test/dosep.py Mon Nov 9 12:51:04 2015
@@ -1227,6 +1227,10 @@ def adjust_inferior_options(dotest_argv)
_remove_option(dotest_argv, "--results-formatter-option", "-O",
True)
+ # Remove the --curses shortcut if specified.
+ if dotest_options.curses:
+ _remove_option(dotest_argv, "--curses", None, False)
+
# Remove test runner name if present.
if dotest_options.test_runner_name is not None:
_remove_option(dotest_argv, "--test-runner-name", None, True)
Modified: lldb/trunk/packages/Python/lldbsuite/test/dotest.py
URL: http://llvm.org/viewvc/llvm-project/lldb/trunk/packages/Python/lldbsuite/test/dotest.py?rev=252498&r1=252497&r2=252498&view=diff
==============================================================================
--- lldb/trunk/packages/Python/lldbsuite/test/dotest.py (original)
+++ lldb/trunk/packages/Python/lldbsuite/test/dotest.py Mon Nov 9 12:51:04 2015
@@ -22,7 +22,6 @@ from __future__ import absolute_import
from __future__ import print_function
# System modules
-import sys
import atexit
import importlib
import os
@@ -751,6 +750,11 @@ def parseOptionsAndInitTestdirs():
test_runner_name = args.test_runner_name
# Capture test results-related args.
+ if args.curses and not args.inferior:
+ # Act as if the following args were set.
+ args.results_formatter = "lldbsuite.test.curses_results.Curses"
+ args.results_file = "stdout"
+
if args.results_file:
results_filename = args.results_file
Modified: lldb/trunk/packages/Python/lldbsuite/test/dotest_args.py
URL: http://llvm.org/viewvc/llvm-project/lldb/trunk/packages/Python/lldbsuite/test/dotest_args.py?rev=252498&r1=252497&r2=252498&view=diff
==============================================================================
--- lldb/trunk/packages/Python/lldbsuite/test/dotest_args.py (original)
+++ lldb/trunk/packages/Python/lldbsuite/test/dotest_args.py Mon Nov 9 12:51:04 2015
@@ -151,6 +151,10 @@ def create_parser():
# Test results support.
group = parser.add_argument_group('Test results options')
group.add_argument(
+ '--curses',
+ action='store_true',
+ help='Shortcut for specifying test results using the curses formatter')
+ group.add_argument(
'--results-file',
action='store',
help=('Specifies the file where test results will be written '
More information about the lldb-commits
mailing list