diff options
author | zmiao <miao.zhao@mapbox.com> | 2019-11-08 15:07:53 +0200 |
---|---|---|
committer | zmiao <miao.zhao@mapbox.com> | 2019-11-08 15:07:53 +0200 |
commit | b532d614d406e7019b6de8feb5376fc17124789c (patch) | |
tree | eb87a2ffbe11ee54b8a841a4c263a9173e4ddf91 | |
parent | b66111d9639a3cfcd6395a6c5575d16ddd116bb6 (diff) | |
parent | 94435e7c21e5e9eb482cfad22449c28bd3251cf0 (diff) | |
download | qtlocation-mapboxgl-upstream/zmiao-circleci-render-test.tar.gz |
-rw-r--r-- | next/platform/android/android.cmake | 118 | ||||
-rw-r--r-- | render-test/android-manifest.json | 4 | ||||
-rw-r--r-- | render-test/android/app/src/main/assets/to_zip.txt | 17 | ||||
-rw-r--r-- | render-test/manifest_parser.cpp | 2 | ||||
-rw-r--r-- | render-test/render_test.cpp | 2 |
5 files changed, 27 insertions, 116 deletions
diff --git a/next/platform/android/android.cmake b/next/platform/android/android.cmake index 454cc761f2..86350b51d5 100644 --- a/next/platform/android/android.cmake +++ b/next/platform/android/android.cmake @@ -342,139 +342,41 @@ add_custom_command( TARGET mbgl-render-test-runner PRE_BUILD COMMAND ${CMAKE_COMMAND} - -E - copy_directory - ${MBGL_ROOT}/mapbox-gl-js/test/integration/render-tests - ${MBGL_ROOT}/render-test/android/app/src/main/assets/render-tests - COMMAND - ${CMAKE_COMMAND} - -E - copy_directory - ${MBGL_ROOT}/mapbox-gl-js/test/integration/query-tests - ${MBGL_ROOT}/render-test/android/app/src/main/assets/query-tests - COMMAND - ${CMAKE_COMMAND} - -E - copy_directory - ${MBGL_ROOT}/mapbox-gl-js/test/integration/tiles - ${MBGL_ROOT}/render-test/android/app/src/main/assets/assets/tiles - COMMAND - ${CMAKE_COMMAND} - -E - copy_directory - ${MBGL_ROOT}/mapbox-gl-js/test/integration/glyphs - ${MBGL_ROOT}/render-test/android/app/src/main/assets/assets/glyphs - COMMAND - ${CMAKE_COMMAND} - -E - copy_directory - ${MBGL_ROOT}/mapbox-gl-js/test/integration/styles - ${MBGL_ROOT}/render-test/android/app/src/main/assets/assets/styles - COMMAND - ${CMAKE_COMMAND} - -E - copy_directory - ${MBGL_ROOT}/mapbox-gl-js/test/integration/tilesets - ${MBGL_ROOT}/render-test/android/app/src/main/assets/assets/tilesets - COMMAND - ${CMAKE_COMMAND} - -E - copy_directory - ${MBGL_ROOT}/mapbox-gl-js/test/integration/image - ${MBGL_ROOT}/render-test/android/app/src/main/assets/assets/image - COMMAND - ${CMAKE_COMMAND} - -E - copy_directory - ${MBGL_ROOT}/mapbox-gl-js/test/integration/video - ${MBGL_ROOT}/render-test/android/app/src/main/assets/assets/video - COMMAND - ${CMAKE_COMMAND} - -E - copy_directory - ${MBGL_ROOT}/mapbox-gl-js/test/integration/data - ${MBGL_ROOT}/render-test/android/app/src/main/assets/assets/data - COMMAND - ${CMAKE_COMMAND} - -E - copy_directory - ${MBGL_ROOT}/mapbox-gl-js/test/integration/geojson - ${MBGL_ROOT}/render-test/android/app/src/main/assets/assets/geojson - COMMAND - ${CMAKE_COMMAND} - -E - copy_directory - ${MBGL_ROOT}/mapbox-gl-js/test/integration/sprites - ${MBGL_ROOT}/render-test/android/app/src/main/assets/assets/sprites - COMMAND - ${CMAKE_COMMAND} - -E - copy_directory - ${MBGL_ROOT}/vendor/mapbox-gl-styles/styles - ${MBGL_ROOT}/render-test/android/app/src/main/assets/vendor/mapbox-gl-styles/styles - COMMAND - ${CMAKE_COMMAND} - -E - copy_directory - ${MBGL_ROOT}/vendor/mapbox-gl-styles/sprites - ${MBGL_ROOT}/render-test/android/app/src/main/assets/vendor/mapbox-gl-styles/sprites - COMMAND - ${CMAKE_COMMAND} - -E + -E copy ${MBGL_ROOT}/render-test/android-manifest.json - ${MBGL_ROOT}/render-test/android/app/src/main/assets/android-manifest.json + ${MBGL_ROOT}/android-manifest.json COMMAND ${CMAKE_COMMAND} -E copy ${MBGL_ROOT}/platform/node/test/ignores.json - ${MBGL_ROOT}/render-test/android/app/src/main/assets/ignores/ignores.json + ${MBGL_ROOT}/ignores/ignores.json COMMAND ${CMAKE_COMMAND} -E copy ${MBGL_ROOT}/render-test/linux-ignores.json - ${MBGL_ROOT}/render-test/android/app/src/main/assets/ignores/linux-ignores.json + ${MBGL_ROOT}/ignores/linux-ignores.json COMMAND ${CMAKE_COMMAND} -E tar - "cfv" - "data.zip" + "cf" + "render-test/android/app/src/main/assets/data.zip" --format=zip - --files-from=${MBGL_ROOT}/render-test/android/app/src/main/assets/to_zip.txt - COMMAND - ${CMAKE_COMMAND} - -E - remove_directory - ${MBGL_ROOT}/render-test/android/app/src/main/assets/vendor - COMMAND - ${CMAKE_COMMAND} - -E - remove_directory - ${MBGL_ROOT}/render-test/android/app/src/main/assets/assets - COMMAND - ${CMAKE_COMMAND} - -E - remove_directory - ${MBGL_ROOT}/render-test/android/app/src/main/assets/render-tests - COMMAND - ${CMAKE_COMMAND} - -E - remove_directory - ${MBGL_ROOT}/render-test/android/app/src/main/assets/query-tests + --files-from=render-test/android/app/src/main/assets/to_zip.txt COMMAND ${CMAKE_COMMAND} -E remove_directory - ${MBGL_ROOT}/render-test/android/app/src/main/assets/ignores + ${MBGL_ROOT}/ignores COMMAND ${CMAKE_COMMAND} -E remove - ${MBGL_ROOT}/render-test/android/app/src/main/assets/android-manifest.json - WORKING_DIRECTORY ${MBGL_ROOT}/render-test/android/app/src/main/assets + ${MBGL_ROOT}/android-manifest.json + WORKING_DIRECTORY ${MBGL_ROOT} ) # Android has no concept of MinSizeRel on android.toolchain.cmake and provides configurations tuned for binary size. We can push it a bit diff --git a/render-test/android-manifest.json b/render-test/android-manifest.json index 18d2296af5..7aa9eb26bc 100644 --- a/render-test/android-manifest.json +++ b/render-test/android-manifest.json @@ -1,8 +1,8 @@ { - "base_test_path":".", + "base_test_path":"mapbox-gl-js/test/integration", "expectation_paths":[], "ignore_paths":["ignores/ignores.json", "ignores/linux-ignores.json"], "vendor_path":"vendor", - "asset_path": "assets", + "asset_path": "mapbox-gl-js/test/integration", "result_path": "/sdcard/" }
\ No newline at end of file diff --git a/render-test/android/app/src/main/assets/to_zip.txt b/render-test/android/app/src/main/assets/to_zip.txt index b5212455f4..7023ad9cfa 100644 --- a/render-test/android/app/src/main/assets/to_zip.txt +++ b/render-test/android/app/src/main/assets/to_zip.txt @@ -1,6 +1,15 @@ -vendor/ -assets/ -render-tests/ -query-tests/ +mapbox-gl-js/test/integration/data/ +mapbox-gl-js/test/integration/video/ +mapbox-gl-js/test/integration/tilesets/ +mapbox-gl-js/test/integration/tiles/ +mapbox-gl-js/test/integration/styles/ +mapbox-gl-js/test/integration/render-tests/ +mapbox-gl-js/test/integration/query-tests/ +mapbox-gl-js/test/integration/image/ +mapbox-gl-js/test/integration/glyphs/ +mapbox-gl-js/test/integration/geojson/ +mapbox-gl-js/test/integration/sprites/ +vendor/mapbox-gl-styles/styles/ +vendor/mapbox-gl-styles/sprites/ ignores/ android-manifest.json
\ No newline at end of file diff --git a/render-test/manifest_parser.cpp b/render-test/manifest_parser.cpp index 23be35dfe5..6bba33754a 100644 --- a/render-test/manifest_parser.cpp +++ b/render-test/manifest_parser.cpp @@ -385,7 +385,7 @@ mbgl::optional<Manifest> ManifestParser::parseManifest(const std::string& manife manifest.manifestPath.pop_back(); } if (manifest.resultPath.empty()) { - manifest.resultPath = manifest.testRootPath; + manifest.resultPath = manifest.manifestPath; } else if (manifest.resultPath.back() == '/') { manifest.resultPath.pop_back(); } diff --git a/render-test/render_test.cpp b/render-test/render_test.cpp index 571ee444e8..3cdd4304c3 100644 --- a/render-test/render_test.cpp +++ b/render-test/render_test.cpp @@ -204,7 +204,7 @@ int runRenderTests(int argc, char** argv) { metadatas.push_back(std::move(metadata)); } const auto resultPath = - manifest.getManifestPath() + "/" + (testNames.empty() ? "render-tests" : testNames.front()) + "_index.html"; + manifest.getResultPath() + "/" + (testNames.empty() ? "render-tests" : testNames.front()) + "_index.html"; std::string resultsHTML = createResultPage(stats, metadatas, shuffle, seed); mbgl::util::write_file(resultPath, resultsHTML); |