Audio VTS: Test now use Android.mk

To validate the audio_policy_configuration.xml against a schema,
libxml2 is used.
Unfortunately, libxml2 uses Android.mk in oc-dev thus can not be used
from the tests which uses Android.bp.

It has been deemed safer to transform the tests to use Android.mk rather
than backporting the Android.bp patch from master.

Test: Compile
Bug: 35700978
Merged-In: I800e692a6ff4f64655007c33af7e34d879ee1132
Change-Id: Ie3f2069d60be369b4c37c27e9c1cf9372323a19c
Signed-off-by: Kevin Rocard <krocard@google.com>
diff --git a/audio/2.0/vts/Android.mk b/audio/2.0/vts/Android.mk
new file mode 100644
index 0000000..7a16792
--- /dev/null
+++ b/audio/2.0/vts/Android.mk
@@ -0,0 +1,3 @@
+LOCAL_PATH := $(call my-dir)
+
+include $(call all-makefiles-under,$(LOCAL_PATH))
diff --git a/audio/2.0/vts/functional/Android.bp b/audio/2.0/vts/functional/Android.bp
deleted file mode 100644
index f5ab76f..0000000
--- a/audio/2.0/vts/functional/Android.bp
+++ /dev/null
@@ -1,39 +0,0 @@
-//
-// Copyright (C) 2017 The Android Open Source Project
-//
-// Licensed under the Apache License, Version 2.0 (the "License");
-// you may not use this file except in compliance with the License.
-// You may obtain a copy of the License at
-//
-//      http://www.apache.org/licenses/LICENSE-2.0
-//
-// Unless required by applicable law or agreed to in writing, software
-// distributed under the License is distributed on an "AS IS" BASIS,
-// WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
-// See the License for the specific language governing permissions and
-// limitations under the License.
-//
-
-cc_test {
-    name: "VtsHalAudioV2_0TargetTest",
-    defaults: ["hidl_defaults"],
-    srcs: ["AudioPrimaryHidlHalTest.cpp"],
-    shared_libs: [
-        "libbase",
-        "liblog",
-        "libhidlbase",
-        "libhidltransport",
-        "libutils",
-        "libcutils",
-        "android.hardware.audio@2.0",
-        "android.hardware.audio.common@2.0",
-    ],
-    static_libs: ["VtsHalHidlTargetTestBase"],
-    cflags: [
-        "-O0",
-        "-g",
-        "-Wall",
-        "-Wextra",
-        "-Werror",
-    ],
-}
diff --git a/audio/2.0/vts/functional/Android.mk b/audio/2.0/vts/functional/Android.mk
new file mode 100644
index 0000000..8af18be
--- /dev/null
+++ b/audio/2.0/vts/functional/Android.mk
@@ -0,0 +1,40 @@
+# Copyright (C) 2017 The Android Open Source Project
+#
+# Licensed under the Apache License, Version 2.0 (the "License");
+# you may not use this file except in compliance with the License.
+# You may obtain a copy of the License at
+#
+#      http://www.apache.org/licenses/LICENSE-2.0
+#
+# Unless required by applicable law or agreed to in writing, software
+# distributed under the License is distributed on an "AS IS" BASIS,
+# WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
+# See the License for the specific language governing permissions and
+# limitations under the License.
+
+LOCAL_PATH := $(call my-dir)
+
+include $(CLEAR_VARS)
+
+LOCAL_CLANG := true
+LOCAL_MODULE := VtsHalAudioV2_0TargetTest
+LOCAL_CPPFLAGS := -O0 -g -Wall -Wextra -Werror
+LOCAL_SRC_FILES := \
+    AudioPrimaryHidlHalTest.cpp \
+
+LOCAL_C_INCLUDES := external/libxml2/include
+
+LOCAL_STATIC_LIBRARIES := VtsHalHidlTargetTestBase
+LOCAL_SHARED_LIBRARIES := \
+    libbase \
+    liblog \
+    libhidlbase \
+    libhidltransport \
+    libutils \
+    libcutils \
+    libxml2 \
+    libicuuc \
+    android.hardware.audio@2.0 \
+    android.hardware.audio.common@2.0 \
+
+include $(BUILD_NATIVE_TEST)
diff --git a/audio/Android.bp b/audio/Android.bp
index c3c2be1..abb2bbb 100644
--- a/audio/Android.bp
+++ b/audio/Android.bp
@@ -1,7 +1,6 @@
 // This is an autogenerated file, do not edit.
 subdirs = [
     "2.0",
-    "2.0/vts/functional",
     "common/2.0",
     "common/2.0/default",
     "effect/2.0",