Welcome to mirror list, hosted at ThFree Co, Russian Federation.

github.com/mapsme/omim.git - Unnamed repository; edit this file 'description' to name the repository.
summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorVladimir Byko-Ianko <v.bykoianko@corp.mail.ru>2015-10-02 09:10:49 +0300
committerVladimir Byko-Ianko <v.bykoianko@corp.mail.ru>2015-10-02 09:10:49 +0300
commit76887ab1ec40fdf24c52cdd7c606790273d3ceda (patch)
tree62eeffc07ee973a0d71bfce9fc09a430b34ee6b7 /android/UnitTests
parent40309537ee396bd0d6c00e9b4246a5d0187720b9 (diff)
Fixing unit and integration test for Android.
Diffstat (limited to 'android/UnitTests')
-rw-r--r--android/UnitTests/build.gradle2
-rw-r--r--android/UnitTests/jni/Android.mk6
-rw-r--r--android/UnitTests/jni/AndroidBeginning.mk4
-rw-r--r--android/UnitTests/jni/main.cpp4
-rw-r--r--android/UnitTests/jni/mock.cpp6
-rw-r--r--android/UnitTests/src/com/mapswithme/maps/unittests/AllTestsActivity.java2
-rw-r--r--android/UnitTests/tests_list.sh2
7 files changed, 16 insertions, 10 deletions
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 <android_native_app_glue.h>
@@ -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/)