diff options
author | Andrew Vuong <akvuong@google.com> | 2023-03-14 19:04:21 +0000 |
---|---|---|
committer | Automerger Merge Worker <android-build-automerger-merge-worker@system.gserviceaccount.com> | 2023-03-14 19:04:21 +0000 |
commit | b21fbade4c23f804109d237b8444665ffed772ff (patch) | |
tree | dffefd0374f7ed3358f3a252c2e2aafba60b76be | |
parent | 6899028edc816716a590f00ff34774d6906d763f (diff) | |
parent | d86fa4e886eda62c4718b24d0feff83868c72fb8 (diff) | |
download | java-encoder-b21fbade4c23f804109d237b8444665ffed772ff.tar.gz |
Add OwaspJavaEncoderTestCases and TEST_MAPPING am: d86fa4e886
Original change: https://android-review.googlesource.com/c/platform/external/owasp/java-encoder/+/2486396
Change-Id: I5406ad81f8b716163a11e4e12c783b48aa5e5c02
Signed-off-by: Automerger Merge Worker <android-build-automerger-merge-worker@system.gserviceaccount.com>
-rw-r--r-- | Android.bp | 22 | ||||
-rw-r--r-- | AndroidManifest.xml | 27 | ||||
-rw-r--r-- | AndroidTest.xml | 28 | ||||
-rw-r--r-- | TEST_MAPPING | 10 |
4 files changed, 87 insertions, 0 deletions
@@ -41,3 +41,25 @@ java_library { "//packages/modules/OnDevicePersonalization:__subpackages__", ], } + +android_test { + name: "OwaspJavaEncoderTestCases", + srcs: [ + "core/src/test/**/*.java", + ], + java_resource_dirs: ["core/src/test/resources"], + static_libs: [ + "androidx.test.rules", + "owasp-java-encoder", + ], + libs: [ + "android.test.base", + ], + min_sdk_version: "33", + sdk_version: "test_current", + test_suites: [ + "general-tests", + "mts-ondevicepersonalization", + ], + visibility: ["//visibility:private"], +} diff --git a/AndroidManifest.xml b/AndroidManifest.xml new file mode 100644 index 0000000..5dd9e6c --- /dev/null +++ b/AndroidManifest.xml @@ -0,0 +1,27 @@ +<?xml version="1.0" encoding="utf-8"?> +<!-- + ~ Copyright (C) 2023 The Android Open Source Project + ~ + ~ Licensed under the Apache License, Version 2.0 (the "License"); + ~ you may not use this file except in compliance with the License. + ~ You may obtain a copy of the License at + ~ + ~ http://www.apache.org/licenses/LICENSE-2.0 + ~ + ~ Unless required by applicable law or agreed to in writing, software + ~ distributed under the License is distributed on an "AS IS" BASIS, + ~ WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. + ~ See the License for the specific language governing permissions and + ~ limitations under the License. + --> + +<manifest xmlns:android="http://schemas.android.com/apk/res/android" + package="org.owasp.encoder" > + + <uses-sdk android:minSdkVersion="33" /> + <application /> + <instrumentation + android:name="androidx.test.runner.AndroidJUnitRunner" + android:targetPackage="org.owasp.encoder" > + </instrumentation> +</manifest> diff --git a/AndroidTest.xml b/AndroidTest.xml new file mode 100644 index 0000000..e8bfa45 --- /dev/null +++ b/AndroidTest.xml @@ -0,0 +1,28 @@ +<?xml version="1.0" encoding="utf-8"?> +<!-- + ~ Copyright (C) 2023 The Android Open Source Project + ~ + ~ Licensed under the Apache License, Version 2.0 (the "License"); + ~ you may not use this file except in compliance with the License. + ~ You may obtain a copy of the License at + ~ + ~ http://www.apache.org/licenses/LICENSE-2.0 + ~ + ~ Unless required by applicable law or agreed to in writing, software + ~ distributed under the License is distributed on an "AS IS" BASIS, + ~ WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. + ~ See the License for the specific language governing permissions and + ~ limitations under the License. + --> +<configuration description="Config for owasp java encoder tests"> + <option name="test-suite-tag" value="mts" /> + + <target_preparer class="com.android.tradefed.targetprep.suite.SuiteApkInstaller"> + <option name="cleanup-apks" value="true"/> + <option name="test-file-name" value="OwaspJavaEncoderTestCases.apk"/> + </target_preparer> + + <test class="com.android.tradefed.testtype.AndroidJUnitTest"> + <option name="package" value="org.owasp.encoder"/> + </test> +</configuration>
\ No newline at end of file diff --git a/TEST_MAPPING b/TEST_MAPPING new file mode 100644 index 0000000..be3eb2f --- /dev/null +++ b/TEST_MAPPING @@ -0,0 +1,10 @@ +{ + "presubmit": [ + { + "name": "OnDevicePersonalizationManagingServicesTests" + }, + { + "name": "OwaspJavaEncoderTestCases" + } + ] +} |