summaryrefslogtreecommitdiffstats
path: root/lldb/packages/Python/lldbsuite/test/dotest.py
diff options
context:
space:
mode:
authorJonas Devlieghere <jonas@devlieghere.com>2019-08-28 23:54:23 +0000
committerJonas Devlieghere <jonas@devlieghere.com>2019-08-28 23:54:23 +0000
commit5c044972170876544bf578c6a2cf1057dff463f2 (patch)
tree68436c4a2f4b10d2c0d509f92a5180784b7f2cb6 /lldb/packages/Python/lldbsuite/test/dotest.py
parentf6b9126890a7eaffc5493853e839661bf7adefa3 (diff)
downloadbcm5719-llvm-5c044972170876544bf578c6a2cf1057dff463f2.tar.gz
bcm5719-llvm-5c044972170876544bf578c6a2cf1057dff463f2.zip
[dotest] Make dotest.py invocation repeatable
This removes support for reading the LLDB_TEST_ARGUMENTS environment variable and instead requires all arguments to be specified as part of the invocation. This ensures that dotest.py invocations are easily repeatable. Differential revision: https://reviews.llvm.org/D66912 llvm-svn: 370278
Diffstat (limited to 'lldb/packages/Python/lldbsuite/test/dotest.py')
-rw-r--r--lldb/packages/Python/lldbsuite/test/dotest.py14
1 files changed, 7 insertions, 7 deletions
diff --git a/lldb/packages/Python/lldbsuite/test/dotest.py b/lldb/packages/Python/lldbsuite/test/dotest.py
index 9b124b86687..8d301fb9404 100644
--- a/lldb/packages/Python/lldbsuite/test/dotest.py
+++ b/lldb/packages/Python/lldbsuite/test/dotest.py
@@ -48,6 +48,9 @@ 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."""
@@ -228,9 +231,9 @@ def parseOptionsAndInitTestdirs():
try:
parser = dotest_args.create_parser()
- args = dotest_args.parse_args(parser, sys.argv[1:])
+ args = parser.parse_args()
except:
- print(' '.join(sys.argv))
+ print(get_dotest_invocation())
raise
if args.unset_env_varnames:
@@ -255,7 +258,7 @@ def parseOptionsAndInitTestdirs():
# Only print the args if being verbose.
if args.v and not args.q:
- print(sys.argv)
+ print(get_dotest_invocation())
if args.h:
do_help = True
@@ -824,9 +827,6 @@ def lldbLoggings():
'log enable failed (check GDB_REMOTE_LOG env variable)')
-def getMyCommandLine():
- return ' '.join(sys.argv)
-
# ======================================== #
# #
# Execution of the test driver starts here #
@@ -1113,7 +1113,7 @@ 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" % getMyCommandLine())
+ sys.stderr.write("Command invoked: %s\n" % get_dotest_invocation())
#
# Invoke the default TextTestRunner to run the test suite
OpenPOWER on IntegriCloud