Add Unit Tests For Hostapd AIDL
This should allow for testing hostapd AIDL implementation code
Bug: 361651437
Test: libhostapd_aidl_bp_unittest
Change-Id: If67b84ba4a2753b43987b2d79833c9616df73cf9
diff --git a/hostapd/aidl/tests/Android.bp b/hostapd/aidl/tests/Android.bp
new file mode 100644
index 0000000..51444d2
--- /dev/null
+++ b/hostapd/aidl/tests/Android.bp
@@ -0,0 +1,56 @@
+// Copyright (C) 2024 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.
+
+package {
+ default_team: "trendy_team_fwk_wifi_hal",
+ default_applicable_licenses: [
+ "external_wpa_supplicant_8_license",
+ "external_wpa_supplicant_8_hostapd_license",
+ ],
+}
+
+cc_test {
+ name: "libhostapd_aidl_bp_unittest",
+ defaults: [
+ "hostapd_cflags_defaults",
+ ],
+ require_root: true,
+ soc_specific: true,
+ srcs: [
+ "unittests.cpp",
+ ],
+ shared_libs: [
+ "android.hardware.wifi.hostapd-V3-ndk",
+ "libbinder_ndk",
+ "libbase",
+ "libutils",
+ "liblog",
+ ],
+ static_libs: [
+ "libgtest",
+ ],
+ header_libs: [
+ "hostapd_headers",
+ "libhostapd_aidl_headers",
+ ],
+ cppflags: [
+ "-DANDROID_HOSTAPD_UNITTEST",
+ ],
+ test_options: {
+ unit_test: true,
+ },
+ test_suites: [
+ "general-tests",
+ ],
+}