[Lldb-commits] [lldb] r184615 - Test suite support for setting arguments through the environment
Enrico Granata
egranata at apple.com
Fri Jun 21 17:15:25 PDT 2013
Author: enrico
Date: Fri Jun 21 19:15:25 2013
New Revision: 184615
URL: http://llvm.org/viewvc/llvm-project?rev=184615&view=rev
Log:
Test suite support for setting arguments through the environment
Set your env variable LLDB_TEST_ARGUMENTS to one or more options to be passed to the lldb test suite and those will be picked automatically
No more fighting about whether the progress bar is good or bad :-)
Modified:
lldb/trunk/test/dotest.py
Modified: lldb/trunk/test/dotest.py
URL: http://llvm.org/viewvc/llvm-project/lldb/trunk/test/dotest.py?rev=184615&r1=184614&r2=184615&view=diff
==============================================================================
--- lldb/trunk/test/dotest.py (original)
+++ lldb/trunk/test/dotest.py Fri Jun 21 19:15:25 2013
@@ -328,6 +328,9 @@ def unique_string_match(yourentry,list):
candidate = item
return candidate
+class ArgParseNamespace(object):
+ pass
+
def parseOptionsAndInitTestdirs():
"""Initialize the list of directories containing our unittest scripts.
@@ -440,7 +443,14 @@ def parseOptionsAndInitTestdirs():
group = parser.add_argument_group('Test directories')
group.add_argument('args', metavar='test-dir', nargs='*', help='Specify a list of directory names to search for test modules named after Test*.py (test discovery). If empty, search from the current working directory instead.')
- args = parser.parse_args()
+
+ args = ArgParseNamespace()
+
+ if ('LLDB_TEST_ARGUMENTS' in os.environ):
+ print "Arguments passed through environment: '%s'" % os.environ['LLDB_TEST_ARGUMENTS']
+ args = parser.parse_args([sys.argv[0]].__add__(os.environ['LLDB_TEST_ARGUMENTS'].split()),namespace=args)
+
+ args = parser.parse_args(namespace=args)
platform_system = platform.system()
platform_machine = platform.machine()
More information about the lldb-commits
mailing list