[test][ios] Update iOS render test data setup script

This commit is contained in:
Juha Alanen
2020-03-09 10:53:25 +02:00
parent cd320d8591
commit 428f666adb
3 changed files with 32 additions and 17 deletions

View File

@@ -2,11 +2,16 @@ if(MBGL_IOS_RENDER_TEST)
include(${PROJECT_SOURCE_DIR}/vendor/zip-archive.cmake)
initialize_ios_target(mbgl-vendor-zip-archive)
set(PREPARE_CMD "${PROJECT_SOURCE_DIR}/render-test/ios/setup_test_data.sh")
execute_process(COMMAND ${PREPARE_CMD} RESULT_VARIABLE CMD_ERROR WORKING_DIRECTORY ${PROJECT_SOURCE_DIR})
if(MBGL_WITH_OPENGL)
message("-- Setting up test data for iOS render test with OpenGL renderer")
set(PREPARE_CMD "${PROJECT_SOURCE_DIR}/render-test/ios/setup_test_data.sh")
endif()
add_custom_target(RenderTestApp-prepare COMMAND ${PREPARE_CMD} ${CMAKE_CURRENT_BINARY_DIR} WORKING_DIRECTORY ${PROJECT_SOURCE_DIR})
execute_process(COMMAND mkdir ${CMAKE_CURRENT_BINARY_DIR}/test-data RESULT_VARIABLE CMD_ERROR WORKING_DIRECTORY ${PROJECT_SOURCE_DIR})
set(RESOURCES ${PROJECT_SOURCE_DIR}/platform/ios/test/common/Main.storyboard
${PROJECT_SOURCE_DIR}/platform/ios/test/common/LaunchScreen.storyboard ${PROJECT_SOURCE_DIR}/test-data)
${PROJECT_SOURCE_DIR}/platform/ios/test/common/LaunchScreen.storyboard ${CMAKE_CURRENT_BINARY_DIR}/test-data)
add_executable(
RenderTestApp
@@ -20,6 +25,7 @@ if(MBGL_IOS_RENDER_TEST)
${RESOURCES}
)
initialize_ios_target(RenderTestApp)
add_dependencies(RenderTestApp RenderTestApp-prepare)
set_target_properties(
RenderTestApp

View File

@@ -74,7 +74,9 @@ target_include_directories(
include(${PROJECT_SOURCE_DIR}/vendor/icu.cmake)
# include(${PROJECT_SOURCE_DIR}/platform/ios/ccache.cmake)
include(${PROJECT_SOURCE_DIR}/platform/ios/ios-test-runners.cmake)
if(MBGL_WITH_OPENGL)
include(${PROJECT_SOURCE_DIR}/platform/ios/ios-test-runners.cmake)
endif()
initialize_ios_target(mbgl-core)
initialize_ios_target(mbgl-vendor-csscolorparser)

View File

@@ -1,17 +1,24 @@
#!/bin/bash
rm -rf test-data/
if [ $# -eq 0 ]; then
echo "Give base directory as argument, eg. 'build'"
exit 1
fi
mkdir -p test-data/integration/
mkdir -p test-data/baselines/
BASE_DIR=$1
cp -r mapbox-gl-js/test/integration/render-tests test-data/integration/
cp -r mapbox-gl-js/test/integration/query-tests test-data/integration/
cp -r metrics/expectations test-data/
cp -r metrics/ignores test-data/
cp -r metrics/tests test-data/
cp -r metrics/ios-render-test-runner test-data/
cp -r metrics/ios-render-test-runner-style.json test-data/
cp -r metrics/ios-render-test-runner-metrics.json test-data/
cp -r metrics/cache-metrics.db test-data/
cp -r metrics/cache-style.db test-data/
rm -rf $BASE_DIR/test-data/
mkdir -p $BASE_DIR/test-data/integration/
mkdir -p $BASE_DIR/test-data/baselines/
cp -r mapbox-gl-js/test/integration/render-tests $BASE_DIR/test-data/integration/
cp -r mapbox-gl-js/test/integration/query-tests $BASE_DIR/test-data/integration/
cp -r metrics/expectations $BASE_DIR/test-data/
cp -r metrics/ignores $BASE_DIR/test-data/
cp -r metrics/tests $BASE_DIR/test-data/
cp -r metrics/ios-render-test-runner $BASE_DIR/test-data/
cp -r metrics/ios-render-test-runner-style.json $BASE_DIR/test-data/
cp -r metrics/ios-render-test-runner-metrics.json $BASE_DIR/test-data/
cp -r metrics/cache-metrics.db $BASE_DIR/test-data/
cp -r metrics/cache-style.db $BASE_DIR/test-data/