Merge "Allow blocklisting cfgs." am: 981aea2210 am: fb1b9499c4 am: f0e979abe4

Original change: https://android-review.googlesource.com/c/platform/development/+/1729454

Change-Id: I9a5b7231baf8eacf3ae7fff68f793de46eb5ce02
This commit is contained in:
Treehugger Robot
2021-06-08 16:08:00 +00:00
committed by Automerger Merge Worker

View File

@@ -676,7 +676,8 @@ class Crate(object):
if self.edition:
self.write(' edition: "' + self.edition + '",')
self.dump_android_property_list('features', '"%s"', self.features)
self.dump_android_property_list('cfgs', '"%s"', self.cfgs)
cfgs = [cfg for cfg in self.cfgs if not cfg in self.runner.args.cfg_blocklist]
self.dump_android_property_list('cfgs', '"%s"', cfgs)
self.dump_android_flags()
if self.externs:
self.dump_android_externs()
@@ -1616,6 +1617,11 @@ def get_parser():
default=[],
help=('Do not emit the given tests. ' +
'Pass the path to the test file to exclude.'))
parser.add_argument(
'--cfg-blocklist',
nargs='*',
default=[],
help='Do not emit the given cfg.')
parser.add_argument(
'--no-test-mapping',
action='store_true',