Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

test: add --test-root option to test.py #26093

Closed
wants to merge 1 commit into from
Closed
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
6 changes: 5 additions & 1 deletion tools/test.py
Original file line number Diff line number Diff line change
Expand Up @@ -1393,6 +1393,8 @@ def BuildOptions():
default="")
result.add_option('--temp-dir',
help='Optional path to change directory used for tests', default=False)
result.add_option('--test-root',
help='Optional path to change test directory', dest='test_root', default=None)
result.add_option('--repeat',
help='Number of times to repeat given tests',
default=1, type="int")
Expand Down Expand Up @@ -1576,8 +1578,10 @@ def Main():

workspace = abspath(join(dirname(sys.argv[0]), '..'))
test_root = join(workspace, 'test')
if options.test_root is not None:
test_root = options.test_root
suites = GetSuites(test_root)
repositories = [TestRepository(join(workspace, 'test', name)) for name in suites]
repositories = [TestRepository(join(test_root, name)) for name in suites]
repositories += [TestRepository(a) for a in options.suite]

root = LiteralTestSuite(repositories, test_root)
Expand Down