summaryrefslogtreecommitdiffstats
path: root/lldb
diff options
context:
space:
mode:
authorJonas Devlieghere <jonas@devlieghere.com>2019-08-28 16:28:58 +0000
committerJonas Devlieghere <jonas@devlieghere.com>2019-08-28 16:28:58 +0000
commitb543c168690faa6261a4e0ae817b6a2f79b9948a (patch)
treea18708bf2245219ca08371106f504ce52b48766c /lldb
parentaf0bd41e064f4608da29e741ad45fc4a6ef3abac (diff)
downloadbcm5719-llvm-b543c168690faa6261a4e0ae817b6a2f79b9948a.tar.gz
bcm5719-llvm-b543c168690faa6261a4e0ae817b6a2f79b9948a.zip
[dotest] Remove -q (quiet) flag.
This patch removes the -q (quiet) flag and changing the default behavior. Currently the flag serves two purposes that are somewhat contradictory, as illustrated by the difference between the argument name (quiet) and the configuration flag (parsable). On the one hand it reduces output, but on the other hand it prints more output, like the result of individual tests. My proposal is to guard the extra output behind the verbose flag and always print the individual test results. Differential revision: https://reviews.llvm.org/D66837 llvm-svn: 370226
Diffstat (limited to 'lldb')
-rw-r--r--lldb/docs/resources/test.rst4
-rw-r--r--lldb/lit/Suite/lit.cfg2
-rw-r--r--lldb/packages/Python/lldbsuite/test/configuration.py4
-rw-r--r--lldb/packages/Python/lldbsuite/test/dotest.py22
-rw-r--r--lldb/packages/Python/lldbsuite/test/dotest_args.py1
-rw-r--r--lldb/packages/Python/lldbsuite/test/test_result.py49
-rwxr-xr-xlldb/utils/lldb-dotest/lldb-dotest.in2
7 files changed, 31 insertions, 53 deletions
diff --git a/lldb/docs/resources/test.rst b/lldb/docs/resources/test.rst
index c996be81fbe..d77941a8b2b 100644
--- a/lldb/docs/resources/test.rst
+++ b/lldb/docs/resources/test.rst
@@ -144,8 +144,6 @@ A quick guide to getting started with PTVS is as follows:
::
- # quiet mode
- -q
--arch=i686
# Path to debug lldb.exe
--executable D:/src/llvmbuild/ninja/bin/lldb.exe
@@ -163,7 +161,7 @@ A quick guide to getting started with PTVS is as follows:
::
- -q --arch=i686 --executable D:/src/llvmbuild/ninja/bin/lldb.exe -s D:/src/llvmbuild/ninja/lldb-test-traces -u CXXFLAGS -u CFLAGS --enable-crash-dialog -C d:\src\llvmbuild\ninja_release\bin\clang.exe -p TestPaths.py D:\src\llvm\tools\lldb\packages\Python\lldbsuite\test --no-multiprocess
+ --arch=i686 --executable D:/src/llvmbuild/ninja/bin/lldb.exe -s D:/src/llvmbuild/ninja/lldb-test-traces -u CXXFLAGS -u CFLAGS --enable-crash-dialog -C d:\src\llvmbuild\ninja_release\bin\clang.exe -p TestPaths.py D:\src\llvm\tools\lldb\packages\Python\lldbsuite\test --no-multiprocess
diff --git a/lldb/lit/Suite/lit.cfg b/lldb/lit/Suite/lit.cfg
index 80117eb6708..490aaefab76 100644
--- a/lldb/lit/Suite/lit.cfg
+++ b/lldb/lit/Suite/lit.cfg
@@ -56,7 +56,7 @@ if 'DYLD_INSERT_LIBRARIES' in os.environ:
.format(platform.system()))
# Build dotest command.
-dotest_cmd = [config.dotest_path, '-q']
+dotest_cmd = [config.dotest_path]
dotest_cmd.extend(config.dotest_args_str.split(';'))
# We don't want to force users passing arguments to lit to use `;` as a
diff --git a/lldb/packages/Python/lldbsuite/test/configuration.py b/lldb/packages/Python/lldbsuite/test/configuration.py
index 5574f71de3f..beb884e09aa 100644
--- a/lldb/packages/Python/lldbsuite/test/configuration.py
+++ b/lldb/packages/Python/lldbsuite/test/configuration.py
@@ -57,10 +57,6 @@ cflags_extras = ''
# The filters (testclass.testmethod) used to admit tests into our test suite.
filters = []
-# Parsable mode silences headers, and any other output this script might generate, and instead
-# prints machine-readable output similar to what clang tests produce.
-parsable = False
-
# The regular expression pattern to match against eligible filenames as
# our test cases.
regexp = None
diff --git a/lldb/packages/Python/lldbsuite/test/dotest.py b/lldb/packages/Python/lldbsuite/test/dotest.py
index 7d7f823f237..d9e5980b3f3 100644
--- a/lldb/packages/Python/lldbsuite/test/dotest.py
+++ b/lldb/packages/Python/lldbsuite/test/dotest.py
@@ -252,7 +252,7 @@ def parseOptionsAndInitTestdirs():
if args.set_inferior_env_vars:
lldbtest_config.inferior_env = ' '.join(args.set_inferior_env_vars)
- # only print the args if being verbose (and parsable is off)
+ # Only print the args if being verbose.
if args.v and not args.q:
print(sys.argv)
@@ -393,9 +393,6 @@ def parseOptionsAndInitTestdirs():
usage(parser)
configuration.regexp = args.p
- if args.q:
- configuration.parsable = True
-
if args.s:
if args.s.startswith('-'):
usage(parser)
@@ -1268,7 +1265,7 @@ def run_suite():
#
checkCompiler()
- if not configuration.parsable:
+ if configuration.verbose:
print("compiler=%s" % configuration.compiler)
# Iterating over all possible architecture and compiler combinations.
@@ -1286,27 +1283,22 @@ def run_suite():
configPostfix = configString.translate(tbl)
# Output the configuration.
- if not configuration.parsable:
+ if configuration.verbose:
sys.stderr.write("\nConfiguration: " + configString + "\n")
# First, write out the number of collected test cases.
- if not configuration.parsable:
+ if configuration.verbose:
sys.stderr.write(configuration.separator + "\n")
sys.stderr.write(
"Collected %d test%s\n\n" %
(configuration.suite.countTestCases(),
configuration.suite.countTestCases() != 1 and "s" or ""))
- if configuration.parsable:
- v = 0
- else:
- v = configuration.verbose
-
# Invoke the test runner.
if configuration.count == 1:
result = unittest2.TextTestRunner(
stream=sys.stderr,
- verbosity=v,
+ verbosity=configuration.verbose,
resultclass=test_result.LLDBTestResult).run(
configuration.suite)
else:
@@ -1318,13 +1310,13 @@ def run_suite():
result = unittest2.TextTestRunner(
stream=sys.stderr,
- verbosity=v,
+ verbosity=configuration.verbose,
resultclass=test_result.LLDBTestResult).run(
configuration.suite)
configuration.failed = not result.wasSuccessful()
- if configuration.sdir_has_content and not configuration.parsable:
+ if configuration.sdir_has_content and configuration.verbose:
sys.stderr.write(
"Session logs for test failures/errors/unexpected successes"
" can be found in directory '%s'\n" %
diff --git a/lldb/packages/Python/lldbsuite/test/dotest_args.py b/lldb/packages/Python/lldbsuite/test/dotest_args.py
index 628aa411991..444f4afdf52 100644
--- a/lldb/packages/Python/lldbsuite/test/dotest_args.py
+++ b/lldb/packages/Python/lldbsuite/test/dotest_args.py
@@ -191,7 +191,6 @@ def create_parser():
# Test-suite behaviour
group = parser.add_argument_group('Runtime behaviour options')
X('-d', 'Suspend the process after launch to wait indefinitely for a debugger to attach')
- X('-q', "Don't print extra output from this script.")
X('-t', 'Turn on tracing of lldb command and other detailed test executions')
group.add_argument(
'-u',
diff --git a/lldb/packages/Python/lldbsuite/test/test_result.py b/lldb/packages/Python/lldbsuite/test/test_result.py
index bd1f939017c..8573b3b6be6 100644
--- a/lldb/packages/Python/lldbsuite/test/test_result.py
+++ b/lldb/packages/Python/lldbsuite/test/test_result.py
@@ -180,10 +180,9 @@ class LLDBTestResult(unittest2.TextTestResult):
return
super(LLDBTestResult, self).addSuccess(test)
- if configuration.parsable:
- self.stream.write(
- "PASS: LLDB (%s) :: %s\n" %
- (self._config_string(test), str(test)))
+ self.stream.write(
+ "PASS: LLDB (%s) :: %s\n" %
+ (self._config_string(test), str(test)))
if self.results_formatter:
self.results_formatter.handle_event(
EventBuilder.event_for_success(test))
@@ -220,10 +219,9 @@ class LLDBTestResult(unittest2.TextTestResult):
method = getattr(test, "markError", None)
if method:
method()
- if configuration.parsable:
- self.stream.write(
- "FAIL: LLDB (%s) :: %s\n" %
- (self._config_string(test), str(test)))
+ self.stream.write(
+ "FAIL: LLDB (%s) :: %s\n" %
+ (self._config_string(test), str(test)))
if self.results_formatter:
# Handle build errors as a separate event type
if self._isBuildError(err):
@@ -238,10 +236,9 @@ class LLDBTestResult(unittest2.TextTestResult):
method = getattr(test, "markCleanupError", None)
if method:
method()
- if configuration.parsable:
- self.stream.write(
- "CLEANUP ERROR: LLDB (%s) :: %s\n" %
- (self._config_string(test), str(test)))
+ self.stream.write(
+ "CLEANUP ERROR: LLDB (%s) :: %s\n" %
+ (self._config_string(test), str(test)))
if self.results_formatter:
self.results_formatter.handle_event(
EventBuilder.event_for_cleanup_error(
@@ -258,10 +255,9 @@ class LLDBTestResult(unittest2.TextTestResult):
method = getattr(test, "markFailure", None)
if method:
method()
- if configuration.parsable:
- self.stream.write(
- "FAIL: LLDB (%s) :: %s\n" %
- (self._config_string(test), str(test)))
+ self.stream.write(
+ "FAIL: LLDB (%s) :: %s\n" %
+ (self._config_string(test), str(test)))
if configuration.useCategories:
test_categories = self.getCategoriesForTest(test)
for category in test_categories:
@@ -280,10 +276,9 @@ class LLDBTestResult(unittest2.TextTestResult):
method = getattr(test, "markExpectedFailure", None)
if method:
method(err, bugnumber)
- if configuration.parsable:
- self.stream.write(
- "XFAIL: LLDB (%s) :: %s\n" %
- (self._config_string(test), str(test)))
+ self.stream.write(
+ "XFAIL: LLDB (%s) :: %s\n" %
+ (self._config_string(test), str(test)))
if self.results_formatter:
self.results_formatter.handle_event(
EventBuilder.event_for_expected_failure(
@@ -295,10 +290,9 @@ class LLDBTestResult(unittest2.TextTestResult):
method = getattr(test, "markSkippedTest", None)
if method:
method()
- if configuration.parsable:
- self.stream.write(
- "UNSUPPORTED: LLDB (%s) :: %s (%s) \n" %
- (self._config_string(test), str(test), reason))
+ self.stream.write(
+ "UNSUPPORTED: LLDB (%s) :: %s (%s) \n" %
+ (self._config_string(test), str(test), reason))
if self.results_formatter:
self.results_formatter.handle_event(
EventBuilder.event_for_skip(test, reason))
@@ -309,10 +303,9 @@ class LLDBTestResult(unittest2.TextTestResult):
method = getattr(test, "markUnexpectedSuccess", None)
if method:
method(bugnumber)
- if configuration.parsable:
- self.stream.write(
- "XPASS: LLDB (%s) :: %s\n" %
- (self._config_string(test), str(test)))
+ self.stream.write(
+ "XPASS: LLDB (%s) :: %s\n" %
+ (self._config_string(test), str(test)))
if self.results_formatter:
self.results_formatter.handle_event(
EventBuilder.event_for_unexpected_success(
diff --git a/lldb/utils/lldb-dotest/lldb-dotest.in b/lldb/utils/lldb-dotest/lldb-dotest.in
index 18a73ae0b1e..5cef370d74f 100755
--- a/lldb/utils/lldb-dotest/lldb-dotest.in
+++ b/lldb/utils/lldb-dotest/lldb-dotest.in
@@ -9,7 +9,7 @@ if __name__ == '__main__':
wrapper_args = sys.argv[1:]
dotest_args = dotest_args_str.split(';')
# Build dotest.py command.
- cmd = [sys.executable, dotest_path, '-q']
+ cmd = [sys.executable, dotest_path]
cmd.extend(dotest_args)
cmd.extend(wrapper_args)
# Invoke dotest.py and return exit code.
OpenPOWER on IntegriCloud