Skip to content
Snippets Groups Projects
Commit fb94c31f authored by Chidera Olibie's avatar Chidera Olibie Committed by Gerrit Code Review
Browse files

Merge "Do not jarjar tests if explicitly excluded."

parents 136f5106 69429571
No related branches found
No related tags found
No related merge requests found
......@@ -120,9 +120,11 @@ def make_jarjar_rules(args):
_get_toplevel_class(clazz) not in excluded_classes and
not any(r.fullmatch(clazz) for r in exclude_regexes)):
outfile.write(f'rule {clazz} {args.prefix}.@0\n')
# Also include jarjar rules for unit tests of the class, so the package matches
outfile.write(f'rule {clazz}Test {args.prefix}.@0\n')
outfile.write(f'rule {clazz}Test$* {args.prefix}.@0\n')
# Also include jarjar rules for unit tests of the class if it's not explicitly
# excluded, so the package matches
if not any(r.fullmatch(clazz + 'Test') for r in exclude_regexes):
outfile.write(f'rule {clazz}Test {args.prefix}.@0\n')
outfile.write(f'rule {clazz}Test$* {args.prefix}.@0\n')
def _main():
......
0% Loading or .
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment