Skip to content
Browse files

test: add --test-root option to

This way we can specify a custom path for the test folder, e.g.
when building addons separately from the source tree.

PR-URL: #26093
Reviewed-By: Joyee Cheung <>
Reviewed-By: Anna Henningsen <>
Reviewed-By: James M Snell <>
  • Loading branch information...
hashseed authored and rvagg committed Feb 13, 2019
1 parent f44f335 commit d3525d75058ff0b4c2ef59d4bc75a28ddfd24fca
Showing with 5 additions and 1 deletion.
  1. +5 −1 tools/
@@ -1393,6 +1393,8 @@ def BuildOptions():
help='Optional path to change directory used for tests', default=False)
help='Optional path to change test directory', dest='test_root', default=None)
help='Number of times to repeat given tests',
default=1, type="int")
@@ -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)

0 comments on commit d3525d7

Please sign in to comment.
You can’t perform that action at this time.