From cfc135194d2808b3144ddbb5ad6b334cdce8dbcd Mon Sep 17 00:00:00 2001 From: Daniele Di Proietto Date: Fri, 10 Mar 2023 14:19:30 +0000 Subject: [PATCH] Build apps for CTS tests with sdk 31 We need to run those CTS tests on older devices for mainline. It turns out that min_sdk_version is not enough. Also, the reporter app does not need to run on MTS, so there's no need to build it for sdk 31. Tested: built the test apps and installed them on older devices (it failed before). Tested: atest CtsPerfettoTestCases Bug: 268041903 Bug: 272300250 (cherry picked from commit add8682518994108013b2fabda740746813ebab4) Merged-In: Ic27539171f314dd6865944b0e7044a3e5a9f801e Change-Id: Ic27539171f314dd6865944b0e7044a3e5a9f801e --- test/cts/producer/Android.bp | 2 +- test/cts/producer/jni/Android.bp | 2 -- test/cts/reporter/app/Android.bp | 3 --- test/cts/test_apps/Android.bp | 8 ++++---- 4 files changed, 5 insertions(+), 10 deletions(-) diff --git a/test/cts/producer/Android.bp b/test/cts/producer/Android.bp index 3c07ce4444..c2695e928b 100644 --- a/test/cts/producer/Android.bp +++ b/test/cts/producer/Android.bp @@ -32,9 +32,9 @@ android_test_helper_app { compile_multilib: "both", srcs: ["src/**/*.java"], - sdk_version: "current", // This test is also run via Mainline Testing against the ART Mainline // Module, which is updatable since Android 12 (API level 31). + sdk_version: "31", min_sdk_version: "31", jni_libs: [ "libperfettocts_jni", diff --git a/test/cts/producer/jni/Android.bp b/test/cts/producer/jni/Android.bp index 696dc9708b..70cecbfedd 100644 --- a/test/cts/producer/jni/Android.bp +++ b/test/cts/producer/jni/Android.bp @@ -14,8 +14,6 @@ cc_library_shared { ], header_libs: ["jni_headers"], static_libs: [ - "libgtest", - "libprotobuf-cpp-lite", "perfetto_cts_jni_deps", "libperfetto_client_experimental", ], diff --git a/test/cts/reporter/app/Android.bp b/test/cts/reporter/app/Android.bp index 6e7c8808e0..ab2633b564 100644 --- a/test/cts/reporter/app/Android.bp +++ b/test/cts/reporter/app/Android.bp @@ -27,7 +27,4 @@ android_test_helper_app { srcs: ["src/**/*.java"], platform_apis: true, privileged: true, - // This test is also run via Mainline Testing against the ART Mainline - // Module, which is updatable since Android 12 (API level 31). - min_sdk_version: "31", } diff --git a/test/cts/test_apps/Android.bp b/test/cts/test_apps/Android.bp index 648a23c2a9..a11e7cb6b3 100644 --- a/test/cts/test_apps/Android.bp +++ b/test/cts/test_apps/Android.bp @@ -34,9 +34,9 @@ android_test_helper_app { compile_multilib: "both", srcs: ["src/**/*.java"], - sdk_version: "current", // This test is also run via Mainline Testing against the ART Mainline // Module, which is updatable since Android 12 (API level 31). + sdk_version: "31", min_sdk_version: "31", jni_libs: [ "libperfettocts_native", @@ -57,9 +57,9 @@ android_test_helper_app { compile_multilib: "both", srcs: ["src/**/*.java"], - sdk_version: "current", // This test is also run via Mainline Testing against the ART Mainline // Module, which is updatable since Android 12 (API level 31). + sdk_version: "31", min_sdk_version: "31", jni_libs: [ "libperfettocts_native", @@ -80,9 +80,9 @@ android_test_helper_app { compile_multilib: "both", srcs: ["src/**/*.java"], - sdk_version: "current", // This test is also run via Mainline Testing against the ART Mainline // Module, which is updatable since Android 12 (API level 31). + sdk_version: "31", min_sdk_version: "31", jni_libs: [ "libperfettocts_native", @@ -103,9 +103,9 @@ android_test_helper_app { compile_multilib: "both", srcs: ["src/**/*.java"], - sdk_version: "current", // This test is also run via Mainline Testing against the ART Mainline // Module, which is updatable since Android 12 (API level 31). + sdk_version: "31", min_sdk_version: "31", jni_libs: [ "libperfettocts_native",