Add end to end test from direct surface to final display.
Test: mma, manually push and run the binary in a rooted 8.1.0 phone
Visually check the screen display red color.
Bug: 69267804
Change-Id: I0200bd6b7d4809919e62f3e0df44b1ee572f2eee
diff --git a/libs/vr/libdvr/tests/Android.mk b/libs/vr/libdvr/tests/Android.mk
index b3fae47..0f3840d 100644
--- a/libs/vr/libdvr/tests/Android.mk
+++ b/libs/vr/libdvr/tests/Android.mk
@@ -14,6 +14,9 @@
LOCAL_PATH:= $(call my-dir)
+# TODO(b/73133405): Currently, building cc_test against NDK using Android.bp
+# doesn't work well. Migrate to use Android.bp once b/73133405 gets fixed.
+
include $(CLEAR_VARS)
LOCAL_MODULE:= dvr_buffer_queue-test
@@ -25,8 +28,7 @@
LOCAL_SANITIZE := thread
-LOCAL_SRC_FILES := \
- dvr_buffer_queue-test.cpp \
+LOCAL_SRC_FILES := dvr_buffer_queue-test.cpp
LOCAL_SHARED_LIBRARIES := \
libandroid \
@@ -41,6 +43,31 @@
LOCAL_SDK_VERSION := 26
LOCAL_NDK_STL_VARIANT := c++_static
-# TODO(b/73133405): Currently, builing cc_test against NDK using Android.bp
-# doesn't work well. Migrate to use Android.bp once b/73133405 gets fixed.
include $(BUILD_NATIVE_TEST)
+
+
+include $(CLEAR_VARS)
+LOCAL_MODULE:= dvr_display-test
+
+LOCAL_C_INCLUDES := \
+ frameworks/native/libs/vr/libdvr/include \
+ frameworks/native/libs/nativewindow/include
+
+LOCAL_SANITIZE := thread
+
+LOCAL_SRC_FILES := dvr_display-test.cpp
+
+LOCAL_SHARED_LIBRARIES := \
+ libandroid \
+ liblog
+
+LOCAL_CFLAGS := \
+ -DTRACE=0 \
+ -O2 \
+ -g
+
+# DTS Should only link to NDK libraries.
+LOCAL_SDK_VERSION := 26
+LOCAL_NDK_STL_VARIANT := c++_static
+
+include $(BUILD_NATIVE_TEST)
\ No newline at end of file