I have an Android.mk, which builds some library:
ifeq ($(CONDITION),something)
LOCAL_PATH := $(call my-dir)
include $(CLEAR_VARS)
BDROID_DIR := $(TOP_DIR)system/bt
LOCAL_CFLAGS += \
-Wall \
-Werror
LOCAL_SRC_FILES := ...
LOCAL_HEADER_LIBRARIES := libutils_headers
LOCAL_C_INCLUDES += ...
LOCAL_SHARED_LIBRARIES := \
libcutils \
liblog
LOCAL_MODULE := libowner-vendor
LOCAL_MODULE_CLASS := SHARED_LIBRARIES
LOCAL_MODULE_OWNER := owner
LOCAL_PROPRIETARY_MODULE := true
include $(BUILD_SHARED_LIBRARY)
include $(call first-makefiles-under,$(LOCAL_PATH))
endif
I want to add a test module to it, preferably cc_test, because I want to be able to call it using atest utility.
Apparently, simply adding it in the "shared_libs" section like this doesn't work:
Android.bp:
cc_test = {
proprietary: true,
name: "libowner-vendor-test",
cflags: [
"-Werror",
"-Wall",
],
srcs: [...],
shared_libs: [
...,
"libowner-vendor",
],
host_supported: false,
}
Directories structure:
+ lib:
- Android.mk
- ... (sources and headers)
+ lib/test:
-- ... (test sources)
I receive an error:
.../Android.bp:1:1: "libowner-vendor-test" depends on undefined module "libowner-vendor"