Added Android tests coverage calculation into build

pull/13383/head
Andrey Kamaev 14 years ago
parent d58a5b269d
commit a4af33758d
  1. 1
      OpenCVAndroidProject.cmake
  2. 6
      modules/java/CMakeLists.txt

@ -125,6 +125,7 @@ macro(add_android_project _target _path)
COMMAND ${CMAKE_COMMAND} -E copy "${build_path}/bin/${_target}-debug.apk" "${CMAKE_BINARY_DIR}/bin/${_target}.apk"
WORKING_DIRECTORY ${build_path}
DEPENDS ${${_target}_project_files}
DEPENDS "${LIBRARY_OUTPUT_PATH}/libopencv_java.so"
COMMENT "Generating bin/${_target}.apk"
)

@ -17,6 +17,7 @@ SET(GEN_JAVA "${CMAKE_CURRENT_SOURCE_DIR}/gen_java.py")
SET(HDR_PARSER "${CMAKE_CURRENT_SOURCE_DIR}/../python/src2/hdr_parser.py")
SET(GEN_JAVADOC "${CMAKE_CURRENT_SOURCE_DIR}/gen_javadoc.py")
SET(RST_PARSER "${CMAKE_CURRENT_SOURCE_DIR}/rst_parser.py")
SET(CHECK_TEST_COVERAGE "${CMAKE_CURRENT_SOURCE_DIR}/check-tests.py")
# setup raw java and cpp files generation (without javadoc and at temporary location)
foreach(module ${OPENCV_JAVA_MODULES})
@ -222,4 +223,9 @@ endif(ANDROID)
#android test project
if(BUILD_TESTS)
add_android_project(opencv_test_java "${CMAKE_CURRENT_SOURCE_DIR}/android_test")
add_custom_command(
TARGET opencv_test_java_android_project POST_BUILD
COMMAND ${PYTHON_EXECUTABLE} ${CHECK_TEST_COVERAGE} "${CMAKE_CURRENT_SOURCE_DIR}/android_test/src" "${CMAKE_BINARY_DIR}/src" > "${CMAKE_CURRENT_BINARY_DIR}/tests_coverage.log"
)
endif()

Loading…
Cancel
Save