[lldb/Test] Don't print 'command invoked'
authorJonas Devlieghere <jonas@devlieghere.com>
Wed, 3 Jun 2020 16:31:15 +0000 (09:31 -0700)
committerJonas Devlieghere <jonas@devlieghere.com>
Wed, 3 Jun 2020 16:35:09 +0000 (09:35 -0700)
The different tools constructing dotest invocations (lit and
lldb-dotest) already print the command invocation so there's no need to
print it again in the dotest output.

My motivation for removing it is that it doesn't include the Python
interpreter and every time I accidentally copy it, the command fails
with an `ImportError`.

Differential revision: https://reviews.llvm.org/D81032

lldb/packages/Python/lldbsuite/test/dotest.py

index 80edad8..8668ddb 100644 (file)
@@ -49,9 +49,6 @@ from . import test_result
 from lldbsuite.test_event.event_builder import EventBuilder
 from ..support import seven
 
-def get_dotest_invocation():
-    return ' '.join(sys.argv)
-
 
 def is_exe(fpath):
     """Returns true if fpath is an executable."""
@@ -220,7 +217,6 @@ def parseOptionsAndInitTestdirs():
         parser = dotest_args.create_parser()
         args = parser.parse_args()
     except:
-        print(get_dotest_invocation())
         raise
 
     if args.unset_env_varnames:
@@ -243,10 +239,6 @@ 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.
-    if args.v:
-        print(get_dotest_invocation())
-
     if args.h:
         do_help = True
 
@@ -1081,7 +1073,6 @@ def run_suite():
         "\nSession logs for test failures/errors/unexpected successes"
         " will go into directory '%s'\n" %
         configuration.sdir_name)
-    sys.stderr.write("Command invoked: %s\n" % get_dotest_invocation())
 
     #
     # Invoke the default TextTestRunner to run the test suite