diff options
author | 2017-10-26 15:01:12 -0700 | |
---|---|---|
committer | 2017-10-26 15:01:12 -0700 | |
commit | da3ad6f7d32534c7979f9e11111634bf93b2317c (patch) | |
tree | 374de4e1b8f1316eed2c931335d060a56cb1c76b | |
parent | 263921f53cdddc6becac4bfa07e3fb27764adc12 (diff) |
Convert tests to Android.bp
Test: make
adb shell stop; adb sync; adb shell start
- wait for device to finish
adb shell /data/nativetest/angeles/angeles
adb shell /data/nativetest/test-opengl-configdump/test-opengl-configdump
adb shell /data/nativetest/EGL_test/EGL_test
adb shell /data/nativetest/test-opengl-fillrate/test-opengl-fillrate
adb shell /data/nativetest/test-opengl-filter/test-opengl-filter 3
adb shell /data/nativetest/test-opengl-filter/test-opengl-filter 3 pbuffer
adb shell /data/nativetest/test-opengl-finish/test-opengl-finish
adb shell /data/nativetest/test-opengl-gl2_basic/test-opengl-gl2_basic
adb shell /data/nativetest/test-opengl-gl2_copyTexImage/test-opengl-gl2_copyTexImage
adb shell /data/nativetest/test-opengl-gl2_yuvtex/test-opengl-gl2_yuvtex
adb shell /data/nativetest/test-opengl-gl_basic/test-opengl-gl_basic
adb shell /data/nativetest/test-opengl-gl2_perf/test-opengl-gl2_perf
adb shell /data/nativetest/test-opengl-gl_yuvtex/test-opengl-gl_yuvtex
adb shell /data/nativetest/test-opengl-gralloc/test-opengl-gralloc
Bug: 37512442
Change-Id: I5d7b974333f485570304728d0572e251bb576f7e
Merged-In: I5d7b974333f485570304728d0572e251bb576f7e
(cherry picked from commit 03d9f07200796e5c436e28325b6b120e3c14c6e9)
29 files changed, 283 insertions, 326 deletions
diff --git a/opengl/tests/Android.bp b/opengl/tests/Android.bp index bf7aeb117f..639f351c69 100644 --- a/opengl/tests/Android.bp +++ b/opengl/tests/Android.bp @@ -1,4 +1,19 @@ + subdirs = [ + "angeles", + "configdump", + "EGLTest", + "fillrate", + "filter", + "finish", + "gl2_basic", + "gl2_copyTexImage", + "gl2_yuvtex", + "gl_basic", + "gl_perf", + "gl_yuvtex", // just renders magenta frame, broken? + "gralloc", "hwc", "lib", ] + diff --git a/opengl/tests/Android.mk b/opengl/tests/Android.mk index 92d223cc7e..134854a8b7 100644 --- a/opengl/tests/Android.mk +++ b/opengl/tests/Android.mk @@ -1,19 +1,4 @@ dirs := \ - angeles \ - configdump \ - EGLTest \ - fillrate \ - filter \ - finish \ - gl2_basic \ - gl2_copyTexImage \ - gl2_yuvtex \ - gl_basic \ - gl_perf \ - gl_yuvtex \ - gralloc \ - include \ - lib \ linetex \ swapinterval \ textures \ diff --git a/opengl/tests/EGLTest/Android.bp b/opengl/tests/EGLTest/Android.bp new file mode 100644 index 0000000000..d85af81b6b --- /dev/null +++ b/opengl/tests/EGLTest/Android.bp @@ -0,0 +1,31 @@ + +cc_test { + + name: "EGL_test", + + srcs: [ + "egl_cache_test.cpp", + "EGL_test.cpp", + ], + + shared_libs: [ + "android.hardware.configstore@1.0", + "android.hardware.configstore-utils", + "libEGL", + "libbase", + "libcutils", + "libbinder", + "libgui", + "libhidlbase", + "libhidltransport", + "liblog", + "libutils", + ], + + include_dirs: [ + "bionic/libc/private", + "frameworks/native/opengl/libs", + "frameworks/native/opengl/libs/EGL", + ], + +} diff --git a/opengl/tests/EGLTest/Android.mk b/opengl/tests/EGLTest/Android.mk deleted file mode 100644 index 5620496e17..0000000000 --- a/opengl/tests/EGLTest/Android.mk +++ /dev/null @@ -1,44 +0,0 @@ -# Build the unit tests. -LOCAL_PATH:= $(call my-dir) -include $(CLEAR_VARS) -LOCAL_ADDITIONAL_DEPENDENCIES := $(LOCAL_PATH)/Android.mk - -LOCAL_MODULE := EGL_test - -LOCAL_MODULE_TAGS := tests - -LOCAL_SRC_FILES := \ - egl_cache_test.cpp \ - EGL_test.cpp \ - -LOCAL_SHARED_LIBRARIES := \ - android.hardware.configstore@1.0 \ - android.hardware.configstore-utils \ - libEGL \ - libcutils \ - libbinder \ - libhidlbase \ - libhidltransport \ - libutils \ - libgui \ - libbase \ - liblog \ - -LOCAL_C_INCLUDES := \ - bionic/libc/private \ - frameworks/native/opengl/libs \ - frameworks/native/opengl/libs/EGL \ - -# gold in binutils 2.22 will warn about the usage of mktemp -LOCAL_LDFLAGS += -Wl,--no-fatal-warnings - -include $(BUILD_NATIVE_TEST) - -# Include subdirectory makefiles -# ============================================================ - -# If we're building with ONE_SHOT_MAKEFILE (mm, mmm), then what the framework -# team really wants is to build the stuff defined by this makefile. -ifeq (,$(ONE_SHOT_MAKEFILE)) -include $(call first-makefiles-under,$(LOCAL_PATH)) -endif diff --git a/opengl/tests/angeles/Android.bp b/opengl/tests/angeles/Android.bp new file mode 100644 index 0000000000..bbbc447c07 --- /dev/null +++ b/opengl/tests/angeles/Android.bp @@ -0,0 +1,22 @@ +// Copyright 2006 The Android Open Source Project + +cc_test { + name: "angeles", + + srcs: [ + "app-linux.cpp", + "demo.c", + ], + + gtest: false, + + shared_libs: [ + "libEGL", + "libGLESv1_CM", + "libui", + "libgui", + "libutils", + ], + + static_libs: ["libglTest"], +} diff --git a/opengl/tests/angeles/Android.mk b/opengl/tests/angeles/Android.mk deleted file mode 100644 index c78224ee18..0000000000 --- a/opengl/tests/angeles/Android.mk +++ /dev/null @@ -1,11 +0,0 @@ -# Copyright 2006 The Android Open Source Project - -LOCAL_PATH:= $(call my-dir) -include $(CLEAR_VARS) -LOCAL_SRC_FILES:= app-linux.cpp demo.c.arm -LOCAL_SHARED_LIBRARIES := libEGL libGLESv1_CM libui libgui libutils -LOCAL_STATIC_LIBRARIES += libglTest -LOCAL_C_INCLUDES += $(call include-path-for, opengl-tests-includes) -LOCAL_MODULE:= angeles -LOCAL_MODULE_TAGS := optional -include $(BUILD_EXECUTABLE) diff --git a/opengl/tests/configdump/Android.bp b/opengl/tests/configdump/Android.bp new file mode 100644 index 0000000000..c46477cc53 --- /dev/null +++ b/opengl/tests/configdump/Android.bp @@ -0,0 +1,13 @@ +cc_test { + name: "test-opengl-configdump", + + gtest: false, + + srcs: ["configdump.cpp"], + + shared_libs: [ + "libcutils", + "libEGL", + "libGLESv1_CM", + ], +} diff --git a/opengl/tests/configdump/Android.mk b/opengl/tests/configdump/Android.mk deleted file mode 100644 index 3f7c915b41..0000000000 --- a/opengl/tests/configdump/Android.mk +++ /dev/null @@ -1,16 +0,0 @@ -LOCAL_PATH:= $(call my-dir) -include $(CLEAR_VARS) - -LOCAL_SRC_FILES:= \ - configdump.cpp - -LOCAL_SHARED_LIBRARIES := \ - libcutils \ - libEGL \ - libGLESv1_CM - -LOCAL_MODULE:= test-opengl-configdump - -LOCAL_MODULE_TAGS := optional - -include $(BUILD_EXECUTABLE) diff --git a/opengl/tests/fillrate/Android.bp b/opengl/tests/fillrate/Android.bp new file mode 100644 index 0000000000..543f1e3de2 --- /dev/null +++ b/opengl/tests/fillrate/Android.bp @@ -0,0 +1,18 @@ +cc_test { + name: "test-opengl-fillrate", + + srcs: ["fillrate.cpp"], + + gtest: false, + + shared_libs: [ + "libcutils", + "libutils", + "libEGL", + "libGLESv1_CM", + "libui", + "libgui", + ], + + static_libs: ["libglTest"], +} diff --git a/opengl/tests/fillrate/Android.mk b/opengl/tests/fillrate/Android.mk deleted file mode 100644 index 21ff52a9a6..0000000000 --- a/opengl/tests/fillrate/Android.mk +++ /dev/null @@ -1,23 +0,0 @@ -LOCAL_PATH:= $(call my-dir) -include $(CLEAR_VARS) - -LOCAL_SRC_FILES:= \ - fillrate.cpp - -LOCAL_SHARED_LIBRARIES := \ - libcutils \ - libutils \ - libEGL \ - libGLESv1_CM \ - libui \ - libgui - -LOCAL_STATIC_LIBRARIES += libglTest - -LOCAL_C_INCLUDES += $(call include-path-for, opengl-tests-includes) - -LOCAL_MODULE:= test-opengl-fillrate - -LOCAL_MODULE_TAGS := optional - -include $(BUILD_EXECUTABLE) diff --git a/opengl/tests/filter/Android.bp b/opengl/tests/filter/Android.bp new file mode 100644 index 0000000000..5f925c856b --- /dev/null +++ b/opengl/tests/filter/Android.bp @@ -0,0 +1,20 @@ +cc_test { + name: "test-opengl-filter", + + srcs: ["filter.cpp"], + + gtest: false, + + shared_libs: [ + "libcutils", + "libEGL", + "libGLESv1_CM", + "libui", + "libgui", + "libutils", + ], + + static_libs: ["libglTest"], + + cflags: ["-DGL_GLEXT_PROTOTYPES"], +} diff --git a/opengl/tests/filter/Android.mk b/opengl/tests/filter/Android.mk deleted file mode 100644 index 4cf9c962de..0000000000 --- a/opengl/tests/filter/Android.mk +++ /dev/null @@ -1,25 +0,0 @@ -LOCAL_PATH:= $(call my-dir) -include $(CLEAR_VARS) - -LOCAL_SRC_FILES:= \ - filter.cpp - -LOCAL_SHARED_LIBRARIES := \ - libcutils \ - libEGL \ - libGLESv1_CM \ - libui \ - libgui \ - libutils - -LOCAL_STATIC_LIBRARIES += libglTest - -LOCAL_C_INCLUDES += $(call include-path-for, opengl-tests-includes) - -LOCAL_MODULE:= test-opengl-filter - -LOCAL_MODULE_TAGS := optional - -LOCAL_CFLAGS := -DGL_GLEXT_PROTOTYPES - -include $(BUILD_EXECUTABLE) diff --git a/opengl/tests/finish/Android.bp b/opengl/tests/finish/Android.bp new file mode 100644 index 0000000000..fb5671de4b --- /dev/null +++ b/opengl/tests/finish/Android.bp @@ -0,0 +1,20 @@ +cc_test { + name: "test-opengl-finish", + + srcs: ["finish.cpp"], + + gtest: false, + + shared_libs: [ + "libcutils", + "libutils", + "libEGL", + "libGLESv1_CM", + "libui", + "libgui", + ], + + static_libs: ["libglTest"], + + cflags: ["-DGL_GLEXT_PROTOTYPES"], +} diff --git a/opengl/tests/finish/Android.mk b/opengl/tests/finish/Android.mk deleted file mode 100644 index 0b9b7ea255..0000000000 --- a/opengl/tests/finish/Android.mk +++ /dev/null @@ -1,25 +0,0 @@ -LOCAL_PATH:= $(call my-dir) -include $(CLEAR_VARS) - -LOCAL_SRC_FILES:= \ - finish.cpp - -LOCAL_SHARED_LIBRARIES := \ - libcutils \ - libutils \ - libEGL \ - libGLESv1_CM \ - libui \ - libgui - -LOCAL_STATIC_LIBRARIES += libglTest - -LOCAL_C_INCLUDES += $(call include-path-for, opengl-tests-includes) - -LOCAL_MODULE:= test-opengl-finish - -LOCAL_MODULE_TAGS := optional - -LOCAL_CFLAGS := -DGL_GLEXT_PROTOTYPES - -include $(BUILD_EXECUTABLE) diff --git a/opengl/tests/gl2_basic/Android.bp b/opengl/tests/gl2_basic/Android.bp new file mode 100644 index 0000000000..74032716b6 --- /dev/null +++ b/opengl/tests/gl2_basic/Android.bp @@ -0,0 +1,20 @@ +cc_test { + name: "test-opengl-gl2_basic", + + srcs: ["gl2_basic.cpp"], + + gtest: false, + + shared_libs: [ + "libcutils", + "libEGL", + "libGLESv2", + "libui", + "libgui", + "libutils", + ], + + static_libs: ["libglTest"], + + cflags: ["-DGL_GLEXT_PROTOTYPES"], +} diff --git a/opengl/tests/gl2_basic/Android.mk b/opengl/tests/gl2_basic/Android.mk deleted file mode 100644 index 520395c041..0000000000 --- a/opengl/tests/gl2_basic/Android.mk +++ /dev/null @@ -1,25 +0,0 @@ -LOCAL_PATH:= $(call my-dir) -include $(CLEAR_VARS) - -LOCAL_SRC_FILES:= \ - gl2_basic.cpp - -LOCAL_SHARED_LIBRARIES := \ - libcutils \ - libEGL \ - libGLESv2 \ - libui \ - libgui \ - libutils - -LOCAL_STATIC_LIBRARIES += libglTest - -LOCAL_C_INCLUDES += $(call include-path-for, opengl-tests-includes) - -LOCAL_MODULE:= test-opengl-gl2_basic - -LOCAL_MODULE_TAGS := optional - -LOCAL_CFLAGS := -DGL_GLEXT_PROTOTYPES - -include $(BUILD_EXECUTABLE) diff --git a/opengl/tests/gl2_copyTexImage/Android.bp b/opengl/tests/gl2_copyTexImage/Android.bp new file mode 100644 index 0000000000..51e269cf5d --- /dev/null +++ b/opengl/tests/gl2_copyTexImage/Android.bp @@ -0,0 +1,20 @@ +cc_test { + name: "test-opengl-gl2_copyTexImage", + + srcs: ["gl2_copyTexImage.cpp"], + + gtest: false, + + shared_libs: [ + "libcutils", + "libEGL", + "libGLESv2", + "libui", + "libgui", + "libutils", + ], + + static_libs: ["libglTest"], + + cflags: ["-DGL_GLEXT_PROTOTYPES"], +} diff --git a/opengl/tests/gl2_copyTexImage/Android.mk b/opengl/tests/gl2_copyTexImage/Android.mk deleted file mode 100644 index ff43558d31..0000000000 --- a/opengl/tests/gl2_copyTexImage/Android.mk +++ /dev/null @@ -1,25 +0,0 @@ -LOCAL_PATH:= $(call my-dir) -include $(CLEAR_VARS) - -LOCAL_SRC_FILES:= \ - gl2_copyTexImage.cpp - -LOCAL_SHARED_LIBRARIES := \ - libcutils \ - libEGL \ - libGLESv2 \ - libui \ - libgui \ - libutils - -LOCAL_STATIC_LIBRARIES += libglTest - -LOCAL_C_INCLUDES += $(call include-path-for, opengl-tests-includes) - -LOCAL_MODULE:= test-opengl-gl2_copyTexImage - -LOCAL_MODULE_TAGS := optional - -LOCAL_CFLAGS := -DGL_GLEXT_PROTOTYPES - -include $(BUILD_EXECUTABLE) diff --git a/opengl/tests/gl2_yuvtex/Android.bp b/opengl/tests/gl2_yuvtex/Android.bp new file mode 100644 index 0000000000..613d678ef7 --- /dev/null +++ b/opengl/tests/gl2_yuvtex/Android.bp @@ -0,0 +1,24 @@ +cc_test { + name: "test-opengl-gl2_yuvtex", + + srcs: ["gl2_yuvtex.cpp"], + + shared_libs: [ + "libcutils", + "libEGL", + "libGLESv2", + "libutils", + "libui", + "libgui", + "libutils", + ], + + gtest: false, + + static_libs: ["libglTest"], + + cflags: [ + "-DGL_GLEXT_PROTOTYPES", + "-DEGL_EGLEXT_PROTOTYPES", + ], +} diff --git a/opengl/tests/gl2_yuvtex/Android.mk b/opengl/tests/gl2_yuvtex/Android.mk deleted file mode 100644 index 42cf771f19..0000000000 --- a/opengl/tests/gl2_yuvtex/Android.mk +++ /dev/null @@ -1,26 +0,0 @@ -LOCAL_PATH:= $(call my-dir) -include $(CLEAR_VARS) - -LOCAL_SRC_FILES:= \ - gl2_yuvtex.cpp - -LOCAL_SHARED_LIBRARIES := \ - libcutils \ - libEGL \ - libGLESv2 \ - libutils \ - libui \ - libgui \ - libutils - -LOCAL_STATIC_LIBRARIES += libglTest - -LOCAL_C_INCLUDES += $(call include-path-for, opengl-tests-includes) - -LOCAL_MODULE:= test-opengl-gl2_yuvtex - -LOCAL_MODULE_TAGS := optional - -LOCAL_CFLAGS := -DGL_GLEXT_PROTOTYPES -DEGL_EGLEXT_PROTOTYPES - -include $(BUILD_EXECUTABLE) diff --git a/opengl/tests/gl_basic/Android.bp b/opengl/tests/gl_basic/Android.bp new file mode 100644 index 0000000000..881d8cea4a --- /dev/null +++ b/opengl/tests/gl_basic/Android.bp @@ -0,0 +1,18 @@ +cc_test { + name: "test-opengl-gl_basic", + + srcs: ["gl_basic.cpp"], + + gtest: false, + + shared_libs: [ + "libcutils", + "libEGL", + "libGLESv1_CM", + "libui", + "libgui", + "libutils", + ], + + static_libs: ["libglTest"], +} diff --git a/opengl/tests/gl_basic/Android.mk b/opengl/tests/gl_basic/Android.mk deleted file mode 100644 index 7f2259e8e0..0000000000 --- a/opengl/tests/gl_basic/Android.mk +++ /dev/null @@ -1,23 +0,0 @@ -LOCAL_PATH:= $(call my-dir) -include $(CLEAR_VARS) - -LOCAL_SRC_FILES:= \ - gl_basic.cpp - -LOCAL_SHARED_LIBRARIES := \ - libcutils \ - libEGL \ - libGLESv1_CM \ - libui \ - libgui \ - libutils - -LOCAL_STATIC_LIBRARIES += libglTest - -LOCAL_C_INCLUDES += $(call include-path-for, opengl-tests-includes) - -LOCAL_MODULE:= test-opengl-gl_basic - -LOCAL_MODULE_TAGS := optional - -include $(BUILD_EXECUTABLE) diff --git a/opengl/tests/gl_perf/Android.bp b/opengl/tests/gl_perf/Android.bp new file mode 100644 index 0000000000..0ffb12158e --- /dev/null +++ b/opengl/tests/gl_perf/Android.bp @@ -0,0 +1,24 @@ +cc_test { + name: "test-opengl-gl2_perf", + + srcs: [ + "gl2_perf.cpp", + "filltest.cpp", + ], + + gtest: false, + + shared_libs: [ + "libcutils", + "liblog", + "libEGL", + "libGLESv2", + "libui", + "libgui", + "libutils", + ], + + static_libs: ["libglTest"], + + cflags: ["-DGL_GLEXT_PROTOTYPES"], +} diff --git a/opengl/tests/gl_perf/Android.mk b/opengl/tests/gl_perf/Android.mk deleted file mode 100644 index 9a93fab9db..0000000000 --- a/opengl/tests/gl_perf/Android.mk +++ /dev/null @@ -1,27 +0,0 @@ -LOCAL_PATH:= $(call my-dir) -include $(CLEAR_VARS) - -LOCAL_SRC_FILES:= \ - gl2_perf.cpp \ - filltest.cpp - -LOCAL_SHARED_LIBRARIES := \ - libcutils \ - liblog \ - libEGL \ - libGLESv2 \ - libui \ - libgui \ - libutils - -LOCAL_STATIC_LIBRARIES += libglTest - -LOCAL_C_INCLUDES += $(call include-path-for, opengl-tests-includes) - -LOCAL_MODULE:= test-opengl-gl2_perf - -LOCAL_MODULE_TAGS := optional - -LOCAL_CFLAGS := -DGL_GLEXT_PROTOTYPES - -include $(BUILD_EXECUTABLE) diff --git a/opengl/tests/gl_yuvtex/Android.bp b/opengl/tests/gl_yuvtex/Android.bp new file mode 100644 index 0000000000..b6be327a25 --- /dev/null +++ b/opengl/tests/gl_yuvtex/Android.bp @@ -0,0 +1,23 @@ +cc_test { + name: "test-opengl-gl_yuvtex", + + srcs: ["gl_yuvtex.cpp"], + + shared_libs: [ + "libcutils", + "libEGL", + "libGLESv1_CM", + "libutils", + "libui", + "libgui", + ], + + gtest: false, + + static_libs: ["libglTest"], + + cflags: [ + "-DGL_GLEXT_PROTOTYPES", + "-DEGL_EGLEXT_PROTOTYPES", + ], +} diff --git a/opengl/tests/gl_yuvtex/Android.mk b/opengl/tests/gl_yuvtex/Android.mk deleted file mode 100644 index 7f2020ab62..0000000000 --- a/opengl/tests/gl_yuvtex/Android.mk +++ /dev/null @@ -1,25 +0,0 @@ -LOCAL_PATH:= $(call my-dir) -include $(CLEAR_VARS) - -LOCAL_SRC_FILES:= \ - gl_yuvtex.cpp - -LOCAL_SHARED_LIBRARIES := \ - libcutils \ - libEGL \ - libGLESv1_CM \ - libutils \ - libui \ - libgui - -LOCAL_STATIC_LIBRARIES += libglTest - -LOCAL_C_INCLUDES += $(call include-path-for, opengl-tests-includes) - -LOCAL_MODULE:= test-opengl-gl_yuvtex - -LOCAL_MODULE_TAGS := optional - -LOCAL_CFLAGS := -DGL_GLEXT_PROTOTYPES -DEGL_EGLEXT_PROTOTYPES - -include $(BUILD_EXECUTABLE) diff --git a/opengl/tests/gralloc/Android.bp b/opengl/tests/gralloc/Android.bp new file mode 100644 index 0000000000..414c80457f --- /dev/null +++ b/opengl/tests/gralloc/Android.bp @@ -0,0 +1,13 @@ +cc_test { + name: "test-opengl-gralloc", + + srcs: ["gralloc.cpp"], + + gtest: false, + + shared_libs: [ + "libcutils", + "libutils", + "libui", + ], +} diff --git a/opengl/tests/gralloc/Android.mk b/opengl/tests/gralloc/Android.mk deleted file mode 100644 index d43c39a462..0000000000 --- a/opengl/tests/gralloc/Android.mk +++ /dev/null @@ -1,16 +0,0 @@ -LOCAL_PATH:= $(call my-dir) -include $(CLEAR_VARS) - -LOCAL_SRC_FILES:= \ - gralloc.cpp - -LOCAL_SHARED_LIBRARIES := \ - libcutils \ - libutils \ - libui - -LOCAL_MODULE:= test-opengl-gralloc - -LOCAL_MODULE_TAGS := optional - -include $(BUILD_EXECUTABLE) diff --git a/opengl/tests/hwc/Android.bp b/opengl/tests/hwc/Android.bp index 425f3740e4..55f058f922 100644 --- a/opengl/tests/hwc/Android.bp +++ b/opengl/tests/hwc/Android.bp @@ -55,6 +55,8 @@ cc_defaults { "libnativewindow" ], + gtest: false, + static_libs: [ "libglTest", "libhwcTest", |