[Lldb-commits] [PATCH] D66908: [dotest] Remove the -# option
Jonas Devlieghere via Phabricator via lldb-commits
lldb-commits at lists.llvm.org
Wed Aug 28 15:11:51 PDT 2019
JDevlieghere created this revision.
JDevlieghere added a reviewer: LLDB.
Herald added a project: LLDB.
Rerunning the test suite is not something that dotest.py should be responsible for. This is another step towards making lit the driver and dotest the test framework.
Repository:
rLLDB LLDB
https://reviews.llvm.org/D66908
Files:
lldb/packages/Python/lldbsuite/test/configuration.py
lldb/packages/Python/lldbsuite/test/dotest.py
lldb/packages/Python/lldbsuite/test/dotest_args.py
lldb/packages/Python/lldbsuite/test/test_result.py
Index: lldb/packages/Python/lldbsuite/test/test_result.py
===================================================================
--- lldb/packages/Python/lldbsuite/test/test_result.py
+++ lldb/packages/Python/lldbsuite/test/test_result.py
@@ -33,7 +33,6 @@
to a log file for easier human inspection of test failures/errors.
"""
__singleton__ = None
- __ignore_singleton__ = False
@staticmethod
def getTerminalSize():
@@ -63,8 +62,6 @@
return int(cr[1]), int(cr[0])
def __init__(self, *args):
- if not LLDBTestResult.__ignore_singleton__ and LLDBTestResult.__singleton__:
- raise Exception("LLDBTestResult instantiated more than once")
super(LLDBTestResult, self).__init__(*args)
LLDBTestResult.__singleton__ = self
# Now put this singleton into the lldb module namespace.
Index: lldb/packages/Python/lldbsuite/test/dotest_args.py
===================================================================
--- lldb/packages/Python/lldbsuite/test/dotest_args.py
+++ lldb/packages/Python/lldbsuite/test/dotest_args.py
@@ -145,12 +145,6 @@
type=int,
metavar='count',
help="Specify the iteration count used to collect our benchmarks. An example is the number of times to do 'thread step-over' to measure stepping speed.")
- group.add_argument(
- '-#',
- type=int,
- metavar='sharp',
- dest='sharp',
- help='Repeat the test suite for a specified number of times')
group.add_argument('--channel', metavar='channel', dest='channels', action='append', help=textwrap.dedent(
"Specify the log channels (and optional categories) e.g. 'lldb all' or 'gdb-remote packets' if no categories are specified, 'default' is used"))
group.add_argument(
Index: lldb/packages/Python/lldbsuite/test/dotest.py
===================================================================
--- lldb/packages/Python/lldbsuite/test/dotest.py
+++ lldb/packages/Python/lldbsuite/test/dotest.py
@@ -401,10 +401,6 @@
if args.v:
configuration.verbose = 2
- # argparse makes sure we have a number
- if args.sharp:
- configuration.count = args.sharp
-
if sys.platform.startswith('win32'):
os.environ['LLDB_DISABLE_CRASH_DIALOG'] = str(
args.disable_crash_dialog)
@@ -1142,24 +1138,11 @@
configuration.suite.countTestCases() != 1 and "s" or ""))
# Invoke the test runner.
- if configuration.count == 1:
- result = unittest2.TextTestRunner(
- stream=sys.stderr,
- verbosity=configuration.verbose,
- resultclass=test_result.LLDBTestResult).run(
- configuration.suite)
- else:
- # We are invoking the same test suite more than once. In this case,
- # mark __ignore_singleton__ flag as True so the signleton pattern is
- # not enforced.
- test_result.LLDBTestResult.__ignore_singleton__ = True
- for i in range(configuration.count):
-
- result = unittest2.TextTestRunner(
- stream=sys.stderr,
- verbosity=configuration.verbose,
- resultclass=test_result.LLDBTestResult).run(
- configuration.suite)
+ result = unittest2.TextTestRunner(
+ stream=sys.stderr,
+ verbosity=configuration.verbose,
+ resultclass=test_result.LLDBTestResult).run(
+ configuration.suite)
configuration.failed = not result.wasSuccessful()
Index: lldb/packages/Python/lldbsuite/test/configuration.py
===================================================================
--- lldb/packages/Python/lldbsuite/test/configuration.py
+++ lldb/packages/Python/lldbsuite/test/configuration.py
@@ -36,9 +36,6 @@
# The path to LLDB.framework is optional.
lldbFrameworkPath = None
-# Test suite repeat count. Can be overwritten with '-# count'.
-count = 1
-
# The 'arch' and 'compiler' can be specified via command line.
arch = None # Must be initialized after option parsing
compiler = None # Must be initialized after option parsing
-------------- next part --------------
A non-text attachment was scrubbed...
Name: D66908.217728.patch
Type: text/x-patch
Size: 4103 bytes
Desc: not available
URL: <http://lists.llvm.org/pipermail/lldb-commits/attachments/20190828/64056298/attachment.bin>
More information about the lldb-commits
mailing list