diff --git a/wifi/1.0/vts/functional/Android.bp b/wifi/1.0/vts/functional/Android.bp index e4948b4cc2..6c0ebf7637 100644 --- a/wifi/1.0/vts/functional/Android.bp +++ b/wifi/1.0/vts/functional/Android.bp @@ -107,8 +107,10 @@ cc_test { static_libs: [ "VtsHalWifiV1_0TargetTestUtil", "android.hardware.wifi@1.0", + "android.hardware.wifi.hostapd@1.0", "libwifi-system-iface", ], + disable_framework: true, test_suites: [ "general-tests", "vts", diff --git a/wifi/1.0/vts/functional/wifi_ap_iface_hidl_test.cpp b/wifi/1.0/vts/functional/wifi_ap_iface_hidl_test.cpp index 96b4501360..28b16168f5 100644 --- a/wifi/1.0/vts/functional/wifi_ap_iface_hidl_test.cpp +++ b/wifi/1.0/vts/functional/wifi_ap_iface_hidl_test.cpp @@ -15,9 +15,9 @@ */ #include - #include #include +#include #include #include #include @@ -26,6 +26,7 @@ #include "wifi_hidl_test_utils.h" using ::android::sp; +using ::android::hardware::wifi::hostapd::V1_0::IHostapd; using ::android::hardware::wifi::V1_0::IfaceType; using ::android::hardware::wifi::V1_0::IWifi; using ::android::hardware::wifi::V1_0::IWifiApIface; @@ -38,6 +39,10 @@ using ::android::hardware::wifi::V1_0::WifiStatusCode; class WifiApIfaceHidlTest : public ::testing::TestWithParam { public: virtual void SetUp() override { + if (android::hardware::getAllHalInstanceNames(IHostapd::descriptor) + .empty()) { + GTEST_SKIP() << "Device does not support AP"; + } // Make sure test starts with a clean state stopWifi(GetInstanceName()); diff --git a/wifi/1.0/vts/functional/wifi_chip_hidl_ap_test.cpp b/wifi/1.0/vts/functional/wifi_chip_hidl_ap_test.cpp index 2e6ad32d64..66e1a807f0 100644 --- a/wifi/1.0/vts/functional/wifi_chip_hidl_ap_test.cpp +++ b/wifi/1.0/vts/functional/wifi_chip_hidl_ap_test.cpp @@ -15,9 +15,9 @@ */ #include - #include #include +#include #include #include #include @@ -26,6 +26,7 @@ #include "wifi_hidl_test_utils.h" using ::android::sp; +using ::android::hardware::wifi::hostapd::V1_0::IHostapd; using ::android::hardware::wifi::V1_0::ChipModeId; using ::android::hardware::wifi::V1_0::IfaceType; using ::android::hardware::wifi::V1_0::IWifi; @@ -41,6 +42,10 @@ using ::android::hardware::wifi::V1_0::WifiStatusCode; class WifiChipHidlApTest : public ::testing::TestWithParam { public: virtual void SetUp() override { + if (android::hardware::getAllHalInstanceNames(IHostapd::descriptor) + .empty()) { + GTEST_SKIP() << "Device does not support AP"; + } // Make sure test starts with a clean state stopWifi(GetInstanceName()); diff --git a/wifi/1.1/vts/functional/Android.bp b/wifi/1.1/vts/functional/Android.bp index 80486425c1..a8f3470c1a 100644 --- a/wifi/1.1/vts/functional/Android.bp +++ b/wifi/1.1/vts/functional/Android.bp @@ -39,6 +39,7 @@ cc_test { "android.hardware.wifi@1.5", "libwifi-system-iface", ], + disable_framework: true, test_suites: [ "general-tests", "vts", diff --git a/wifi/1.4/vts/functional/Android.bp b/wifi/1.4/vts/functional/Android.bp index 14ebbe3bb8..f86869bf61 100644 --- a/wifi/1.4/vts/functional/Android.bp +++ b/wifi/1.4/vts/functional/Android.bp @@ -14,7 +14,6 @@ // limitations under the License. // -// SoftAP-specific tests, similar to VtsHalWifiApV1_0TargetTest. package { // See: http://go/android-license-faq // A large-scale-change added 'default_applicable_licenses' to import @@ -25,10 +24,9 @@ package { } cc_test { - name: "VtsHalWifiApV1_4TargetTest", + name: "VtsHalWifiV1_4TargetTest", defaults: ["VtsHalTargetTestDefaults"], srcs: [ - "wifi_ap_iface_hidl_test.cpp", "wifi_chip_hidl_test.cpp", ], static_libs: [ @@ -46,6 +44,30 @@ cc_test { ], } +// SoftAP-specific tests, similar to VtsHalWifiApV1_0TargetTest. +cc_test { + name: "VtsHalWifiApV1_4TargetTest", + defaults: ["VtsHalTargetTestDefaults"], + srcs: [ + "wifi_ap_iface_hidl_test.cpp", + ], + static_libs: [ + "VtsHalWifiV1_0TargetTestUtil", + "android.hardware.wifi@1.0", + "android.hardware.wifi@1.1", + "android.hardware.wifi@1.2", + "android.hardware.wifi@1.3", + "android.hardware.wifi@1.4", + "android.hardware.wifi.hostapd@1.0", + "libwifi-system-iface", + ], + disable_framework: true, + test_suites: [ + "general-tests", + "vts", + ], +} + // These tests are split out so that they can be conditioned on presence of the // "android.hardware.wifi.aware" feature. cc_test { diff --git a/wifi/1.4/vts/functional/wifi_ap_iface_hidl_test.cpp b/wifi/1.4/vts/functional/wifi_ap_iface_hidl_test.cpp index 5b0f1736ea..756afa5122 100644 --- a/wifi/1.4/vts/functional/wifi_ap_iface_hidl_test.cpp +++ b/wifi/1.4/vts/functional/wifi_ap_iface_hidl_test.cpp @@ -16,6 +16,7 @@ #include #include +#include #include #include #include @@ -25,6 +26,7 @@ using ::android::sp; using ::android::hardware::hidl_array; +using ::android::hardware::wifi::hostapd::V1_0::IHostapd; using ::android::hardware::wifi::V1_0::WifiStatus; using ::android::hardware::wifi::V1_0::WifiStatusCode; using ::android::hardware::wifi::V1_4::IWifi; @@ -36,6 +38,10 @@ using ::android::hardware::wifi::V1_4::IWifiApIface; class WifiApIfaceHidlTest : public ::testing::TestWithParam { public: virtual void SetUp() override { + if (android::hardware::getAllHalInstanceNames(IHostapd::descriptor) + .empty()) { + GTEST_SKIP() << "Device does not support AP"; + } // Make sure to start with a clean state stopWifi(GetInstanceName());