Merge "cargo2android.py: remove TEST_MAPPING generation"
This commit is contained in:
@@ -39,15 +39,11 @@ The Cargo.toml file should work at least for the host platform.
|
|||||||
--cargo "build --target x86_64-unknown-linux-gnu"
|
--cargo "build --target x86_64-unknown-linux-gnu"
|
||||||
--cargo "build --tests --target x86_64-unknown-linux-gnu"
|
--cargo "build --tests --target x86_64-unknown-linux-gnu"
|
||||||
|
|
||||||
Note that when there are tests for this module or for its reverse
|
|
||||||
dependencies, these tests will be added to the TEST_MAPPING file.
|
|
||||||
|
|
||||||
If there are rustc warning messages, this script will add
|
If there are rustc warning messages, this script will add
|
||||||
a warning comment to the owner crate module in Android.bp.
|
a warning comment to the owner crate module in Android.bp.
|
||||||
"""
|
"""
|
||||||
|
|
||||||
from __future__ import print_function
|
from __future__ import print_function
|
||||||
from update_crate_tests import TestMapping
|
|
||||||
|
|
||||||
import argparse
|
import argparse
|
||||||
import glob
|
import glob
|
||||||
@@ -1192,18 +1188,6 @@ class Runner(object):
|
|||||||
# at most one copy_out module per .bp file
|
# at most one copy_out module per .bp file
|
||||||
self.dump_copy_out_module(outf)
|
self.dump_copy_out_module(outf)
|
||||||
|
|
||||||
def dump_test_mapping_files(self):
|
|
||||||
"""Dump all TEST_MAPPING files."""
|
|
||||||
if self.dry_run:
|
|
||||||
print('Dry-run skip dump of TEST_MAPPING')
|
|
||||||
elif self.args.no_test_mapping:
|
|
||||||
print('Skipping generation of TEST_MAPPING')
|
|
||||||
else:
|
|
||||||
test_mapping = TestMapping(None)
|
|
||||||
for bp_file_name in self.bp_files:
|
|
||||||
test_mapping.create_test_mapping(os.path.dirname(bp_file_name))
|
|
||||||
return self
|
|
||||||
|
|
||||||
def try_claim_module_name(self, name, owner):
|
def try_claim_module_name(self, name, owner):
|
||||||
"""Reserve and return True if it has not been reserved yet."""
|
"""Reserve and return True if it has not been reserved yet."""
|
||||||
if name not in self.name_owners or owner == self.name_owners[name]:
|
if name not in self.name_owners or owner == self.name_owners[name]:
|
||||||
@@ -1654,7 +1638,7 @@ def get_parser():
|
|||||||
'--no-test-mapping',
|
'--no-test-mapping',
|
||||||
action='store_true',
|
action='store_true',
|
||||||
default=False,
|
default=False,
|
||||||
help='Do not generate a TEST_MAPPING file. Use only to speed up debugging.')
|
help='Deprecated. Has no effect.')
|
||||||
parser.add_argument(
|
parser.add_argument(
|
||||||
'--verbose',
|
'--verbose',
|
||||||
action='store_true',
|
action='store_true',
|
||||||
@@ -1714,7 +1698,7 @@ def main():
|
|||||||
if args.dump_config_and_exit:
|
if args.dump_config_and_exit:
|
||||||
dump_config(parser, args)
|
dump_config(parser, args)
|
||||||
else:
|
else:
|
||||||
Runner(args).run_cargo().gen_bp().apply_patch().dump_test_mapping_files()
|
Runner(args).run_cargo().gen_bp().apply_patch()
|
||||||
|
|
||||||
|
|
||||||
if __name__ == '__main__':
|
if __name__ == '__main__':
|
||||||
|
|||||||
Reference in New Issue
Block a user