diff options
| author | Johnny Chen <johnny.chen@apple.com> | 2011-01-29 01:16:52 +0000 |
|---|---|---|
| committer | Johnny Chen <johnny.chen@apple.com> | 2011-01-29 01:16:52 +0000 |
| commit | 6573818e3864ba3cdd32932c38eff09607e57ef7 (patch) | |
| tree | 18d6a57a65d4fe846c0edbcf65328048a3bd2f33 | |
| parent | 24f5ff0f234b1b786291d79e252ef1a7a7eb5f4b (diff) | |
| download | bcm5719-llvm-6573818e3864ba3cdd32932c38eff09607e57ef7.tar.gz bcm5719-llvm-6573818e3864ba3cdd32932c38eff09607e57ef7.zip | |
Add a "-D" option to the test driver which dumps the Python sys.path variable
to be used for the test run. Could be useful for debugging the setup of the
test environment.
llvm-svn: 124516
| -rwxr-xr-x | lldb/test/dotest.py | 11 |
1 files changed, 11 insertions, 0 deletions
diff --git a/lldb/test/dotest.py b/lldb/test/dotest.py index 0db40c6f6e6..108a9a5e706 100755 --- a/lldb/test/dotest.py +++ b/lldb/test/dotest.py @@ -72,6 +72,9 @@ config = {} # Delay startup in order for the debugger to attach. delay = False +# Dump the Python sys.path variable. +dumpSysPath = False + # By default, failfast is False. Use '-F' to overwrite it. failfast = False @@ -123,6 +126,7 @@ where options: -h : print this help message and exit (also --help) -A : specify the architecture to launch for the inferior process -C : specify the compiler used to build the inferior executable +-D : dump the Python sys.path variable -a : don't do lldb Python API tests use @python_api_test to decorate a test case as lldb Python API test +a : just do lldb Python API tests @@ -252,6 +256,7 @@ def parseOptionsAndInitTestdirs(): global configFile global count global delay + global dumpSysPath global failfast global filterspec global fs4all @@ -292,6 +297,9 @@ def parseOptionsAndInitTestdirs(): usage() os.environ["CC"] = sys.argv[index] index += 1 + elif sys.argv[index].startswith('-D'): + dumpSysPath = True + index += 1 elif sys.argv[index].startswith('-a'): dont_do_python_api_test = True index += 1 @@ -453,6 +461,7 @@ def setupSysPath(): global rdir global testdirs + global dumpSysPath # Get the directory containing the current script. if "DOTEST_PROFILE" in os.environ and "DOTEST_SCRIPT_DIR" in os.environ: @@ -509,6 +518,8 @@ def setupSysPath(): # This is to locate the lldb.py module. Insert it right after sys.path[0]. sys.path[1:1] = [lldbPath] + if dumpSysPath: + print "sys.path:", sys.path def doDelay(delta): |

