Skip to content

Commit e162d0a

Browse files
authored
Merge pull request #30850 from gribozavr/run-test-filter
utils/run-test: added lit's --filter option
2 parents abf520f + 9f3a6cd commit e162d0a

File tree

1 file changed

+6
-0
lines changed

1 file changed

+6
-0
lines changed

utils/run-test

Lines changed: 6 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -132,6 +132,9 @@ def main():
132132
dest="targets",
133133
help="stdlib deployment targets to test. Accept "
134134
"multiple (default: " + host_target + ")")
135+
parser.add_argument("--filter", type=str, metavar="REGEX",
136+
help="only run tests with paths matching the given "
137+
"regular expression")
135138
parser.add_argument("--mode",
136139
choices=TEST_MODES, default='optimize_none',
137140
help="test mode (default: optimize_none)")
@@ -262,6 +265,9 @@ def main():
262265
'--xunit-xml-output=%s' % os.path.join(args.result_dir,
263266
'lit-tests.xml')]
264267

268+
if args.filter:
269+
test_args += ['--filter', args.filter]
270+
265271
test_cmd = [sys.executable, args.lit] + test_args + paths
266272

267273
# Do execute test

0 commit comments

Comments
 (0)