mirror of
https://github.com/Evolution-X/hardware_interfaces
synced 2026-02-03 08:54:55 +00:00
Merge "Add VTS tests for wps related APIs in ISupplicantIface" into oc-dev
This commit is contained in:
committed by
Android (Google) Code Review
commit
e70bffdf3c
@@ -42,6 +42,13 @@ constexpr uint8_t kTestMacAddr[] = {0x56, 0x67, 0x67, 0xf4, 0x56, 0x92};
|
||||
constexpr uint8_t kTestPeerMacAddr[] = {0x56, 0x67, 0x55, 0xf4, 0x56, 0x92};
|
||||
constexpr char kTestConnectPin[] = "34556665";
|
||||
constexpr char kTestGroupIfName[] = "TestGroup";
|
||||
constexpr char kTestWpsDeviceName[] = "TestWpsDeviceName";
|
||||
constexpr char kTestWpsManufacturer[] = "TestManufacturer";
|
||||
constexpr char kTestWpsModelName[] = "TestModelName";
|
||||
constexpr char kTestWpsModelNumber[] = "TestModelNumber";
|
||||
constexpr char kTestWpsSerialNumber[] = "TestSerialNumber";
|
||||
constexpr uint8_t kTestWpsDeviceType[] = {[0 ... 7] = 0x01};
|
||||
constexpr uint16_t kTestWpsConfigMethods = 0xffff;
|
||||
constexpr uint32_t kTestConnectGoIntent = 6;
|
||||
constexpr uint32_t kTestFindTimeout = 5;
|
||||
constexpr uint32_t kTestSetGroupIdleTimeout = 6;
|
||||
@@ -464,3 +471,66 @@ TEST_F(SupplicantP2pIfaceHidlTest, SetPowerSave) {
|
||||
SupplicantStatusCode::SUCCESS,
|
||||
HIDL_INVOKE(p2p_iface_, setPowerSave, kTestGroupIfName, false).code);
|
||||
}
|
||||
|
||||
/*
|
||||
* SetWpsDeviceName
|
||||
*/
|
||||
TEST_F(SupplicantP2pIfaceHidlTest, SetWpsDeviceName) {
|
||||
EXPECT_EQ(
|
||||
SupplicantStatusCode::SUCCESS,
|
||||
HIDL_INVOKE(p2p_iface_, setWpsDeviceName, kTestWpsDeviceName).code);
|
||||
}
|
||||
|
||||
/*
|
||||
* SetWpsDeviceType
|
||||
*/
|
||||
TEST_F(SupplicantP2pIfaceHidlTest, SetWpsDeviceType) {
|
||||
EXPECT_EQ(
|
||||
SupplicantStatusCode::SUCCESS,
|
||||
HIDL_INVOKE(p2p_iface_, setWpsDeviceType, kTestWpsDeviceType).code);
|
||||
}
|
||||
|
||||
/*
|
||||
* SetWpsManufacturer
|
||||
*/
|
||||
TEST_F(SupplicantP2pIfaceHidlTest, SetWpsManufacturer) {
|
||||
EXPECT_EQ(
|
||||
SupplicantStatusCode::SUCCESS,
|
||||
HIDL_INVOKE(p2p_iface_, setWpsManufacturer, kTestWpsManufacturer).code);
|
||||
}
|
||||
|
||||
/*
|
||||
* SetWpsModelName
|
||||
*/
|
||||
TEST_F(SupplicantP2pIfaceHidlTest, SetWpsModelName) {
|
||||
EXPECT_EQ(SupplicantStatusCode::SUCCESS,
|
||||
HIDL_INVOKE(p2p_iface_, setWpsModelName, kTestWpsModelName).code);
|
||||
}
|
||||
|
||||
/*
|
||||
* SetWpsModelNumber
|
||||
*/
|
||||
TEST_F(SupplicantP2pIfaceHidlTest, SetWpsModelNumber) {
|
||||
EXPECT_EQ(
|
||||
SupplicantStatusCode::SUCCESS,
|
||||
HIDL_INVOKE(p2p_iface_, setWpsModelNumber, kTestWpsModelNumber).code);
|
||||
}
|
||||
|
||||
/*
|
||||
* SetWpsSerialNumber
|
||||
*/
|
||||
TEST_F(SupplicantP2pIfaceHidlTest, SetWpsSerialNumber) {
|
||||
EXPECT_EQ(
|
||||
SupplicantStatusCode::SUCCESS,
|
||||
HIDL_INVOKE(p2p_iface_, setWpsSerialNumber, kTestWpsSerialNumber).code);
|
||||
}
|
||||
|
||||
/*
|
||||
* SetWpsConfigMethods
|
||||
*/
|
||||
TEST_F(SupplicantP2pIfaceHidlTest, SetWpsConfigMethods) {
|
||||
EXPECT_EQ(
|
||||
SupplicantStatusCode::SUCCESS,
|
||||
HIDL_INVOKE(p2p_iface_, setWpsConfigMethods, kTestWpsConfigMethods)
|
||||
.code);
|
||||
}
|
||||
|
||||
@@ -47,11 +47,18 @@ constexpr ISupplicantStaIface::Hs20AnqpSubtypes kTestHs20Types[] = {
|
||||
ISupplicantStaIface::Hs20AnqpSubtypes::WAN_METRICS,
|
||||
ISupplicantStaIface::Hs20AnqpSubtypes::OPERATOR_FRIENDLY_NAME};
|
||||
constexpr char kTestHs20IconFile[] = "TestFile";
|
||||
constexpr char kTestWpsDeviceName[] = "TestWpsDeviceName";
|
||||
constexpr char kTestWpsManufacturer[] = "TestManufacturer";
|
||||
constexpr char kTestWpsModelName[] = "TestModelName";
|
||||
constexpr char kTestWpsModelNumber[] = "TestModelNumber";
|
||||
constexpr char kTestWpsSerialNumber[] = "TestSerialNumber";
|
||||
constexpr char kTestRadioWorkName[] = "TestRadioWork";
|
||||
constexpr uint32_t kTestRadioWorkFrequency = 2412;
|
||||
constexpr uint32_t kTestRadioWorkTimeout = 8;
|
||||
constexpr uint32_t kTestRadioWorkId = 16;
|
||||
constexpr int8_t kTestCountryCode[] = {'U', 'S'};
|
||||
constexpr uint8_t kTestWpsDeviceType[] = {[0 ... 7] = 0x01};
|
||||
constexpr uint16_t kTestWpsConfigMethods = 0xffff;
|
||||
} // namespace
|
||||
|
||||
class SupplicantStaIfaceHidlTest : public ::testing::VtsHalHidlTargetTestBase {
|
||||
@@ -432,6 +439,69 @@ TEST_F(SupplicantStaIfaceHidlTest, SetCountryCode) {
|
||||
});
|
||||
}
|
||||
|
||||
/*
|
||||
* SetWpsDeviceName
|
||||
*/
|
||||
TEST_F(SupplicantStaIfaceHidlTest, SetWpsDeviceName) {
|
||||
EXPECT_EQ(
|
||||
SupplicantStatusCode::SUCCESS,
|
||||
HIDL_INVOKE(sta_iface_, setWpsDeviceName, kTestWpsDeviceName).code);
|
||||
}
|
||||
|
||||
/*
|
||||
* SetWpsDeviceType
|
||||
*/
|
||||
TEST_F(SupplicantStaIfaceHidlTest, SetWpsDeviceType) {
|
||||
EXPECT_EQ(
|
||||
SupplicantStatusCode::SUCCESS,
|
||||
HIDL_INVOKE(sta_iface_, setWpsDeviceType, kTestWpsDeviceType).code);
|
||||
}
|
||||
|
||||
/*
|
||||
* SetWpsManufacturer
|
||||
*/
|
||||
TEST_F(SupplicantStaIfaceHidlTest, SetWpsManufacturer) {
|
||||
EXPECT_EQ(
|
||||
SupplicantStatusCode::SUCCESS,
|
||||
HIDL_INVOKE(sta_iface_, setWpsManufacturer, kTestWpsManufacturer).code);
|
||||
}
|
||||
|
||||
/*
|
||||
* SetWpsModelName
|
||||
*/
|
||||
TEST_F(SupplicantStaIfaceHidlTest, SetWpsModelName) {
|
||||
EXPECT_EQ(SupplicantStatusCode::SUCCESS,
|
||||
HIDL_INVOKE(sta_iface_, setWpsModelName, kTestWpsModelName).code);
|
||||
}
|
||||
|
||||
/*
|
||||
* SetWpsModelNumber
|
||||
*/
|
||||
TEST_F(SupplicantStaIfaceHidlTest, SetWpsModelNumber) {
|
||||
EXPECT_EQ(
|
||||
SupplicantStatusCode::SUCCESS,
|
||||
HIDL_INVOKE(sta_iface_, setWpsModelNumber, kTestWpsModelNumber).code);
|
||||
}
|
||||
|
||||
/*
|
||||
* SetWpsSerialNumber
|
||||
*/
|
||||
TEST_F(SupplicantStaIfaceHidlTest, SetWpsSerialNumber) {
|
||||
EXPECT_EQ(
|
||||
SupplicantStatusCode::SUCCESS,
|
||||
HIDL_INVOKE(sta_iface_, setWpsSerialNumber, kTestWpsSerialNumber).code);
|
||||
}
|
||||
|
||||
/*
|
||||
* SetWpsConfigMethods
|
||||
*/
|
||||
TEST_F(SupplicantStaIfaceHidlTest, SetWpsConfigMethods) {
|
||||
EXPECT_EQ(
|
||||
SupplicantStatusCode::SUCCESS,
|
||||
HIDL_INVOKE(sta_iface_, setWpsConfigMethods, kTestWpsConfigMethods)
|
||||
.code);
|
||||
}
|
||||
|
||||
/*
|
||||
* SetExternalSim
|
||||
*/
|
||||
|
||||
Reference in New Issue
Block a user