From 31f9d09ba9835eafd7db45c2b75a711a31e21f98 Mon Sep 17 00:00:00 2001 From: Dieter Hsu Date: Thu, 18 Jun 2020 23:11:31 +0800 Subject: [PATCH 1/4] Run bugreport unit test without script Replacing run.sh with fully integrated AndroidTest config to be able to run auto test by test mapping. Move the test class to the directory according to the package. This fix the issue source code is referenced correctly from testing result. Bug: 159404894 Test: atest BugreportManagerTestCases Change-Id: Id930abc40c52441c6dd1c1e6cdc3c0f34a36bfca Merged-In: Id930abc40c52441c6dd1c1e6cdc3c0f34a36bfca (cherry picked from commit 7a0bac8d75d30973a6dcab361732d6adf75b83bf) --- core/tests/bugreports/Android.bp | 6 ++ core/tests/bugreports/AndroidTest.xml | 13 ++-- core/tests/bugreports/run.sh | 61 ------------------- .../tests}/BugreportManagerTest.java | 0 4 files changed, 15 insertions(+), 65 deletions(-) delete mode 100755 core/tests/bugreports/run.sh rename core/tests/bugreports/src/{android/server/bugreports => com/android/os/bugreports/tests}/BugreportManagerTest.java (100%) diff --git a/core/tests/bugreports/Android.bp b/core/tests/bugreports/Android.bp index e9d5bb135e02c..1edd9623ed2d6 100644 --- a/core/tests/bugreports/Android.bp +++ b/core/tests/bugreports/Android.bp @@ -15,12 +15,18 @@ android_test { name: "BugreportManagerTestCases", srcs: ["src/**/*.java"], + data: [":bugreport_artifacts"], libs: [ "android.test.runner", "android.test.base", ], static_libs: ["androidx.test.rules", "truth-prebuilt"], + test_suites: ["general-tests"], sdk_version: "test_current", platform_apis: true, } +filegroup { + name: "bugreport_artifacts", + srcs: ["config/test-sysconfig.xml"], +} diff --git a/core/tests/bugreports/AndroidTest.xml b/core/tests/bugreports/AndroidTest.xml index 410ca60435838..2c2f0d69e3474 100644 --- a/core/tests/bugreports/AndroidTest.xml +++ b/core/tests/bugreports/AndroidTest.xml @@ -21,11 +21,16 @@