Wifi: P2P VTS tests fail with no P2P support

Skip P2P tests if P2P is not supported.

Bug: 200064365
Test: run vts -m VtsHalWifiSupplicantP2pV1_4TargetTest
Change-Id: I6ba23bb27f24700980cab28d1ff806e5efc65ec9
(cherry picked from commit b676061cd5)
(cherry picked from commit 4d81b6562dca69a3334bcb87756539fbdaedcd2d)
This commit is contained in:
Blair Prescott
2021-09-15 14:50:56 -07:00
committed by Sainath Varanasi
parent 78cdf668a8
commit c4f8e466e6

View File

@@ -49,6 +49,9 @@ class SupplicantP2pIfaceHidlTest : public SupplicantHidlTestBaseV1_4 {
public:
virtual void SetUp() override {
SupplicantHidlTestBaseV1_4::SetUp();
if (!isP2pOn_) {
GTEST_SKIP() << "Wi-Fi Direct is not supported, skip this test.";
}
p2p_iface_ = getSupplicantP2pIface_1_4(supplicant_);
ASSERT_NE(p2p_iface_.get(), nullptr);
}