summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorSasha Smundak <asmundak@google.com>2020-06-03 14:07:35 -0700
committerSasha Smundak <asmundak@google.com>2020-06-03 18:11:45 -0700
commit949ec6dabb1c371183aa7ca737dd3291f777ebb4 (patch)
tree7f45c5777715b615a48c5300e61db18fa2f4386c
parent14152d7764230d0ff7b64ec162f460cc1441013c (diff)
downloadMtp-949ec6dabb1c371183aa7ca737dd3291f777ebb4.tar.gz
Convert {tests,perf_tests}/Android.mk files to Android.bp
See build/soong/README.md for more information. Also, fix test configuration. Test: treehugger, 'atest MtpServiceTests MtpServicePerfTests(same errors as baseline) Change-Id: Iec5408453710332c51929a02151112c52939a9a1
-rw-r--r--perf_tests/Android.bp10
-rw-r--r--perf_tests/Android.mk13
-rw-r--r--perf_tests/AndroidTest.xml4
-rw-r--r--tests/Android.bp14
-rw-r--r--tests/Android.mk14
-rw-r--r--tests/AndroidTest.xml6
6 files changed, 29 insertions, 32 deletions
diff --git a/perf_tests/Android.bp b/perf_tests/Android.bp
new file mode 100644
index 0000000..8afd164
--- /dev/null
+++ b/perf_tests/Android.bp
@@ -0,0 +1,10 @@
+android_test {
+ name: "MtpServicePerfTests",
+ srcs: ["src/**/*.java"],
+ static_libs: ["androidx.test.rules"],
+ platform_apis: true,
+ instrumentation_for: "MtpService",
+ certificate: "media",
+ test_suites: ["device-tests"],
+
+}
diff --git a/perf_tests/Android.mk b/perf_tests/Android.mk
deleted file mode 100644
index 9713cd4..0000000
--- a/perf_tests/Android.mk
+++ /dev/null
@@ -1,13 +0,0 @@
-LOCAL_PATH := $(call my-dir)
-include $(CLEAR_VARS)
-
-LOCAL_MODULE_TAGS := tests
-LOCAL_SRC_FILES := $(call all-java-files-under, src)
-LOCAL_STATIC_JAVA_LIBRARIES := androidx.test.rules
-LOCAL_PACKAGE_NAME := MtpServicePerfTests
-LOCAL_PRIVATE_PLATFORM_APIS := true
-LOCAL_INSTRUMENTATION_FOR := MtpService
-LOCAL_CERTIFICATE := media
-LOCAL_COMPATIBILITY_SUITE += device-tests
-
-include $(BUILD_PACKAGE)
diff --git a/perf_tests/AndroidTest.xml b/perf_tests/AndroidTest.xml
index 8b7292b..8d1b349 100644
--- a/perf_tests/AndroidTest.xml
+++ b/perf_tests/AndroidTest.xml
@@ -13,12 +13,12 @@
See the License for the specific language governing permissions and
limitations under the License.
-->
-<configuration description="Runs MtpDocumentsProviderPerfTests metric instrumentation.">
+<configuration description="Runs MtpServicePerfTests metric instrumentation.">
<option name="test-suite-tag" value="apct" />
<option name="test-suite-tag" value="apct-metric-instrumentation" />
<target_preparer class="com.android.tradefed.targetprep.suite.SuiteApkInstaller">
<option name="cleanup-apks" value="true" />
- <option name="test-file-name" value="MtpDocumentsProviderPerfTests.apk" />
+ <option name="test-file-name" value="MtpServicePerfTests.apk" />
</target_preparer>
<test class="com.android.tradefed.testtype.AndroidJUnitTest" >
diff --git a/tests/Android.bp b/tests/Android.bp
new file mode 100644
index 0000000..0bb9793
--- /dev/null
+++ b/tests/Android.bp
@@ -0,0 +1,14 @@
+android_test {
+ name: "MtpServiceTests",
+ srcs: ["src/**/*.java"],
+ libs: [
+ "android.test.runner",
+ "android.test.base",
+ "android.test.mock",
+ ],
+ static_libs: ["junit"],
+ platform_apis: true,
+ instrumentation_for: "MtpService",
+ certificate: "media",
+ test_suites: ["device-tests"],
+}
diff --git a/tests/Android.mk b/tests/Android.mk
deleted file mode 100644
index af32953..0000000
--- a/tests/Android.mk
+++ /dev/null
@@ -1,14 +0,0 @@
-LOCAL_PATH := $(call my-dir)
-include $(CLEAR_VARS)
-
-LOCAL_MODULE_TAGS := tests
-LOCAL_SRC_FILES := $(call all-java-files-under, src)
-LOCAL_JAVA_LIBRARIES := android.test.runner android.test.base android.test.mock
-LOCAL_STATIC_JAVA_LIBRARIES := junit
-LOCAL_PACKAGE_NAME := MtpServiceTests
-LOCAL_PRIVATE_PLATFORM_APIS := true
-LOCAL_INSTRUMENTATION_FOR := MtpService
-LOCAL_CERTIFICATE := media
-LOCAL_COMPATIBILITY_SUITE := device-tests
-
-include $(BUILD_PACKAGE)
diff --git a/tests/AndroidTest.xml b/tests/AndroidTest.xml
index f84131c..83b287a 100644
--- a/tests/AndroidTest.xml
+++ b/tests/AndroidTest.xml
@@ -13,13 +13,13 @@
See the License for the specific language governing permissions and
limitations under the License.
-->
-<configuration description="Runs Tests for MtpDocumentsProvider with the UI for output.">
+<configuration description="Runs Tests for MtpService with the UI for output.">
<target_preparer class="com.android.tradefed.targetprep.TestAppInstallSetup">
- <option name="test-file-name" value="MtpDocumentsProviderTests.apk" />
+ <option name="test-file-name" value="MtpServiceTests.apk" />
</target_preparer>
<option name="test-suite-tag" value="apct" />
- <option name="test-tag" value="MtpDocumentsProviderTests" />
+ <option name="test-tag" value="MtpServiceTests" />
<test class="com.android.tradefed.testtype.InstrumentationTest" >
<option name="package" value="com.android.mtp.tests" />
<option name="runner" value="com.android.mtp.TestResultInstrumentation" />