Add unit test for dynamic policy.

Add unit test for dyanmic policy. Including:
    1. Use bp file instead of mk file
    2. Test (un)registering policy mixes
    3. Test dynamic policy playback rerouting
    4. Test dynamic policy mix record injection
The idea of 3. and 4. is from pa/1201282.

Test: atest audiopolicy_tests
Bug: 135621476
Change-Id: Ic95c6f9193c2448168897c5441554cff735f401d
diff --git a/services/audiopolicy/tests/Android.bp b/services/audiopolicy/tests/Android.bp
new file mode 100644
index 0000000..df23410
--- /dev/null
+++ b/services/audiopolicy/tests/Android.bp
@@ -0,0 +1,66 @@
+cc_test {
+    name: "audiopolicy_tests",
+
+    include_dirs: [
+        "frameworks/av/services/audiopolicy",
+    ],
+
+    shared_libs: [
+        "libaudioclient",
+        "libaudiofoundation",
+        "libaudiopolicy",
+        "libaudiopolicymanagerdefault",
+        "libbase",
+        "libhidlbase",
+        "liblog",
+        "libmedia_helper",
+        "libutils",
+        "libxml2",
+    ],
+
+    static_libs: ["libaudiopolicycomponents"],
+
+    header_libs: [
+        "libaudiopolicycommon",
+        "libaudiopolicyengine_interface_headers",
+        "libaudiopolicymanager_interface_headers",
+    ],
+
+    srcs: ["audiopolicymanager_tests.cpp"],
+
+    data: [":audiopolicytest_configuration_files",],
+
+    cflags: [
+        "-Werror",
+        "-Wall",
+    ],
+
+    test_suites: ["device-tests"],
+
+}
+
+// system/audio.h utilities test
+
+cc_test {
+    name: "systemaudio_tests",
+
+    shared_libs: [
+        "libaudiofoundation",
+        "libbase",
+        "liblog",
+        "libmedia_helper",
+        "libutils",
+    ],
+
+    header_libs: ["libmedia_headers"],
+
+    srcs: ["systemaudio_tests.cpp"],
+
+    cflags: [
+        "-Werror",
+        "-Wall",
+    ],
+
+    test_suites: ["device-tests"],
+
+}