From 3e0d23d318cf540fdcee015f4a54a47d4e4e1ebe Mon Sep 17 00:00:00 2001 From: Bart Louwers Date: Fri, 15 Mar 2024 17:36:49 +0100 Subject: [PATCH] Android render test quality of life (#2200) --- .github/workflows/android-ci.yml | 1 - render-test/android/app/build.gradle | 6 ++++++ render-test/manifest_parser.cpp | 4 +--- 3 files changed, 7 insertions(+), 4 deletions(-) diff --git a/.github/workflows/android-ci.yml b/.github/workflows/android-ci.yml index 860a74fef1e..af6d823fe5c 100644 --- a/.github/workflows/android-ci.yml +++ b/.github/workflows/android-ci.yml @@ -120,7 +120,6 @@ jobs: fi - name: Build Benchmark, copy to platform/android - if: github.ref != 'refs/heads/main' run: | ./gradlew assembleDrawableRelease assembleDrawableReleaseAndroidTest -PtestBuildType=release cp MapboxGLAndroidSDKTestApp/build/outputs/apk/drawable/release/MapboxGLAndroidSDKTestApp-drawable-release.apk . diff --git a/render-test/android/app/build.gradle b/render-test/android/app/build.gradle index bfea59f07f2..96b2a562d50 100644 --- a/render-test/android/app/build.gradle +++ b/render-test/android/app/build.gradle @@ -3,6 +3,12 @@ apply plugin: 'com.android.application' android { compileSdkVersion 33 + sourceSets { + test { + assets.srcDirs += ['../../../metrics'] + } + } + defaultConfig { applicationId = 'org.maplibre.render_test_runner' minSdkVersion 21 diff --git a/render-test/manifest_parser.cpp b/render-test/manifest_parser.cpp index e22edd8d3b6..0fb740caa89 100644 --- a/render-test/manifest_parser.cpp +++ b/render-test/manifest_parser.cpp @@ -287,9 +287,7 @@ std::optional ManifestParser::parseManifest(const std::string& manifes testId = testId.substr(rootLength + 1, testId.length() - rootLength - 1); std::vector expectedMetricPaths{expectedMetricPath}; -#if defined(__ANDROID__) - expectedMetricPaths.emplace_back("/sdcard/baselines/"); -#elif defined(__APPLE__) +#if defined(__APPLE__) expectedMetricPaths.emplace_back(manifest.manifestPath + "/baselines/"); #endif testPaths.emplace_back(testPath,