summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorPete Bentley <prb@google.com>2021-06-29 13:22:21 +0100
committerPete Bentley <prb@google.com>2022-04-07 16:38:29 +0100
commitfe406ed0f9fc6f5f2b0d02b1d0bc8c5c898d395a (patch)
treeaf4351de83664a251d30003c0f65aa6d72c2d473
parentebeca38b4ecbe81fdf1d127ef7abb4689722308c (diff)
downloadboringssl-fe406ed0f9fc6f5f2b0d02b1d0bc8c5c898d395a.tar.gz
Add BoringSSL native tests to mts-conscrypt.
Bug: 187236336 Bug: 192368160 Test: mts-tradefed run mts-conscrypt Change-Id: I8b0dd685ad0db477e41dab395489fe42e70a4fe1
-rw-r--r--Android.bp39
-rw-r--r--NativeTests.xml40
2 files changed, 74 insertions, 5 deletions
diff --git a/Android.bp b/Android.bp
index ea7a7bdf..daec62ce 100644
--- a/Android.bp
+++ b/Android.bp
@@ -493,21 +493,45 @@ cc_library_static {
// Tests
cc_test {
name: "boringssl_crypto_test",
- test_suites: ["device-tests"],
- host_supported: true,
+ test_config: "NativeTests.xml",
+ host_supported: false,
+ per_testcase_directory: true,
+ compile_multilib: "both",
+ multilib: {
+ lib32: {
+ suffix: "32",
+ },
+ lib64: {
+ suffix: "64",
+ },
+ },
defaults: [
"boringssl_crypto_test_sources",
"boringssl_flags",
],
whole_static_libs: ["boringssl_test_support"],
-
shared_libs: ["libcrypto"],
+ target: {
+ android: {
+ test_suites: ["mts-conscrypt"],
+ },
+ },
}
cc_test {
name: "boringssl_ssl_test",
- test_suites: ["device-tests"],
- host_supported: true,
+ test_config: "NativeTests.xml",
+ host_supported: false,
+ per_testcase_directory: true,
+ compile_multilib: "both",
+ multilib: {
+ lib32: {
+ suffix: "32",
+ },
+ lib64: {
+ suffix: "64",
+ },
+ },
defaults: [
"boringssl_ssl_test_sources",
"boringssl_flags",
@@ -518,6 +542,11 @@ cc_test {
"libcrypto",
"libssl",
],
+ target: {
+ android: {
+ test_suites: ["mts-conscrypt"],
+ },
+ },
}
// Utility binary for CMVP on-site testing.
diff --git a/NativeTests.xml b/NativeTests.xml
new file mode 100644
index 00000000..d3eb9444
--- /dev/null
+++ b/NativeTests.xml
@@ -0,0 +1,40 @@
+<?xml version="1.0" encoding="utf-8"?>
+<!--
+ ~ Copyright (C) 2022 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.
+ ~
+ ~ Re-runs a subset of MtsConscryptTestCases using Conscrypt's file-descriptor based
+ ~ implementation to ensure there are no regressions in this implementation before
+ ~ it is fully deprecated.
+ ~
+ ~ Apart from the include filters and SSLSocket implementation this test suite is
+ ~ identical to MtsConscryptTestCases.
+ -->
+<configuration description="Configuration for BoringSSL native tests">
+ <option name="test-suite-tag" value="mts-conscrypt" />
+ <target_preparer class="com.android.compatibility.common.tradefed.targetprep.FilePusher">
+ <option name="cleanup" value="true" />
+ <option name="push" value="boringssl_crypto_test->/data/local/tmp/boringssl_crypto_test" />
+ <option name="push" value="boringssl_ssl_test->/data/local/tmp/boringssl_ssl_test" />
+ <option name="append-bitness" value="true" />
+ </target_preparer>
+ <target_preparer class="com.android.tradefed.targetprep.RootTargetPreparer"/>
+ <test class="com.android.tradefed.testtype.GTest" >
+ <option name="native-test-device-path" value="/data/local/tmp" />
+ <option name="module-name" value="boringssl_crypto_test" />
+ <option name="module-name" value="boringssl_ssl_test" />
+ <option name="runtime-hint" value="10m" />
+ <option name="native-test-timeout" value="600000" />
+ </test>
+</configuration>