OSDN Git Service

Media omx tests static link to dependencies.
authorTri Vo <trong@google.com>
Fri, 4 Aug 2017 21:42:31 +0000 (14:42 -0700)
committerTri Vo <trong@google.com>
Tue, 8 Aug 2017 01:57:44 +0000 (01:57 +0000)
These tests now statically link to libs not guaranteed to be on the
device, which include HAL definition libs.

Also, remove global include paths.

Bug: 64040096
Test: vts-tradefed run commandAndExit vts --skip-all-system-status-check
--skip-preconditions --module VtsHalMediaOmxV1_0Host

Change-Id: Iea1dc549704f61b1416357d72dc1bf26864978d4

media/omx/1.0/vts/functional/audio/Android.bp
media/omx/1.0/vts/functional/common/Android.bp
media/omx/1.0/vts/functional/component/Android.bp
media/omx/1.0/vts/functional/master/Android.bp
media/omx/1.0/vts/functional/video/Android.bp

index 66fd20b..f517fa1 100644 (file)
 
 cc_test {
     name: "VtsHalMediaOmxV1_0TargetAudioEncTest",
-    defaults: ["hidl_defaults"],
-    srcs: ["VtsHalMediaOmxV1_0TargetAudioEncTest.cpp",
-           "media_audio_hidl_test_common.cpp"],
-    shared_libs: [
-        "libbase",
-        "liblog",
-        "libcutils",
-        "libhidlbase",
-        "libhidlmemory",
-        "libhidltransport",
-        "libhwbinder",
-        "libnativehelper",
-        "libutils",
-        "libstagefright_foundation",
-        "android.hidl.allocator@1.0",
-        "android.hidl.memory@1.0",
-        "android.hardware.media.omx@1.0",
-    ],
-    static_libs: ["VtsHalHidlTargetTestBase",
-                  "VtsHalMediaOmxV1_0CommonUtil"],
-    cflags: [
-        "-O0",
-        "-g",
-    ],
-    include_dirs: [
-        "frameworks/native/include/media/openmax/",
-        "hardware/interfaces/media/omx/1.0/vts/functional/common",
+    defaults: ["VtsHalMediaOmxV1_0Defaults"],
+    srcs: [
+        "VtsHalMediaOmxV1_0TargetAudioEncTest.cpp",
+        "media_audio_hidl_test_common.cpp"
     ],
 }
 
 cc_test {
     name: "VtsHalMediaOmxV1_0TargetAudioDecTest",
-    defaults: ["hidl_defaults"],
-    srcs: ["VtsHalMediaOmxV1_0TargetAudioDecTest.cpp",
-           "media_audio_hidl_test_common.cpp"],
-    shared_libs: [
-        "libbase",
-        "liblog",
-        "libcutils",
-        "libhidlbase",
-        "libhidlmemory",
-        "libhidltransport",
-        "libhwbinder",
-        "libnativehelper",
-        "libutils",
-        "libstagefright_foundation",
-        "android.hidl.allocator@1.0",
-        "android.hidl.memory@1.0",
-        "android.hardware.media.omx@1.0",
-    ],
-    static_libs: ["VtsHalHidlTargetTestBase",
-                  "VtsHalMediaOmxV1_0CommonUtil"],
-    cflags: [
-        "-O0",
-        "-g",
-    ],
-    include_dirs: [
-        "frameworks/native/include/media/openmax/",
-        "hardware/interfaces/media/omx/1.0/vts/functional/common",
+    defaults: ["VtsHalMediaOmxV1_0Defaults"],
+    srcs: [
+        "VtsHalMediaOmxV1_0TargetAudioDecTest.cpp",
+        "media_audio_hidl_test_common.cpp"
     ],
 }
 
index 93251fe..af55e3a 100755 (executable)
 
 cc_library_static {
     name: "VtsHalMediaOmxV1_0CommonUtil",
-    defaults: ["hidl_defaults"],
     srcs: ["media_hidl_test_common.cpp"],
-    shared_libs: [
-        "liblog",
+
+    header_libs: ["media_plugin_headers"],
+    export_header_lib_headers: ["media_plugin_headers"],
+    export_include_dirs: ["."],
+
+    static_libs: [
+        "VtsHalHidlTargetTestBase",
         "libhidlmemory",
         "android.hidl.allocator@1.0",
         "android.hidl.memory@1.0",
         "android.hardware.media.omx@1.0",
     ],
-    static_libs: ["VtsHalHidlTargetTestBase"],
-    cflags: [ "-O0", "-g", ],
-    include_dirs: [
-        "frameworks/native/include/media/openmax/",
+}
+
+cc_defaults {
+    name: "VtsHalMediaOmxV1_0Defaults",
+    defaults: ["VtsHalTargetTestDefaults"],
+
+    // Link to these statically as they are not guaranteed to be on the device.
+    static_libs: [
+        "VtsHalMediaOmxV1_0CommonUtil",
+        "android.hardware.graphics.bufferqueue@1.0",
+        "android.hardware.graphics.common@1.0",
+        "android.hardware.media.omx@1.0",
+        "android.hardware.media@1.0",
+        "android.hidl.allocator@1.0",
+        "android.hidl.memory@1.0",
+        "libhidlmemory",
+        "libnativehelper",
+    ],
+
+    // TODO(b/64437680): Assume these libs are always available on the device.
+    shared_libs: [
+        "libstagefright_foundation",
     ],
 }
index fd3210f..f76b6e9 100644 (file)
 
 cc_test {
     name: "VtsHalMediaOmxV1_0TargetComponentTest",
-    defaults: ["hidl_defaults"],
+    defaults: ["VtsHalMediaOmxV1_0Defaults"],
     srcs: ["VtsHalMediaOmxV1_0TargetComponentTest.cpp"],
-    shared_libs: [
-        "libbase",
-        "liblog",
-        "libcutils",
-        "libhidlbase",
-        "libhidlmemory",
-        "libhidltransport",
-        "libhwbinder",
-        "libnativehelper",
-        "libutils",
-        "libstagefright_foundation",
-        "android.hidl.allocator@1.0",
-        "android.hidl.memory@1.0",
-        "android.hardware.media.omx@1.0",
-    ],
-    static_libs: ["VtsHalHidlTargetTestBase",
-                  "VtsHalMediaOmxV1_0CommonUtil"],
-    cflags: [
-        "-O0",
-        "-g",
-    ],
-    include_dirs: [
-        "frameworks/native/include/media/openmax/",
-        "hardware/interfaces/media/omx/1.0/vts/functional/common",
-    ],
 }
 
index e24b79b..4a45e69 100644 (file)
 
 cc_test {
     name: "VtsHalMediaOmxV1_0TargetMasterTest",
-    defaults: ["hidl_defaults"],
+    defaults: ["VtsHalMediaOmxV1_0Defaults"],
     srcs: ["VtsHalMediaOmxV1_0TargetMasterTest.cpp"],
-    shared_libs: [
-        "libbase",
-        "liblog",
-        "libcutils",
-        "libhidlbase",
-        "libhidltransport",
-        "libhwbinder",
-        "libnativehelper",
-        "libutils",
-        "android.hidl.allocator@1.0",
-        "android.hidl.memory@1.0",
-        "android.hardware.media.omx@1.0",
-    ],
-    static_libs: ["VtsHalHidlTargetTestBase"],
-    cflags: [
-        "-O0",
-        "-g",
-    ],
-    include_dirs: [
-        "frameworks/native/include/media/openmax/",
-        "hardware/interfaces/media/omx/1.0/vts/functional/common",
-    ],
 }
 
index 4e94f3b..e251a15 100644 (file)
 
 cc_test {
     name: "VtsHalMediaOmxV1_0TargetVideoDecTest",
-    defaults: ["hidl_defaults"],
-    srcs: ["VtsHalMediaOmxV1_0TargetVideoDecTest.cpp",
-           "media_video_hidl_test_common.cpp"],
-    shared_libs: [
-        "libbase",
-        "liblog",
-        "libcutils",
-        "libhidlbase",
-        "libhidlmemory",
-        "libhidltransport",
-        "libhwbinder",
-        "libnativehelper",
-        "libutils",
-        "libstagefright_foundation",
-        "android.hidl.allocator@1.0",
-        "android.hidl.memory@1.0",
-        "android.hardware.media.omx@1.0",
+    defaults: ["VtsHalMediaOmxV1_0Defaults"],
+    srcs: [
+        "VtsHalMediaOmxV1_0TargetVideoDecTest.cpp",
+        "media_video_hidl_test_common.cpp"
+    ],
+    static_libs: [
         "android.hardware.graphics.allocator@2.0",
         "android.hardware.graphics.mapper@2.0",
-        "android.hardware.graphics.common@1.0",
-    ],
-    static_libs: ["VtsHalHidlTargetTestBase",
-                  "VtsHalMediaOmxV1_0CommonUtil"],
-    cflags: [
-        "-O0",
-        "-g",
-    ],
-    include_dirs: [
-        "frameworks/native/include/media/openmax/",
-        "hardware/interfaces/media/omx/1.0/vts/functional/common",
     ],
 }
 
 cc_test {
     name: "VtsHalMediaOmxV1_0TargetVideoEncTest",
-    defaults: ["hidl_defaults"],
-    srcs: ["VtsHalMediaOmxV1_0TargetVideoEncTest.cpp",
-           "media_video_hidl_test_common.cpp"],
-    shared_libs: [
-        "libbase",
-        "liblog",
-        "libcutils",
-        "libhidlbase",
-        "libhidlmemory",
-        "libhidltransport",
-        "libhwbinder",
-        "libnativehelper",
+    defaults: ["VtsHalMediaOmxV1_0Defaults"],
+    srcs: [
+        "VtsHalMediaOmxV1_0TargetVideoEncTest.cpp",
+        "media_video_hidl_test_common.cpp"
+    ],
+    static_libs: [
         "libnativewindow",
-        "libutils",
-        "libstagefright_foundation",
-        "android.hidl.allocator@1.0",
-        "android.hidl.memory@1.0",
-        "android.hardware.media.omx@1.0",
-        "android.hardware.graphics.bufferqueue@1.0",
         "android.hardware.graphics.mapper@2.0",
     ],
-    static_libs: ["VtsHalHidlTargetTestBase",
-                  "VtsHalMediaOmxV1_0CommonUtil"],
-    cflags: [
-        "-O0",
-        "-g",
-    ],
-    include_dirs: [
-        "frameworks/native/include/media/openmax/",
-        "hardware/interfaces/media/omx/1.0/vts/functional/common",
-    ],
 }