compat_generator: find new types and removed types

To generate compat files, we need:

- base plat sepolicy
- old plat sepolicy
- base plat pub sepolicy
- mapping file from the device
- latest compat files

Generator now triggers the build system itself to get necessary base
files, and then uses the artifacts to extract new types and removed
types.

For the next step, the new/removed types will be mapped to old types,
based on the latest compat files.

Bug: 214336258
Test: sepolicy_generate_compat --branch sc-v2-dev --target-version \
    32.0 --latest-version 31.0 -vvvv --build latest
Change-Id: I1f228233c1e3638e78bc0630ae51e48667a12ef5
diff --git a/tests/Android.bp b/tests/Android.bp
index 78a631f..8ca952d 100644
--- a/tests/Android.bp
+++ b/tests/Android.bp
@@ -25,34 +25,46 @@
     },
 }
 
+python_library_host {
+    name: "mini_cil_parser",
+    srcs: ["mini_parser.py"],
+}
+
+python_library_host {
+    name: "pysepolwrap",
+    srcs: [
+        "fc_sort.py",
+        "policy.py",
+    ],
+}
+
 python_binary_host {
     name: "treble_sepolicy_tests",
     srcs: [
-        "fc_sort.py",
-        "mini_parser.py",
-        "policy.py",
         "treble_sepolicy_tests.py",
     ],
+    libs: [
+        "mini_cil_parser",
+        "pysepolwrap",
+    ],
     data: [":libsepolwrap"],
 }
 
 python_binary_host {
     name: "sepolicy_tests",
     srcs: [
-        "fc_sort.py",
-        "policy.py",
         "sepolicy_tests.py",
     ],
+    libs: ["pysepolwrap"],
     data: [":libsepolwrap"],
 }
 
 python_binary_host {
     name: "searchpolicy",
     srcs: [
-        "fc_sort.py",
-        "policy.py",
         "searchpolicy.py",
     ],
+    libs: ["pysepolwrap"],
     required: ["libsepolwrap"],
 }
 
@@ -60,8 +72,8 @@
     name: "combine_maps",
     srcs: [
         "combine_maps.py",
-        "mini_parser.py",
     ],
+    libs: ["mini_cil_parser"],
 }
 
 python_binary_host {