Skip to content
This repository has been archived by the owner on Apr 23, 2020. It is now read-only.

Commit

Permalink
Test suite support for setting arguments through the environment
Browse files Browse the repository at this point in the history
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 :-)



git-svn-id: https://llvm.org/svn/llvm-project/lldb/trunk@184615 91177308-0d34-0410-b5e6-96231b3b80d8
  • Loading branch information
Enrico Granata committed Jun 22, 2013
1 parent 9d1b2d2 commit 6fa3c50
Showing 1 changed file with 11 additions and 1 deletion.
12 changes: 11 additions & 1 deletion test/dotest.py
Original file line number Diff line number Diff line change
Expand Up @@ -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.
Expand Down Expand Up @@ -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()
Expand Down

0 comments on commit 6fa3c50

Please sign in to comment.