diff --git a/android/UnitTests/build.gradle b/android/UnitTests/build.gradle index 1a894d109a..cc8604eba6 100644 --- a/android/UnitTests/build.gradle +++ b/android/UnitTests/build.gradle @@ -79,7 +79,7 @@ android { } def NUM_OF_PARALLEL_MAKE_TASKS = Runtime.runtime.availableProcessors() + 1 -def INTEGRATION_TESTS_BUILD = '../../integration_tests/' +def INTEGRATION_TESTS_BUILD = '../../routing/routing_integration_tests/' Properties properties = new Properties() properties.load(project.rootProject.file('local.properties').newDataInputStream()) def NDK_BUILD = properties.getProperty('ndk.dir') + '/ndk-build' diff --git a/android/UnitTests/jni/Android.mk b/android/UnitTests/jni/Android.mk index 9928732568..59fb0f5a9b 100644 --- a/android/UnitTests/jni/Android.mk +++ b/android/UnitTests/jni/Android.mk @@ -7,8 +7,8 @@ MY_PREBUILT_LIBS_PATH := ../libs/tmp/$(TARGET_ARCH_ABI) $(info $(MY_PREBUILT_LIBS_PATH)) include $(CLEAR_VARS) -LOCAL_MODULE := integration_tests -LOCAL_SRC_FILES := $(MY_PREBUILT_LIBS_PATH)/libintegration_tests.so +LOCAL_MODULE := routing_integration_tests +LOCAL_SRC_FILES := $(MY_PREBUILT_LIBS_PATH)/librouting_integration_tests.so include $(PREBUILT_SHARED_LIBRARY) include $(CLEAR_VARS) @@ -27,6 +27,6 @@ LOCAL_SRC_FILES := ./main.cpp LOCAL_STATIC_LIBRARIES := android_native_app_glue # todo(vbykoianko) extract the names of the libs from tests_list.sh -LOCAL_SHARED_LIBRARIES := integration_tests indexer_tests +LOCAL_SHARED_LIBRARIES := routing_integration_tests indexer_tests include ./jni/AndroidEnding.mk diff --git a/android/UnitTests/jni/AndroidBeginning.mk b/android/UnitTests/jni/AndroidBeginning.mk index 15d49363f5..e0dca37833 100644 --- a/android/UnitTests/jni/AndroidBeginning.mk +++ b/android/UnitTests/jni/AndroidBeginning.mk @@ -23,7 +23,7 @@ define add_prebuild_static_lib include $(PREBUILT_STATIC_LIBRARY) endef -prebuild_static_libs := osrm protobuf tomcrypt jansson bzip2 zlib fribidi freetype expat base coding geometry anim platform graphics indexer storage search routing gui map stats_client succinct +prebuild_static_libs := minizip osrm protobuf tomcrypt jansson fribidi freetype expat base coding geometry anim platform graphics indexer storage search routing gui map opening_hours stats_client succinct $(foreach item,$(prebuild_static_libs),$(eval $(call add_prebuild_static_lib,$(item)))) @@ -60,5 +60,5 @@ LOCAL_SRC_FILES += $(ROOT_PATH_FROM_JNI)/android/UnitTests/jni/mock.cpp LOCAL_SRC_FILES += ./test.cpp LOCAL_LDLIBS := -llog -landroid -lEGL -lGLESv1_CM -LOCAL_LDLIBS += -lGLESv2 -latomic +LOCAL_LDLIBS += -lGLESv2 -latomic -lz LOCAL_LDLIBS += -Wl,--gc-sections diff --git a/android/UnitTests/jni/main.cpp b/android/UnitTests/jni/main.cpp index 6f2d5d0207..aec938c744 100644 --- a/android/UnitTests/jni/main.cpp +++ b/android/UnitTests/jni/main.cpp @@ -1,7 +1,7 @@ // @todo(vbykoianko) this file should be generated with a script based on tests_list.sh #include "mock.hpp" -#include "integration_tests/jni/test.hpp" +#include "routing/routing_integration_tests/jni/test.hpp" #include "indexer/indexer_tests/jni/test.hpp" #include @@ -12,7 +12,7 @@ void android_main(struct android_app * state) // Make sure glue isn't stripped. app_dummy(); - integration_tests::test(state); + routing_integration_tests::test(state); indexer_tests::test(state); // @todo(vbykoianko) Take care of correctly leaving the activity after all tests have diff --git a/android/UnitTests/jni/mock.cpp b/android/UnitTests/jni/mock.cpp index acac3a88eb..2177ea92a2 100644 --- a/android/UnitTests/jni/mock.cpp +++ b/android/UnitTests/jni/mock.cpp @@ -226,6 +226,12 @@ void Platform::RunOnGuiThread(TFunctor const & fn) LOG(LWARNING, ("Platform::RunOnGuiThread() is not implemented.")); } +Platform::EConnectionType Platform::ConnectionStatus() +{ + LOG(LWARNING, ("Platform::ConnectionStatus() is not implemented.")); + return Platform::EConnectionType::CONNECTION_NONE; +} + JavaVM * GetJVM() { LOG(LWARNING, ("GetJVM() returns nullptr.")); diff --git a/android/UnitTests/src/com/mapswithme/maps/unittests/AllTestsActivity.java b/android/UnitTests/src/com/mapswithme/maps/unittests/AllTestsActivity.java index c4505adbc5..87f9d53ef0 100644 --- a/android/UnitTests/src/com/mapswithme/maps/unittests/AllTestsActivity.java +++ b/android/UnitTests/src/com/mapswithme/maps/unittests/AllTestsActivity.java @@ -4,7 +4,7 @@ package com.mapswithme.maps.unittests; public class AllTestsActivity extends android.app.NativeActivity { static { - System.loadLibrary("integration_tests"); + System.loadLibrary("routing_integration_tests"); System.loadLibrary("indexer_tests"); System.loadLibrary("all_tests"); } diff --git a/android/UnitTests/tests_list.sh b/android/UnitTests/tests_list.sh index d5b625e4b2..a7e34f68ad 100644 --- a/android/UnitTests/tests_list.sh +++ b/android/UnitTests/tests_list.sh @@ -9,4 +9,4 @@ MY_PATH=$(dirname "$0") # relative MY_PATH="`( cd \"$MY_PATH\" && pwd )`" # absolutized and normalized -declare -r TESTS_LIST=($MY_PATH/../../integration_tests/ $MY_PATH/../../indexer/indexer_tests/) +declare -r TESTS_LIST=($MY_PATH/../../routing/routing_integration_tests/ $MY_PATH/../../indexer/indexer_tests/) diff --git a/indexer/indexer_tests/jni/Android.mk b/indexer/indexer_tests/jni/Android.mk index 5211049c1a..e3b7a7cfc0 100644 --- a/indexer/indexer_tests/jni/Android.mk +++ b/indexer/indexer_tests/jni/Android.mk @@ -10,6 +10,6 @@ include ../../android/UnitTests/jni/AndroidBeginning.mk LOCAL_MODULE := indexer_tests -LOCAL_STATIC_LIBRARIES := android_native_app_glue indexer platform geometry coding base protobuf tomcrypt zlib +LOCAL_STATIC_LIBRARIES := android_native_app_glue indexer platform geometry coding base protobuf tomcrypt opening_hours minizip zlib include ../../android/UnitTests/jni/AndroidEnding.mk diff --git a/omim.pro b/omim.pro index 31dd885dd5..9b420c8bbb 100644 --- a/omim.pro +++ b/omim.pro @@ -38,7 +38,7 @@ SUBDIRS += storage CONFIG(gtool):!CONFIG(no-tests) { SUBDIRS += search SUBDIRS += map - SUBDIRS += integration_tests + SUBDIRS += routing/routing_integration_tests } CONFIG(desktop) { diff --git a/routing/routing_integration_tests/jni/Android.mk b/routing/routing_integration_tests/jni/Android.mk index 0eb13287d1..4f2a2186c3 100644 --- a/routing/routing_integration_tests/jni/Android.mk +++ b/routing/routing_integration_tests/jni/Android.mk @@ -5,11 +5,11 @@ # - there are additional libs here (android_native_app_glue and zlib); LOCAL_PATH := $(call my-dir) -ROOT_PATH := .. -include ../android/UnitTests/jni/AndroidBeginning.mk +ROOT_PATH := ../.. +include ../../android/UnitTests/jni/AndroidBeginning.mk -LOCAL_MODULE := integration_tests +LOCAL_MODULE := routing_integration_tests -LOCAL_STATIC_LIBRARIES := android_native_app_glue base tomcrypt map routing search storage geometry osrm jansson indexer protobuf succinct stats_client platform coding zlib +LOCAL_STATIC_LIBRARIES := android_native_app_glue base tomcrypt map routing search storage geometry osrm jansson indexer protobuf succinct stats_client platform coding opening_hours minizip zlib -include ../android/UnitTests/jni/AndroidEnding.mk +include ../../android/UnitTests/jni/AndroidEnding.mk diff --git a/routing/routing_integration_tests/jni/Application.mk b/routing/routing_integration_tests/jni/Application.mk index c481657457..43a1529450 120000 --- a/routing/routing_integration_tests/jni/Application.mk +++ b/routing/routing_integration_tests/jni/Application.mk @@ -1 +1 @@ -../../android/UnitTests/jni/Application.mk \ No newline at end of file +../../../android/UnitTests/jni/Application.mk \ No newline at end of file diff --git a/routing/routing_integration_tests/jni/test.cpp b/routing/routing_integration_tests/jni/test.cpp index d8f99b13ec..2167640aa7 100644 --- a/routing/routing_integration_tests/jni/test.cpp +++ b/routing/routing_integration_tests/jni/test.cpp @@ -5,7 +5,7 @@ extern int main(int argc, char * argv[]); -namespace integration_tests +namespace routing_integration_tests { void test(android_app * state) { diff --git a/routing/routing_integration_tests/jni/test.hpp b/routing/routing_integration_tests/jni/test.hpp index 4aa2fa842d..d74fc3f593 100644 --- a/routing/routing_integration_tests/jni/test.hpp +++ b/routing/routing_integration_tests/jni/test.hpp @@ -3,7 +3,7 @@ struct android_app; -namespace integration_tests +namespace routing_integration_tests { void test(android_app * state); }