aboutsummaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorAndrew Vuong <akvuong@google.com>2023-03-14 20:21:30 +0000
committerAutomerger Merge Worker <android-build-automerger-merge-worker@system.gserviceaccount.com>2023-03-14 20:21:30 +0000
commitaa8399f7c5dc71d37f7affe865d2c46df539b3ec (patch)
treedffefd0374f7ed3358f3a252c2e2aafba60b76be
parent0bbf152e6b8fe78485d078d607c6ddcb6d92f996 (diff)
parent2c2c8105b67698b5a2df3c1cd79ec62f3388af60 (diff)
downloadjava-encoder-aa8399f7c5dc71d37f7affe865d2c46df539b3ec.tar.gz
Add OwaspJavaEncoderTestCases and TEST_MAPPING am: d86fa4e886 am: b21fbade4c am: 2c2c8105b6
Original change: https://android-review.googlesource.com/c/platform/external/owasp/java-encoder/+/2486396 Change-Id: Icc31c68ef83f8f7cf232a48b8f358ad3d83295c5 Signed-off-by: Automerger Merge Worker <android-build-automerger-merge-worker@system.gserviceaccount.com>
-rw-r--r--Android.bp22
-rw-r--r--AndroidManifest.xml27
-rw-r--r--AndroidTest.xml28
-rw-r--r--TEST_MAPPING10
4 files changed, 87 insertions, 0 deletions
diff --git a/Android.bp b/Android.bp
index f2f0816..7223c96 100644
--- a/Android.bp
+++ b/Android.bp
@@ -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"
+ }
+ ]
+}