summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
author Thomas Girardier <girardier@google.com> 2025-02-12 21:39:33 -0800
committer Thomas Girardier <girardier@google.com> 2025-02-12 21:47:22 -0800
commit21e6e0367e42d7569608a1cc9f3b5d7bd9fe2785 (patch)
tree644fe46d5406e531b37930902342b96f9f5a26fa
parent7e906340128f3f517c4c580db0374a32816e723d (diff)
Add missing tests to MTS
Bug: 393400512 Change-Id: I7fb9ecbaf1510fc5f1b8eb184554db10a1ebc5b5 Test: None Flag: TEST_ONLY
-rw-r--r--Android.bp11
-rw-r--r--BluetoothGTestTemplate.xml (renamed from AndroidTestTemplate.xml)0
-rw-r--r--BluetoothRustTestTemplate.xml33
-rw-r--r--offload/hci/Android.bp19
-rw-r--r--offload/leaudio/hci/Android.bp19
-rw-r--r--system/build/Android.bp2
-rw-r--r--system/log/Android.bp1
-rw-r--r--system/rust/Android.bp20
-rw-r--r--system/test/Android.bp2
9 files changed, 99 insertions, 8 deletions
diff --git a/Android.bp b/Android.bp
index bef6c85049..07ebd7d756 100644
--- a/Android.bp
+++ b/Android.bp
@@ -32,9 +32,16 @@ license {
}
filegroup {
- name: "BluetoothTestConfigTemplate",
+ name: "BluetoothGTestConfigTemplate",
srcs: [
- "AndroidTestTemplate.xml",
+ "BluetoothGTestTemplate.xml",
+ ],
+}
+
+filegroup {
+ name: "BluetoothRustTestConfigTemplate",
+ srcs: [
+ "BluetoothRustTestTemplate.xml",
],
}
diff --git a/AndroidTestTemplate.xml b/BluetoothGTestTemplate.xml
index 4083baac14..4083baac14 100644
--- a/AndroidTestTemplate.xml
+++ b/BluetoothGTestTemplate.xml
diff --git a/BluetoothRustTestTemplate.xml b/BluetoothRustTestTemplate.xml
new file mode 100644
index 0000000000..5defd3485e
--- /dev/null
+++ b/BluetoothRustTestTemplate.xml
@@ -0,0 +1,33 @@
+<?xml version="1.0" encoding="utf-8"?>
+<!-- Copyright 2025 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="Runs {MODULE}.">
+ <target_preparer class="com.android.tradefed.targetprep.RootTargetPreparer" />
+ <target_preparer class="com.android.compatibility.common.tradefed.targetprep.FilePusher">
+ <option name="cleanup" value="true" />
+ <option name="push" value="{MODULE}->/data/local/tmp/{MODULE}" />
+ <option name="append-bitness" value="true" />
+ </target_preparer>
+ <test class="com.android.tradefed.testtype.rust.RustBinaryTest" >
+ <option name="test-device-path" value="/data/local/tmp" />
+ <option name="module-name" value="{MODULE}" />
+ </test>
+ <!-- Only run tests in MTS if the Bluetooth Mainline module is installed. -->
+ <object type="module_controller"
+ class="com.android.tradefed.testtype.suite.module.MainlineTestModuleController">
+ <option name="mainline-module-package-name" value="com.android.bt" />
+ <option name="mainline-module-package-name" value="com.google.android.bt" />
+ </object>
+</configuration> \ No newline at end of file
diff --git a/offload/hci/Android.bp b/offload/hci/Android.bp
index bd396bcfe3..f9b5eb277e 100644
--- a/offload/hci/Android.bp
+++ b/offload/hci/Android.bp
@@ -50,6 +50,23 @@ rust_library {
rust_test {
name: "libbluetooth_offload_hci_test",
host_supported: true,
- test_suites: ["general-tests"],
+ target: {
+ android: {
+ test_config_template: ":BluetoothRustTestConfigTemplate",
+ test_suites: [
+ "general-tests",
+ "mts-bt",
+ ],
+ },
+ },
+ compile_multilib: "both",
+ multilib: {
+ lib32: {
+ suffix: "32",
+ },
+ lib64: {
+ suffix: "64",
+ },
+ },
defaults: ["bluetooth_offload_hci_defaults"],
}
diff --git a/offload/leaudio/hci/Android.bp b/offload/leaudio/hci/Android.bp
index 8a9b9247d6..0c7839bf91 100644
--- a/offload/leaudio/hci/Android.bp
+++ b/offload/leaudio/hci/Android.bp
@@ -42,6 +42,23 @@ rust_library {
rust_test {
name: "libbluetooth_offload_leaudio_hci_test",
- test_suites: ["general-tests"],
+ target: {
+ android: {
+ test_config_template: ":BluetoothRustTestConfigTemplate",
+ test_suites: [
+ "general-tests",
+ "mts-bt",
+ ],
+ },
+ },
+ compile_multilib: "both",
+ multilib: {
+ lib32: {
+ suffix: "32",
+ },
+ lib64: {
+ suffix: "64",
+ },
+ },
defaults: ["bluetooth_offload_leaudio_hci_defaults"],
}
diff --git a/system/build/Android.bp b/system/build/Android.bp
index 13f1ccccf5..a34d0a1ed4 100644
--- a/system/build/Android.bp
+++ b/system/build/Android.bp
@@ -20,7 +20,7 @@ cc_defaults {
],
target: {
android: {
- test_config_template: ":BluetoothTestConfigTemplate",
+ test_config_template: ":BluetoothGTestConfigTemplate",
sanitize: {
misc_undefined: ["bounds"],
},
diff --git a/system/log/Android.bp b/system/log/Android.bp
index e0855a2304..b2866ef65b 100644
--- a/system/log/Android.bp
+++ b/system/log/Android.bp
@@ -34,6 +34,7 @@ cc_library {
cc_test {
name: "libbluetooth_log_test",
test_suites: ["general-tests"],
+ defaults: ["mts_defaults"],
host_supported: true,
srcs: [
"src/truncating_buffer_test.cc",
diff --git a/system/rust/Android.bp b/system/rust/Android.bp
index d005b23c77..344da0728d 100644
--- a/system/rust/Android.bp
+++ b/system/rust/Android.bp
@@ -58,6 +58,11 @@ rust_defaults {
rustlibs: [
"libandroid_logger",
],
+ test_config_template: ":BluetoothRustTestConfigTemplate",
+ test_suites: [
+ "general-tests",
+ "mts-bt",
+ ],
},
host: {
rustlibs: [
@@ -68,7 +73,19 @@ rust_defaults {
enabled: false,
},
},
- apex_available: ["com.android.bt"],
+ compile_multilib: "both",
+ multilib: {
+ lib32: {
+ suffix: "32",
+ },
+ lib64: {
+ suffix: "64",
+ },
+ },
+ apex_available: [
+ "//apex_available:platform",
+ "com.android.bt",
+ ],
}
rust_ffi_static {
@@ -92,7 +109,6 @@ rust_ffi_static {
rust_test {
name: "libbluetooth_core_rs_test",
host_supported: true,
- test_suites: ["general-tests"],
defaults: ["libbluetooth_core_rs_defaults"],
rustlibs: [
"libbluetooth_aconfig_flags_rust",
diff --git a/system/test/Android.bp b/system/test/Android.bp
index 0639623c59..c965355dcc 100644
--- a/system/test/Android.bp
+++ b/system/test/Android.bp
@@ -618,7 +618,7 @@ cc_defaults {
name: "mts_defaults",
target: {
android: {
- test_config_template: ":BluetoothTestConfigTemplate",
+ test_config_template: ":BluetoothGTestConfigTemplate",
test_suites: ["mts-bt"],
},
},