summaryrefslogtreecommitdiffstats
path: root/lldb/packages/Python/lldbsuite/test
diff options
context:
space:
mode:
Diffstat (limited to 'lldb/packages/Python/lldbsuite/test')
-rw-r--r--lldb/packages/Python/lldbsuite/test/configuration.py6
-rw-r--r--lldb/packages/Python/lldbsuite/test/dotest.py101
-rw-r--r--lldb/packages/Python/lldbsuite/test/dotest_args.py2
3 files changed, 1 insertions, 108 deletions
diff --git a/lldb/packages/Python/lldbsuite/test/configuration.py b/lldb/packages/Python/lldbsuite/test/configuration.py
index 1712c50f508..a827a24c6d7 100644
--- a/lldb/packages/Python/lldbsuite/test/configuration.py
+++ b/lldb/packages/Python/lldbsuite/test/configuration.py
@@ -102,12 +102,6 @@ parsable = False
# The regular expression pattern to match against eligible filenames as our test cases.
regexp = None
-# By default, tests are executed in place and cleanups are performed afterwards.
-# Use '-r dir' option to relocate the tests and their intermediate files to a
-# different directory and to forgo any cleanups. The directory specified must
-# not exist yet.
-rdir = None
-
# By default, recorded session info for errored/failed test are dumped into its
# own file under a session directory named after the timestamp of the test suite
# run. Use '-s session-dir-name' to specify a specific dir name.
diff --git a/lldb/packages/Python/lldbsuite/test/dotest.py b/lldb/packages/Python/lldbsuite/test/dotest.py
index cf01cc4b6e9..02cc8ca179a 100644
--- a/lldb/packages/Python/lldbsuite/test/dotest.py
+++ b/lldb/packages/Python/lldbsuite/test/dotest.py
@@ -327,23 +327,6 @@ def parseOptionsAndInitTestdirs():
if args.q:
configuration.parsable = True
- if args.R:
- if args.R.startswith('-'):
- usage(parser)
- configuration.rdir = os.path.abspath(args.R)
- if os.path.exists(configuration.rdir):
- import shutil
- print('Removing tree:', configuration.rdir)
- shutil.rmtree(configuration.rdir)
-
- if args.r:
- if args.r.startswith('-'):
- usage(parser)
- configuration.rdir = os.path.abspath(args.r)
- if os.path.exists(configuration.rdir):
- print('Relocated directory:', configuration.rdir, 'must not exist!')
- usage(parser)
-
if args.S:
configuration.skip_build_and_cleanup = True
@@ -438,47 +421,6 @@ def parseOptionsAndInitTestdirs():
# Shut off multiprocessing mode when test directories are specified.
configuration.no_multiprocess_test_runner = True
- # If '-r dir' is specified, the tests should be run under the relocated
- # directory. Let's copy the testdirs over.
- if configuration.rdir:
- from shutil import copytree, ignore_patterns
-
- tmpdirs = []
- orig_testdirs = configuration.testdirs[:]
- for srcdir in configuration.testdirs:
- # For example, /Volumes/data/lldb/svn/ToT/test/functionalities/watchpoint/hello_watchpoint
- # shall be split into ['/Volumes/data/lldb/svn/ToT/', 'functionalities/watchpoint/hello_watchpoint'].
- # Utilize the relative path to the 'test' directory to make our destination dir path.
- if ("test" + os.sep) in srcdir:
- to_split_on = "test" + os.sep
- else:
- to_split_on = "test"
- dstdir = os.path.join(configuration.rdir, srcdir.split(to_split_on)[1])
- dstdir = dstdir.rstrip(os.sep)
- # Don't copy the *.pyc and .svn stuffs.
- copytree(srcdir, dstdir, ignore=ignore_patterns('*.pyc', '.svn'))
- tmpdirs.append(dstdir)
-
- # This will be our modified testdirs.
- configuration.testdirs = tmpdirs
-
- # With '-r dir' specified, there's no cleanup of intermediate test files.
- os.environ["LLDB_DO_CLEANUP"] = 'NO'
-
- # If the original testdirs is ['test'], the make directory has already been copied
- # recursively and is contained within the rdir/test dir. For anything
- # else, we would need to copy over the make directory and its contents,
- # so that, os.listdir(rdir) looks like, for example:
- #
- # array_types conditional_break make
- #
- # where the make directory contains the Makefile.rules file.
- if len(configuration.testdirs) != 1 or os.path.basename(orig_testdirs[0]) != 'test':
- scriptdir = os.path.dirname(__file__)
- # Don't copy the .svn stuffs.
- copytree(os.path.join(scriptdir, 'make'), os.path.join(rdir, 'make'),
- ignore=ignore_patterns('.svn'))
-
#print("testdirs:", testdirs)
def getXcodeOutputPaths(lldbRootDirectory):
@@ -585,17 +527,7 @@ def setupSysPath():
print("This script expects to reside in lldb's test directory.")
sys.exit(-1)
- if configuration.rdir:
- # Set up the LLDB_TEST environment variable appropriately, so that the
- # individual tests can be located relatively.
- #
- # See also lldbtest.TestBase.setUpClass(cls).
- if len(configuration.testdirs) == 1 and os.path.basename(configuration.testdirs[0]) == 'test':
- os.environ["LLDB_TEST"] = os.path.join(configuration.rdir, 'test')
- else:
- os.environ["LLDB_TEST"] = configuration.rdir
- else:
- os.environ["LLDB_TEST"] = scriptPath
+ os.environ["LLDB_TEST"] = scriptPath
# Set up the LLDB_SRC environment variable, so that the tests can locate
# the LLDB source code.
@@ -1112,10 +1044,6 @@ def run_suite():
if isinstance(configuration.compilers, list) and len(configuration.compilers) >= 1:
iterCompilers = True
- # Make a shallow copy of sys.path, we need to manipulate the search paths later.
- # This is only necessary if we are relocated and with different configurations.
- if configuration.rdir:
- old_sys_path = sys.path[:]
# If we iterate on archs or compilers, there is a chance we want to split stderr/stdout.
if iterArchs or iterCompilers:
old_stderr = sys.stderr
@@ -1145,33 +1073,6 @@ def run_suite():
tbl = str.maketrans(' ', '-')
configPostfix = configString.translate(tbl)
- # If we specified a relocated directory to run the test suite, do
- # the extra housekeeping to copy the testdirs to a configStringified
- # directory and to update sys.path before invoking the test runner.
- # The purpose is to separate the configuration-specific directories
- # from each other.
- if configuration.rdir:
- from shutil import copytree, rmtree, ignore_patterns
-
- newrdir = "%s.%s" % (rdir, configPostfix)
-
- # Copy the tree to a new directory with postfix name configPostfix.
- if os.path.exists(newrdir):
- rmtree(newrdir)
- copytree(rdir, newrdir, ignore=ignore_patterns('*.pyc', '*.o', '*.d'))
-
- # Update the LLDB_TEST environment variable to reflect new top
- # level test directory.
- #
- # See also lldbtest.TestBase.setUpClass(cls).
- if len(configuration.testdirs) == 1 and os.path.basename(configuration.testdirs[0]) == 'test':
- os.environ["LLDB_TEST"] = os.path.join(newrdir, 'test')
- else:
- os.environ["LLDB_TEST"] = newrdir
-
- # And update the Python search paths for modules.
- sys.path = [x.replace(rdir, newrdir, 1) for x in old_sys_path]
-
# Output the configuration.
if not configuration.parsable:
sys.stderr.write("\nConfiguration: " + configString + "\n")
diff --git a/lldb/packages/Python/lldbsuite/test/dotest_args.py b/lldb/packages/Python/lldbsuite/test/dotest_args.py
index 45b976487b1..064ae776ffb 100644
--- a/lldb/packages/Python/lldbsuite/test/dotest_args.py
+++ b/lldb/packages/Python/lldbsuite/test/dotest_args.py
@@ -70,8 +70,6 @@ def create_parser():
group = parser.add_argument_group('Configuration options')
group.add_argument('--framework', metavar='framework-path', help='The path to LLDB.framework')
group.add_argument('--executable', metavar='executable-path', help='The path to the lldb executable')
- group.add_argument('-R', metavar='dir', help='Specify a directory to relocate the tests and their intermediate files to. BE WARNED THAT the directory, if exists, will be deleted before running this test driver. No cleanup of intermediate test files is performed in this case')
- group.add_argument('-r', metavar='dir', help="Similar to '-R', except that the directory must not exist before running this test driver")
group.add_argument('-s', metavar='name', help='Specify the name of the dir created to store the session files of tests with errored or failed status. If not specified, the test driver uses the timestamp as the session dir name')
group.add_argument('-y', type=int, metavar='count', help="Specify the iteration count used to collect our benchmarks. An example is the number of times to do 'thread step-over' to measure stepping speed.")
group.add_argument('-#', type=int, metavar='sharp', dest='sharp', help='Repeat the test suite for a specified number of times')
OpenPOWER on IntegriCloud