diff options
author | Todd Fiala <todd.fiala@gmail.com> | 2015-11-09 18:51:04 +0000 |
---|---|---|
committer | Todd Fiala <todd.fiala@gmail.com> | 2015-11-09 18:51:04 +0000 |
commit | cee6a6a63b56c9317dd73edefa93ea35037fa2f6 (patch) | |
tree | 0a3487ae8219628534b0527e07ea9ac1c5e82ac5 /lldb/packages/Python/lldbsuite/test | |
parent | 18b2258c92df93c83bc7fce94c20baff3c06e2c6 (diff) | |
download | bcm5719-llvm-cee6a6a63b56c9317dd73edefa93ea35037fa2f6.tar.gz bcm5719-llvm-cee6a6a63b56c9317dd73edefa93ea35037fa2f6.zip |
Add --curses shortcut for specifying the curses-based test results formatter.
This commit closes the following review:
http://reviews.llvm.org/D14488
llvm-svn: 252498
Diffstat (limited to 'lldb/packages/Python/lldbsuite/test')
-rw-r--r-- | lldb/packages/Python/lldbsuite/test/dosep.py | 4 | ||||
-rw-r--r-- | lldb/packages/Python/lldbsuite/test/dotest.py | 6 | ||||
-rw-r--r-- | lldb/packages/Python/lldbsuite/test/dotest_args.py | 4 |
3 files changed, 13 insertions, 1 deletions
diff --git a/lldb/packages/Python/lldbsuite/test/dosep.py b/lldb/packages/Python/lldbsuite/test/dosep.py index 5bc966d67fd..f3fd3ea6ccb 100644 --- a/lldb/packages/Python/lldbsuite/test/dosep.py +++ b/lldb/packages/Python/lldbsuite/test/dosep.py @@ -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) diff --git a/lldb/packages/Python/lldbsuite/test/dotest.py b/lldb/packages/Python/lldbsuite/test/dotest.py index 572bbba75b1..8a09d29eaf5 100644 --- a/lldb/packages/Python/lldbsuite/test/dotest.py +++ b/lldb/packages/Python/lldbsuite/test/dotest.py @@ -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 diff --git a/lldb/packages/Python/lldbsuite/test/dotest_args.py b/lldb/packages/Python/lldbsuite/test/dotest_args.py index ecdda52a913..e34eea3e63c 100644 --- a/lldb/packages/Python/lldbsuite/test/dotest_args.py +++ b/lldb/packages/Python/lldbsuite/test/dotest_args.py @@ -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 ' |