cargo2android.py: remove TEST_MAPPING generation

Do not generate TEST_MAPPING when running cargo2android.py. Still accept
the command line argument so current users/wrappers continue working.

Bug: 192348260
Test: Run cargo2android.py manually on ahash
Change-Id: I1975119f8fdd3ae850649b105678dec92fa67518
diff --git a/scripts/cargo2android.py b/scripts/cargo2android.py
index 1b6d3a2..4810cad 100755
--- a/scripts/cargo2android.py
+++ b/scripts/cargo2android.py
@@ -39,15 +39,11 @@
       --cargo "build --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
 a warning comment to the owner crate module in Android.bp.
 """
 
 from __future__ import print_function
-from update_crate_tests import TestMapping
 
 import argparse
 import glob
@@ -1191,18 +1187,6 @@
         # at most one copy_out module per .bp file
         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):
     """Reserve and return True if it has not been reserved yet."""
     if name not in self.name_owners or owner == self.name_owners[name]:
@@ -1653,7 +1637,7 @@
       '--no-test-mapping',
       action='store_true',
       default=False,
-      help='Do not generate a TEST_MAPPING file.  Use only to speed up debugging.')
+      help='Deprecated. Has no effect.')
   parser.add_argument(
       '--verbose',
       action='store_true',
@@ -1713,7 +1697,7 @@
   if args.dump_config_and_exit:
     dump_config(parser, args)
   else:
-    Runner(args).run_cargo().gen_bp().apply_patch().dump_test_mapping_files()
+    Runner(args).run_cargo().gen_bp().apply_patch()
 
 
 if __name__ == '__main__':