Christopher Wiley 1ff75bde48 Add demonstration unittest for TetherInterfaceSM
( cherry-pick of 1cc6ffd2b32846996520fdf43125da3ec2bbdf49 )

Prove that the concept works by writing a trivial test.

Bug: 28833951
Test: `runtest frameworks-services -c
  com.android.server.connectivity.tethering.TetherInterfaceSMTest`

Change-Id: I51911cef7f0d5165221845070befd085497c21a6
2016-06-07 09:28:13 -07:00

82 lines
1.8 KiB
Makefile

#########################################################################
# Build FrameworksServicesTests package
#########################################################################
LOCAL_PATH:= $(call my-dir)
include $(CLEAR_VARS)
# We only want this apk build for tests.
LOCAL_MODULE_TAGS := tests
# Include all test java files.
LOCAL_SRC_FILES := $(call all-java-files-under, src)
LOCAL_STATIC_JAVA_LIBRARIES := \
frameworks-base-testutils \
services.core \
services.devicepolicy \
services.net \
services.usage \
easymocklib \
guava \
android-support-test \
mockito-target \
ShortcutManagerTestUtils
LOCAL_JAVA_LIBRARIES := android.test.runner
LOCAL_PACKAGE_NAME := FrameworksServicesTests
LOCAL_CERTIFICATE := platform
# These are not normally accessible from apps so they must be explicitly included.
LOCAL_JNI_SHARED_LIBRARIES := libservicestestsjni \
libbacktrace \
libbase \
libbinder \
libc++ \
libcutils \
liblog \
liblzma \
libnativehelper \
libnetdaidl \
libui \
libunwind \
libutils
LOCAL_ADDITIONAL_DEPENDENCIES := $(LOCAL_PATH)/Android.mk
include $(BUILD_PACKAGE)
#########################################################################
# Build JNI Shared Library
#########################################################################
LOCAL_PATH:= $(LOCAL_PATH)/jni
include $(CLEAR_VARS)
LOCAL_MODULE_TAGS := tests
LOCAL_CFLAGS := -Wall -Wextra -Werror
LOCAL_C_INCLUDES := \
libpcap \
hardware/google/apf
LOCAL_SRC_FILES := $(call all-cpp-files-under)
LOCAL_SHARED_LIBRARIES := \
libbinder \
libcutils \
libnativehelper \
libnetdaidl
LOCAL_STATIC_LIBRARIES := \
libpcap \
libapf
LOCAL_MODULE := libservicestestsjni
include $(BUILD_SHARED_LIBRARY)