Merge "Add --no-presubmit option to prevent host tests being run in presubmit." am: 10d2ee6c3d am: d4619f1a0d am: d8d78c83b3 am: b24c9733af
Original change: https://android-review.googlesource.com/c/platform/development/+/1942517 Change-Id: I4ecbcec4881d70ee7a01b76413ed57c13b66c2c7
This commit is contained in:
@@ -896,7 +896,10 @@ class Crate(object):
|
|||||||
self.write(' auto_gen_config: true,')
|
self.write(' auto_gen_config: true,')
|
||||||
if 'test' in self.crate_types and self.host_supported:
|
if 'test' in self.crate_types and self.host_supported:
|
||||||
self.write(' test_options: {')
|
self.write(' test_options: {')
|
||||||
self.write(' unit_test: true,')
|
if self.runner.args.no_presubmit:
|
||||||
|
self.write(' unit_test: false,')
|
||||||
|
else:
|
||||||
|
self.write(' unit_test: true,')
|
||||||
self.write(' },')
|
self.write(' },')
|
||||||
|
|
||||||
def dump_android_externs(self):
|
def dump_android_externs(self):
|
||||||
@@ -1668,6 +1671,11 @@ def get_parser():
|
|||||||
action='store_true',
|
action='store_true',
|
||||||
default=False,
|
default=False,
|
||||||
help='do not run cargo for the host; only for the device target')
|
help='do not run cargo for the host; only for the device target')
|
||||||
|
parser.add_argument(
|
||||||
|
'--no-presubmit',
|
||||||
|
action='store_true',
|
||||||
|
default=False,
|
||||||
|
help='set unit_test to false for test targets, to avoid host tests running in presubmit')
|
||||||
parser.add_argument(
|
parser.add_argument(
|
||||||
'--no-subdir',
|
'--no-subdir',
|
||||||
action='store_true',
|
action='store_true',
|
||||||
|
|||||||
Reference in New Issue
Block a user