]> granicus.if.org Git - libvpx/commitdiff
Tweaks to vpx_test android make file
authorJoshua Litt <joshualitt@google.com>
Thu, 14 Nov 2013 00:30:31 +0000 (16:30 -0800)
committerGerrit Code Review <gerrit@gerrit.golo.chromium.org>
Thu, 14 Nov 2013 21:30:28 +0000 (13:30 -0800)
  * Change from thumb mode to arm mode improves test time significantly
  * Direct inclusion of test.mk allows for unit test configuration via
    configure script
Change-Id: Id58d3ba8289374528756a672459d8334afe20e2a

test/android/Android.mk
test/android/README

index 8d8ce163d97786c76ab892bb930959524c53e5e2..13af601e2c54018fb88ae9b3be9d8a505623ad20 100644 (file)
@@ -10,9 +10,6 @@
 # The test app itself runs on the command line through adb shell
 # The paths are really messed up as the libvpx make file
 # expects to be made from a parent directory.
-# TODO(joshualitt)
-# Fix android make files so they can be built from anywhere, will require
-# changing the libvpx make file and this one.
 CUR_WD := $(call my-dir)
 BINDINGS_DIR := $(CUR_WD)/../../..
 LOCAL_PATH := $(CUR_WD)/../../..
@@ -20,12 +17,11 @@ LOCAL_PATH := $(CUR_WD)/../../..
 #libvpx
 include $(CLEAR_VARS)
 include $(BINDINGS_DIR)/libvpx/build/make/Android.mk
-# Restore path
-# TODO joshualitt Fix makefiles so this is no longer needed
 LOCAL_PATH := $(CUR_WD)/../..
 
 #libgtest
 include $(CLEAR_VARS)
+LOCAL_ARM_MODE := arm
 LOCAL_CPP_EXTENSION := .cc
 LOCAL_MODULE := gtest
 LOCAL_C_INCLUDES := $(LOCAL_PATH)/third_party/googletest/src/
@@ -33,31 +29,14 @@ LOCAL_C_INCLUDES += $(LOCAL_PATH)/third_party/googletest/src/include/
 LOCAL_SRC_FILES := ./third_party/googletest/src/src/gtest-all.cc
 include $(BUILD_STATIC_LIBRARY)
 
-#libnestegg
-include $(CLEAR_VARS)
-LOCAL_CPP_EXTENSION := .cc
-LOCAL_MODULE := nestegg
-NESTEGG_PATH := $(LOCAL_PATH)/nestegg
-LOCAL_C_INCLUDES := $(NESTEGG_PATH)/include
-LOCAL_C_INCLUDES += $(LOCAL_PATH)/
-LOCAL_C_INCLUDES += $(NESTEGG_PATH)/halloc/
-LOCAL_SRC_FILES := ./nestegg/halloc/src/halloc.c
-LOCAL_SRC_FILES += ./nestegg/src/nestegg.c
-include $(BUILD_STATIC_LIBRARY)
-
 #libvpx_test
 include $(CLEAR_VARS)
+LOCAL_ARM_MODE := arm
 LOCAL_MODULE := libvpx_test
 LOCAL_STATIC_LIBRARIES := gtest
-LOCAL_STATIC_LIBRARIES += nestegg
-LOCAL_STATIC_LIBRARIES += cpufeatures
 LOCAL_SHARED_LIBRARIES := vpx
-LOCAL_C_INCLUDES := $(LOCAL_PATH)/
-LOCAL_C_INCLUDES += $(BINDINGS_DIR)/
-LOCAL_C_INCLUDES += $(LOCAL_PATH)/third_party/googletest/src/include
-LOCAL_SRC_FILES := ./args.c
-LOCAL_SRC_FILES += ./md5_utils.c
-LOCAL_SRC_FILES += ./test/decode_test_driver.cc
-LOCAL_SRC_FILES += ./test/test_libvpx.cc
-LOCAL_SRC_FILES += ./test/test_vector_test.cc
+include $(LOCAL_PATH)/test/test.mk
+LOCAL_C_INCLUDES := $(BINDINGS_DIR)
+FILTERED_SRC := $(sort $(filter %.cc %.c, $(LIBVPX_TEST_SRCS-yes)))
+LOCAL_SRC_FILES := $(addprefix ./test/, $(FILTERED_SRC))
 include $(BUILD_EXECUTABLE)
index 8bc1569abdb00901aa83f759d1efc9600b7e5af2..6840d911c468da5255aa3cdca8ee1677edd6ab5d 100644 (file)
@@ -1,23 +1,31 @@
 Android.mk will build vpx unittests on android.
-1) configure libvpx from the parent directory:
-./libvpx/configure --target=armv7-android-gcc --enable-external-build --enable-postproc --disable-install-srcs --enable-multi-res-encoding --enable-temporal-denoising --disable-unit-tests --disable-install-docs --disable-examples --disable-runtime-cpu-detect --sdk=$NDK
+1) Configure libvpx from the parent directory:
+./libvpx/configure --target=armv7-android-gcc --enable-external-build \
+  --enable-postproc --disable-install-srcs --enable-multi-res-encoding \
+  --enable-temporal-denoising --disable-unit-tests --disable-install-docs \
+  --disable-examples --disable-runtime-cpu-detect --sdk=$NDK
 
-2) from the parent directory, invoke ndk-build:
-NDK_PROJECT_PATH=. ndk-build APP_BUILD_SCRIPT=./libvpx/test/android/Android.mk APP_ABI=armeabi-v7a APP_PLATFORM=android-18 APP_OPTIM=release APP_STL=gnustl_static APP_CPPFLAGS=-frtti
+2) From the parent directory, invoke ndk-build:
+NDK_PROJECT_PATH=. ndk-build APP_BUILD_SCRIPT=./libvpx/test/android/Android.mk \
+  APP_ABI=armeabi-v7a APP_PLATFORM=android-18 APP_OPTIM=release \
+  APP_STL=gnustl_static
 
-3) Run get_files.py to download the test files:
-python get_files.py -i /path/to/test-data.sha1 -o /path/to/put/files -u http://libvpx-test-file-url
+Note: Both adb and ndk-build are available prebuilt at:
+  https://chromium.googlesource.com/android_tools
 
-NOTE: currently the url of the test files is http://downloads.webmproject.org/test_data/libvpx
+3) Run get_files.py to download the test files:
+python get_files.py -i /path/to/test-data.sha1 -o /path/to/put/files \
+  -u http://downloads.webmproject.org/test_data/libvpx
 
-4) transfer files to device using adb.  Currently, I put these files in /data/local/tmp
+4) Transfer files to device using adb. Ensure you have proper permissions for
+the target
 
 adb push /path/to/test_files /data/local/tmp
 adb push /path/to/built_libs /data/local/tmp
 
 NOTE: Built_libs defaults to parent_dir/libs/armeabi-v7a
 
-5) run tests:
+5) Run tests:
 adb shell
 (on device)
 cd /data/local/tmp