summaryrefslogtreecommitdiffstats
path: root/lldb/packages/Python/lldbsuite
diff options
context:
space:
mode:
Diffstat (limited to 'lldb/packages/Python/lldbsuite')
-rw-r--r--lldb/packages/Python/lldbsuite/test/dosep.py7
-rwxr-xr-xlldb/packages/Python/lldbsuite/test/dotest.py5
2 files changed, 6 insertions, 6 deletions
diff --git a/lldb/packages/Python/lldbsuite/test/dosep.py b/lldb/packages/Python/lldbsuite/test/dosep.py
index 0342d7e97a6..4f9a23d6118 100644
--- a/lldb/packages/Python/lldbsuite/test/dosep.py
+++ b/lldb/packages/Python/lldbsuite/test/dosep.py
@@ -279,11 +279,12 @@ def call_with_timeout(command, timeout, name, inferior_pid_events):
return process_driver.results
-def process_dir(root, files, test_root, dotest_argv, inferior_pid_events):
+def process_dir(root, files, dotest_argv, inferior_pid_events):
"""Examine a directory for tests, and invoke any found within it."""
results = []
for name in files:
- script_file = os.path.join(test_root, "dotest.py")
+ import __main__ as main
+ script_file = main.__file__
command = ([sys.executable, script_file] +
dotest_argv +
["--inferior", "-p", name, root])
@@ -966,7 +967,7 @@ def walk_and_invoke(test_directory, test_subdir, dotest_argv,
test_work_items = []
find_test_files_in_dir_tree(
test_subdir, lambda testdir, test_files: test_work_items.append([
- test_subdir, test_files, test_directory, dotest_argv, None]))
+ test_subdir, test_files, dotest_argv, None]))
# Convert test work items into test results using whatever
# was provided as the test run function.
diff --git a/lldb/packages/Python/lldbsuite/test/dotest.py b/lldb/packages/Python/lldbsuite/test/dotest.py
index 0c569bc81e8..278b22c78c6 100755
--- a/lldb/packages/Python/lldbsuite/test/dotest.py
+++ b/lldb/packages/Python/lldbsuite/test/dotest.py
@@ -1,5 +1,3 @@
-#!/usr/bin/env python
-
"""
A simple testing framework for lldb using python's unit testing framework.
@@ -2039,4 +2037,5 @@ def run_suite():
exitTestSuite(failed)
if __name__ == "__main__":
- run_suite() \ No newline at end of file
+ print(__file__ + " is for use as a module only. It should not be run as a standalone script.")
+ sys.exit(-1)
OpenPOWER on IntegriCloud