summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorzmiao <miao.zhao@mapbox.com>2019-10-29 17:40:54 +0200
committerzmiao <miao.zhao@mapbox.com>2019-10-29 18:32:17 +0200
commit5dfeee3cb20ad6405b7a50ec09c2b5fdd4ea4323 (patch)
treead69be13bc00c2dbece7cceedd5007b7532fe173
parent9710c11d88e427b14729d752960cda0a6d0d904d (diff)
downloadqtlocation-mapboxgl-upstream/zmiao-render-test-manifest-config.tar.gz
[render-test] Add linux probe manifestupstream/zmiao-render-test-manifest-config
-rw-r--r--circle.yml4
-rw-r--r--cmake/render-test.cmake2
-rw-r--r--next/platform/linux/linux.cmake5
-rw-r--r--next/platform/macos/macos.cmake2
-rw-r--r--render-test/linux-probe-manifest.json7
-rw-r--r--render-test/mac-probe-manifest.json (renamed from render-test/probe-manifest.json)0
-rw-r--r--render-test/render_test.cpp6
7 files changed, 21 insertions, 5 deletions
diff --git a/circle.yml b/circle.yml
index a109ef2b41..ad4dc8bfd0 100644
--- a/circle.yml
+++ b/circle.yml
@@ -267,7 +267,9 @@ commands:
when: on_fail
command: |
mkdir -p /tmp/tests/render
- if [ -f render-test/index.html ]; then cp render-test/index.html /tmp/tests/render; fi
+ if [ -f render-test/tests_index.html ]; then cp render-test/tests_index.html /tmp/tests/render; fi
+ if [ -f render-test/render-tests_index.html ]; then cp render-test/render-tests_index.html /tmp/tests/render; fi
+ if [ -f render-test/query-tests_index.html ]; then cp render-test/query-tests_index.html /tmp/tests/render; fi
mkdir -p /tmp/tests/coredumps
if ls core* 1> /dev/null 2>&1; then cp core* /tmp/tests/coredumps; fi
- store_artifacts:
diff --git a/cmake/render-test.cmake b/cmake/render-test.cmake
index 8726fb4650..ac17be559c 100644
--- a/cmake/render-test.cmake
+++ b/cmake/render-test.cmake
@@ -8,6 +8,8 @@ add_executable(
render-test/filesystem.hpp
render-test/filesystem.hpp
render-test/include/mbgl/render_test.hpp
+ render-test/manifest_parser.cpp
+ render-test/manifest_parser.hpp
render-test/metadata.hpp
render-test/parser.cpp
render-test/parser.hpp
diff --git a/next/platform/linux/linux.cmake b/next/platform/linux/linux.cmake
index 9b821cdbea..396b9a0ffd 100644
--- a/next/platform/linux/linux.cmake
+++ b/next/platform/linux/linux.cmake
@@ -148,5 +148,8 @@ add_test(
--seed=${MBGL_RENDER_TEST_SEED}
)
-add_test(NAME mbgl-render-test-probes COMMAND mbgl-render-test-runner tests --manifestPath=${MBGL_ROOT}/render-test/probe-manifest.json)
+add_test(
+ NAME mbgl-render-test-probes
+ COMMAND mbgl-render-test-runner tests --manifestPath=${MBGL_ROOT}/render-test/linux-probe-manifest.json
+)
add_test(NAME mbgl-query-test COMMAND mbgl-render-test-runner query-tests --manifestPath=${MBGL_ROOT}/render-test/linux-manifest.json)
diff --git a/next/platform/macos/macos.cmake b/next/platform/macos/macos.cmake
index 229b2cc9e3..721d19e625 100644
--- a/next/platform/macos/macos.cmake
+++ b/next/platform/macos/macos.cmake
@@ -212,6 +212,6 @@ add_test(
--seed=${MBGL_RENDER_TEST_SEED}
)
-add_test(NAME mbgl-render-test-probes COMMAND mbgl-render-test-runner tests --manifestPath=${MBGL_ROOT}/render-test/probe-manifest.json)
+add_test(NAME mbgl-render-test-probes COMMAND mbgl-render-test-runner tests --manifestPath=${MBGL_ROOT}/render-test/mac-probe-manifest.json)
add_test(NAME mbgl-query-test COMMAND mbgl-render-test-runner query-tests --manifestPath=${MBGL_ROOT}/render-test/mac-manifest.json)
diff --git a/render-test/linux-probe-manifest.json b/render-test/linux-probe-manifest.json
new file mode 100644
index 0000000000..0b2ca88988
--- /dev/null
+++ b/render-test/linux-probe-manifest.json
@@ -0,0 +1,7 @@
+{
+ "probe_test_path":".",
+ "expectation_paths":["expected/render-tests"],
+ "ignore_paths":["../render-test/linux-ignores.json", "../render-test/tests/should-fail.json"],
+ "vendor_path":"../vendor",
+ "asset_path": "../mapbox-gl-js/test/integration"
+} \ No newline at end of file
diff --git a/render-test/probe-manifest.json b/render-test/mac-probe-manifest.json
index f3cc56d0a8..f3cc56d0a8 100644
--- a/render-test/probe-manifest.json
+++ b/render-test/mac-probe-manifest.json
diff --git a/render-test/render_test.cpp b/render-test/render_test.cpp
index 85c716dabb..38d6c15f3f 100644
--- a/render-test/render_test.cpp
+++ b/render-test/render_test.cpp
@@ -200,8 +200,10 @@ int runRenderTests(int argc, char** argv) {
metadatas.push_back(std::move(metadata));
}
const auto& testRootPath = manifest.getManifestPath();
+ const auto resultPath =
+ testRootPath + "/" + (testNames.empty() ? "render-tests" : testNames.front()) + "_index.html";
std::string resultsHTML = createResultPage(stats, metadatas, shuffle, seed);
- mbgl::util::write_file(testRootPath + "/index.html", resultsHTML);
+ mbgl::util::write_file(resultPath, resultsHTML);
const uint32_t count =
stats.erroredTests + stats.failedTests + stats.ignoreFailedTests + stats.ignorePassedTests + stats.passedTests;
@@ -222,7 +224,7 @@ int runRenderTests(int argc, char** argv) {
printf(ANSI_COLOR_RED "%u errored (%.1lf%%)" ANSI_COLOR_RESET "\n", stats.erroredTests, 100.0 * stats.erroredTests / count);
}
- printf("Results at: %s%s\n", testRootPath.c_str(), "/index.html");
+ printf("Results at: %s\n", resultPath.c_str());
return stats.failedTests + stats.erroredTests == 0 ? 0 : 1;
}