Merge "Remove dependency on VtsHalHidlTargetTestEnvBase" into rvc-dev
diff --git a/wifi/1.0/vts/functional/Android.bp b/wifi/1.0/vts/functional/Android.bp
index bf77503..2242510 100644
--- a/wifi/1.0/vts/functional/Android.bp
+++ b/wifi/1.0/vts/functional/Android.bp
@@ -38,7 +38,6 @@
name: "VtsHalWifiV1_0TargetTest",
defaults: ["VtsHalTargetTestDefaults"],
srcs: [
- "VtsHalWifiV1_0TargetTest.cpp",
"wifi_chip_hidl_test.cpp",
"wifi_p2p_iface_hidl_test.cpp",
"wifi_rtt_controller_hidl_test.cpp",
@@ -61,7 +60,6 @@
name: "VtsHalWifiNanV1_0TargetTest",
defaults: ["VtsHalTargetTestDefaults"],
srcs: [
- "VtsHalWifiV1_0TargetTest.cpp",
"wifi_chip_hidl_nan_test.cpp",
"wifi_nan_iface_hidl_test.cpp",
],
@@ -79,7 +77,6 @@
name: "VtsHalWifiApV1_0TargetTest",
defaults: ["VtsHalTargetTestDefaults"],
srcs: [
- "VtsHalWifiV1_0TargetTest.cpp",
"wifi_ap_iface_hidl_test.cpp",
"wifi_chip_hidl_ap_test.cpp",
],
diff --git a/wifi/1.0/vts/functional/VtsHalWifiV1_0TargetTest.cpp b/wifi/1.0/vts/functional/VtsHalWifiV1_0TargetTest.cpp
deleted file mode 100644
index 128dae5..0000000
--- a/wifi/1.0/vts/functional/VtsHalWifiV1_0TargetTest.cpp
+++ /dev/null
@@ -1,21 +0,0 @@
-/*
- * Copyright (C) 2016 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.
- */
-
-#include <VtsHalHidlTargetTestEnvBase.h>
-
-// TODO(b/143892896): Remove this file after wifi_hidl_test_utils.cpp is
-// updated.
-::testing::VtsHalHidlTargetTestEnvBase* gEnv = nullptr;
\ No newline at end of file
diff --git a/wifi/1.0/vts/functional/wifi_chip_hidl_test.cpp b/wifi/1.0/vts/functional/wifi_chip_hidl_test.cpp
index 2ea8841..53131ce 100644
--- a/wifi/1.0/vts/functional/wifi_chip_hidl_test.cpp
+++ b/wifi/1.0/vts/functional/wifi_chip_hidl_test.cpp
@@ -44,8 +44,6 @@
using ::android::hardware::wifi::V1_0::WifiStatus;
using ::android::hardware::wifi::V1_0::WifiStatusCode;
-extern WifiHidlEnvironment* gEnv;
-
namespace {
constexpr WifiDebugRingBufferVerboseLevel kDebugRingBufferVerboseLvl =
WifiDebugRingBufferVerboseLevel::VERBOSE;
diff --git a/wifi/1.0/vts/functional/wifi_hidl_test_utils.cpp b/wifi/1.0/vts/functional/wifi_hidl_test_utils.cpp
index 26e4821..c1542dc 100644
--- a/wifi/1.0/vts/functional/wifi_hidl_test_utils.cpp
+++ b/wifi/1.0/vts/functional/wifi_hidl_test_utils.cpp
@@ -41,8 +41,6 @@
using ::android::hardware::hidl_vec;
using ::android::wifi_system::InterfaceTool;
-extern WifiHidlEnvironment* gEnv;
-
namespace {
constexpr uint32_t kHalStartRetryMaxCount = 5;
constexpr uint32_t kHalStartRetryIntervalInMs = 2;
@@ -93,21 +91,8 @@
}
} // namespace
-sp<IWifi> getWifi(const std::string& instance_name) {
- if ((!gEnv && instance_name.empty()) || (gEnv && !instance_name.empty())) {
- ALOGE("instance_name and gEnv must have one and only one set.");
- return nullptr;
- }
- if (gEnv) {
- return ::testing::VtsHalHidlTargetTestBase::getService<IWifi>(
- gEnv->getServiceName<IWifi>());
- } else {
- return IWifi::getService(instance_name);
- }
-}
-
sp<IWifiChip> getWifiChip(const std::string& instance_name) {
- sp<IWifi> wifi = getWifi(instance_name);
+ sp<IWifi> wifi = IWifi::getService(instance_name);
if (!wifi.get()) {
return nullptr;
}
@@ -217,7 +202,7 @@
}
void stopWifi(const std::string& instance_name) {
- sp<IWifi> wifi = getWifi(instance_name);
+ sp<IWifi> wifi = IWifi::getService(instance_name);
ASSERT_NE(wifi, nullptr);
HIDL_INVOKE(wifi, stop);
}
diff --git a/wifi/1.0/vts/functional/wifi_hidl_test_utils.h b/wifi/1.0/vts/functional/wifi_hidl_test_utils.h
index 8660134..d22ed77 100644
--- a/wifi/1.0/vts/functional/wifi_hidl_test_utils.h
+++ b/wifi/1.0/vts/functional/wifi_hidl_test_utils.h
@@ -31,19 +31,16 @@
// Note: We only have a single instance of each of these objects currently.
// These helper functions should be modified to return vectors if we support
// multiple instances.
-// TODO(b/143892896): Remove the default value as part of the cleanup.
-android::sp<android::hardware::wifi::V1_0::IWifi> getWifi(
- const std::string& instance_name = "");
android::sp<android::hardware::wifi::V1_0::IWifiChip> getWifiChip(
- const std::string& instance_name = "");
+ const std::string& instance_name);
android::sp<android::hardware::wifi::V1_0::IWifiApIface> getWifiApIface(
- const std::string& instance_name = "");
+ const std::string& instance_name);
android::sp<android::hardware::wifi::V1_0::IWifiNanIface> getWifiNanIface(
- const std::string& instance_name = "");
+ const std::string& instance_name);
android::sp<android::hardware::wifi::V1_0::IWifiP2pIface> getWifiP2pIface(
- const std::string& instance_name = "");
+ const std::string& instance_name);
android::sp<android::hardware::wifi::V1_0::IWifiStaIface> getWifiStaIface(
- const std::string& instance_name = "");
+ const std::string& instance_name);
// Configure the chip in a mode to support the creation of the provided
// iface type.
bool configureChipToSupportIfaceType(
@@ -51,12 +48,4 @@
android::hardware::wifi::V1_0::IfaceType type,
android::hardware::wifi::V1_0::ChipModeId* configured_mode_id);
// Used to trigger IWifi.stop() at the end of every test.
-void stopWifi(const std::string& instance_name = "");
-
-class WifiHidlEnvironment : public ::testing::VtsHalHidlTargetTestEnvBase {
- protected:
- virtual void HidlSetUp() override {
- stopWifi();
- sleep(5);
- }
-};
+void stopWifi(const std::string& instance_name);
diff --git a/wifi/1.1/vts/functional/Android.bp b/wifi/1.1/vts/functional/Android.bp
index 775031e..d34ae22 100644
--- a/wifi/1.1/vts/functional/Android.bp
+++ b/wifi/1.1/vts/functional/Android.bp
@@ -18,7 +18,6 @@
name: "VtsHalWifiV1_1TargetTest",
defaults: ["VtsHalTargetTestDefaults"],
srcs: [
- "VtsHalWifiV1_1TargetTest.cpp",
"wifi_chip_hidl_test.cpp"],
static_libs: [
"VtsHalWifiV1_0TargetTestUtil",
diff --git a/wifi/1.1/vts/functional/VtsHalWifiV1_1TargetTest.cpp b/wifi/1.1/vts/functional/VtsHalWifiV1_1TargetTest.cpp
deleted file mode 100644
index 4b62b15..0000000
--- a/wifi/1.1/vts/functional/VtsHalWifiV1_1TargetTest.cpp
+++ /dev/null
@@ -1,21 +0,0 @@
-/*
- * Copyright (C) 2016 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.
- */
-
-#include <VtsHalHidlTargetTestEnvBase.h>
-
-// TODO(b/143892896): Remove this file after wifi_hidl_test_utils.cpp is
-// updated.
-::testing::VtsHalHidlTargetTestEnvBase* gEnv = nullptr;
diff --git a/wifi/1.2/vts/functional/Android.bp b/wifi/1.2/vts/functional/Android.bp
index f43e49e..d3de5cf 100644
--- a/wifi/1.2/vts/functional/Android.bp
+++ b/wifi/1.2/vts/functional/Android.bp
@@ -18,7 +18,6 @@
name: "VtsHalWifiV1_2TargetTest",
defaults: ["VtsHalTargetTestDefaults"],
srcs: [
- "VtsHalWifiV1_2TargetTest.cpp",
"wifi_chip_hidl_test.cpp",
"wifi_sta_iface_hidl_test.cpp",
],
@@ -38,7 +37,6 @@
name: "VtsHalWifiNanV1_2TargetTest",
defaults: ["VtsHalTargetTestDefaults"],
srcs: [
- "VtsHalWifiV1_2TargetTest.cpp",
"wifi_nan_iface_hidl_test.cpp",
],
static_libs: [
diff --git a/wifi/1.2/vts/functional/VtsHalWifiV1_2TargetTest.cpp b/wifi/1.2/vts/functional/VtsHalWifiV1_2TargetTest.cpp
deleted file mode 100644
index 52c7a4a..0000000
--- a/wifi/1.2/vts/functional/VtsHalWifiV1_2TargetTest.cpp
+++ /dev/null
@@ -1,21 +0,0 @@
-/*
- * Copyright (C) 2018 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.
- */
-
-#include <VtsHalHidlTargetTestEnvBase.h>
-
-// TODO(b/143892896): Remove this file after wifi_hidl_test_utils.cpp is
-// updated.
-::testing::VtsHalHidlTargetTestEnvBase* gEnv = nullptr;
\ No newline at end of file
diff --git a/wifi/1.3/vts/functional/Android.bp b/wifi/1.3/vts/functional/Android.bp
index fe9c791..457de29 100644
--- a/wifi/1.3/vts/functional/Android.bp
+++ b/wifi/1.3/vts/functional/Android.bp
@@ -18,7 +18,6 @@
name: "VtsHalWifiV1_3TargetTest",
defaults: ["VtsHalTargetTestDefaults"],
srcs: [
- "VtsHalWifiV1_3TargetTest.cpp",
"wifi_chip_hidl_test.cpp",
"wifi_sta_iface_hidl_test.cpp",
],
diff --git a/wifi/1.3/vts/functional/VtsHalWifiV1_3TargetTest.cpp b/wifi/1.3/vts/functional/VtsHalWifiV1_3TargetTest.cpp
deleted file mode 100644
index 52c7a4a..0000000
--- a/wifi/1.3/vts/functional/VtsHalWifiV1_3TargetTest.cpp
+++ /dev/null
@@ -1,21 +0,0 @@
-/*
- * Copyright (C) 2018 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.
- */
-
-#include <VtsHalHidlTargetTestEnvBase.h>
-
-// TODO(b/143892896): Remove this file after wifi_hidl_test_utils.cpp is
-// updated.
-::testing::VtsHalHidlTargetTestEnvBase* gEnv = nullptr;
\ No newline at end of file
diff --git a/wifi/1.4/vts/functional/Android.bp b/wifi/1.4/vts/functional/Android.bp
index d857be1..7e74cbd 100644
--- a/wifi/1.4/vts/functional/Android.bp
+++ b/wifi/1.4/vts/functional/Android.bp
@@ -19,7 +19,6 @@
name: "VtsHalWifiApV1_4TargetTest",
defaults: ["VtsHalTargetTestDefaults"],
srcs: [
- "VtsHalWifiV1_4TargetTest.cpp",
"wifi_ap_iface_hidl_test.cpp",
"wifi_chip_hidl_test.cpp",
"wifi_nan_iface_hidl_test.cpp",
diff --git a/wifi/1.4/vts/functional/VtsHalWifiV1_4TargetTest.cpp b/wifi/1.4/vts/functional/VtsHalWifiV1_4TargetTest.cpp
deleted file mode 100644
index 7e0f3cd..0000000
--- a/wifi/1.4/vts/functional/VtsHalWifiV1_4TargetTest.cpp
+++ /dev/null
@@ -1,21 +0,0 @@
-/*
- * Copyright (C) 2019 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.
- */
-
-#include <VtsHalHidlTargetTestEnvBase.h>
-
-// TODO(b/143892896): Remove this file after wifi_hidl_test_utils.cpp is
-// updated.
-::testing::VtsHalHidlTargetTestEnvBase* gEnv = nullptr;
\ No newline at end of file
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 3507d30..aff0ef7 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
@@ -30,8 +30,6 @@
using ::android::hardware::wifi::V1_4::IWifi;
using ::android::hardware::wifi::V1_4::IWifiApIface;
-extern WifiHidlEnvironment* gEnv;
-
/**
* Fixture to use for all STA Iface HIDL interface tests.
*/
diff --git a/wifi/hostapd/1.0/vts/functional/Android.bp b/wifi/hostapd/1.0/vts/functional/Android.bp
index b53d002..e966d7e 100644
--- a/wifi/hostapd/1.0/vts/functional/Android.bp
+++ b/wifi/hostapd/1.0/vts/functional/Android.bp
@@ -36,7 +36,6 @@
name: "VtsHalWifiHostapdV1_0TargetTest",
defaults: ["VtsHalTargetTestDefaults"],
srcs: [
- "VtsHalWifiHostapdV1_0TargetTest.cpp",
"hostapd_hidl_test.cpp",
],
static_libs: [
diff --git a/wifi/hostapd/1.0/vts/functional/VtsHalWifiHostapdV1_0TargetTest.cpp b/wifi/hostapd/1.0/vts/functional/VtsHalWifiHostapdV1_0TargetTest.cpp
deleted file mode 100644
index 4b62b15..0000000
--- a/wifi/hostapd/1.0/vts/functional/VtsHalWifiHostapdV1_0TargetTest.cpp
+++ /dev/null
@@ -1,21 +0,0 @@
-/*
- * Copyright (C) 2016 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.
- */
-
-#include <VtsHalHidlTargetTestEnvBase.h>
-
-// TODO(b/143892896): Remove this file after wifi_hidl_test_utils.cpp is
-// updated.
-::testing::VtsHalHidlTargetTestEnvBase* gEnv = nullptr;
diff --git a/wifi/hostapd/1.1/vts/functional/Android.bp b/wifi/hostapd/1.1/vts/functional/Android.bp
index c963fe3..8670f2f 100644
--- a/wifi/hostapd/1.1/vts/functional/Android.bp
+++ b/wifi/hostapd/1.1/vts/functional/Android.bp
@@ -18,7 +18,6 @@
name: "VtsHalWifiHostapdV1_1TargetTest",
defaults: ["VtsHalTargetTestDefaults"],
srcs: [
- "VtsHalWifiHostapdV1_1TargetTest.cpp",
"hostapd_hidl_test.cpp",
],
static_libs: [
diff --git a/wifi/hostapd/1.1/vts/functional/VtsHalWifiHostapdV1_1TargetTest.cpp b/wifi/hostapd/1.1/vts/functional/VtsHalWifiHostapdV1_1TargetTest.cpp
deleted file mode 100644
index 7e0f3cd..0000000
--- a/wifi/hostapd/1.1/vts/functional/VtsHalWifiHostapdV1_1TargetTest.cpp
+++ /dev/null
@@ -1,21 +0,0 @@
-/*
- * Copyright (C) 2019 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.
- */
-
-#include <VtsHalHidlTargetTestEnvBase.h>
-
-// TODO(b/143892896): Remove this file after wifi_hidl_test_utils.cpp is
-// updated.
-::testing::VtsHalHidlTargetTestEnvBase* gEnv = nullptr;
\ No newline at end of file
diff --git a/wifi/hostapd/1.2/vts/functional/Android.bp b/wifi/hostapd/1.2/vts/functional/Android.bp
index 50cfdee..4f4a741 100644
--- a/wifi/hostapd/1.2/vts/functional/Android.bp
+++ b/wifi/hostapd/1.2/vts/functional/Android.bp
@@ -18,7 +18,6 @@
name: "VtsHalWifiHostapdV1_2TargetTest",
defaults: ["VtsHalTargetTestDefaults"],
srcs: [
- "VtsHalWifiHostapdV1_2TargetTest.cpp",
"hostapd_hidl_test.cpp",
],
static_libs: [
diff --git a/wifi/hostapd/1.2/vts/functional/VtsHalWifiHostapdV1_2TargetTest.cpp b/wifi/hostapd/1.2/vts/functional/VtsHalWifiHostapdV1_2TargetTest.cpp
deleted file mode 100644
index 7e0f3cd..0000000
--- a/wifi/hostapd/1.2/vts/functional/VtsHalWifiHostapdV1_2TargetTest.cpp
+++ /dev/null
@@ -1,21 +0,0 @@
-/*
- * Copyright (C) 2019 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.
- */
-
-#include <VtsHalHidlTargetTestEnvBase.h>
-
-// TODO(b/143892896): Remove this file after wifi_hidl_test_utils.cpp is
-// updated.
-::testing::VtsHalHidlTargetTestEnvBase* gEnv = nullptr;
\ No newline at end of file
diff --git a/wifi/supplicant/1.0/vts/functional/Android.bp b/wifi/supplicant/1.0/vts/functional/Android.bp
index 8013906..a05cc6b 100644
--- a/wifi/supplicant/1.0/vts/functional/Android.bp
+++ b/wifi/supplicant/1.0/vts/functional/Android.bp
@@ -36,7 +36,6 @@
name: "VtsHalWifiSupplicantV1_0TargetTest",
defaults: ["VtsHalTargetTestDefaults"],
srcs: [
- "VtsHalWifiSupplicantV1_0TargetTest.cpp",
"supplicant_hidl_test.cpp",
"supplicant_sta_iface_hidl_test.cpp",
"supplicant_sta_network_hidl_test.cpp",
diff --git a/wifi/supplicant/1.0/vts/functional/VtsHalWifiSupplicantP2pV1_0TargetTest.cpp b/wifi/supplicant/1.0/vts/functional/VtsHalWifiSupplicantP2pV1_0TargetTest.cpp
index a132707..01840e2 100644
--- a/wifi/supplicant/1.0/vts/functional/VtsHalWifiSupplicantP2pV1_0TargetTest.cpp
+++ b/wifi/supplicant/1.0/vts/functional/VtsHalWifiSupplicantP2pV1_0TargetTest.cpp
@@ -17,10 +17,6 @@
#include <VtsCoreUtil.h>
#include "supplicant_hidl_test_utils.h"
-// TODO(b/143892896): Remove this line after wifi_hidl_test_utils.cpp is
-// updated.
-WifiSupplicantHidlEnvironment* gEnv = nullptr;
-
int main(int argc, char** argv) {
if (!::testing::deviceSupportsFeature("android.hardware.wifi.direct"))
return 0;
diff --git a/wifi/supplicant/1.0/vts/functional/VtsHalWifiSupplicantV1_0TargetTest.cpp b/wifi/supplicant/1.0/vts/functional/VtsHalWifiSupplicantV1_0TargetTest.cpp
deleted file mode 100644
index f582cc1..0000000
--- a/wifi/supplicant/1.0/vts/functional/VtsHalWifiSupplicantV1_0TargetTest.cpp
+++ /dev/null
@@ -1,21 +0,0 @@
-/*
- * Copyright (C) 2016 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.
- */
-
-#include "supplicant_hidl_test_utils.h"
-
-// TODO(b/143892896): Remove this file after wifi_hidl_test_utils.cpp is
-// updated.
-WifiSupplicantHidlEnvironment* gEnv = nullptr;
diff --git a/wifi/supplicant/1.0/vts/functional/supplicant_hidl_test_utils.cpp b/wifi/supplicant/1.0/vts/functional/supplicant_hidl_test_utils.cpp
index d0df4a4..6fe6fc5 100644
--- a/wifi/supplicant/1.0/vts/functional/supplicant_hidl_test_utils.cpp
+++ b/wifi/supplicant/1.0/vts/functional/supplicant_hidl_test_utils.cpp
@@ -50,8 +50,6 @@
using ::android::wifi_system::InterfaceTool;
using ::android::wifi_system::SupplicantManager;
-extern WifiSupplicantHidlEnvironment* gEnv;
-
namespace {
// Helper function to initialize the driver and firmware to STA mode
@@ -176,12 +174,6 @@
ASSERT_FALSE(supplicant_manager.IsSupplicantRunning());
}
-// TODO(b/143892896): Remove old APIs after all supplicant tests are updated.
-void startSupplicantAndWaitForHidlService() {
- startSupplicantAndWaitForHidlService("",
- gEnv->getServiceName<ISupplicant>());
-}
-
void startSupplicantAndWaitForHidlService(
const std::string& wifi_instance_name,
const std::string& supplicant_instance_name) {
@@ -240,21 +232,6 @@
});
}
-// TODO(b/143892896): Remove old APIs after all supplicant tests are updated.
-sp<ISupplicant> getSupplicant() {
- sp<ISupplicant> supplicant =
- ::testing::VtsHalHidlTargetTestBase::getService<ISupplicant>(
- gEnv->getServiceName<ISupplicant>());
- // For 1.1 supplicant, we need to add interfaces at initialization.
- if (is_1_1(supplicant)) {
- addSupplicantStaIface_1_1(supplicant);
- if (gEnv->isP2pOn) {
- addSupplicantP2pIface_1_1(supplicant);
- }
- }
- return supplicant;
-}
-
sp<ISupplicant> getSupplicant(const std::string& supplicant_instance_name,
bool isP2pOn) {
sp<ISupplicant> supplicant =
@@ -269,12 +246,6 @@
return supplicant;
}
-// TODO(b/143892896): Remove old APIs after all supplicant tests are updated.
-sp<ISupplicantStaIface> getSupplicantStaIface() {
- sp<ISupplicant> supplicant = getSupplicant();
- return getSupplicantStaIface(supplicant);
-}
-
sp<ISupplicantStaIface> getSupplicantStaIface(
const sp<ISupplicant>& supplicant) {
if (!supplicant.get()) {
@@ -300,11 +271,6 @@
return sta_iface;
}
-// TODO(b/143892896): Remove old APIs after all supplicant tests are updated.
-sp<ISupplicantStaNetwork> createSupplicantStaNetwork() {
- return createSupplicantStaNetwork(getSupplicant());
-}
-
sp<ISupplicantStaNetwork> createSupplicantStaNetwork(
const sp<ISupplicant>& supplicant) {
sp<ISupplicantStaIface> sta_iface = getSupplicantStaIface(supplicant);
@@ -327,11 +293,6 @@
return sta_network;
}
-// TODO(b/143892896): Remove old APIs after all supplicant tests are updated.
-sp<ISupplicantP2pIface> getSupplicantP2pIface() {
- return getSupplicantP2pIface(getSupplicant());
-}
-
sp<ISupplicantP2pIface> getSupplicantP2pIface(
const sp<ISupplicant>& supplicant) {
if (!supplicant.get()) {
@@ -357,11 +318,6 @@
return p2p_iface;
}
-// TODO(b/143892896): Remove old APIs after all supplicant tests are updated.
-bool turnOnExcessiveLogging() {
- return turnOnExcessiveLogging(getSupplicant());
-}
-
bool turnOnExcessiveLogging(const sp<ISupplicant>& supplicant) {
if (!supplicant.get()) {
return false;
diff --git a/wifi/supplicant/1.0/vts/functional/supplicant_hidl_test_utils.h b/wifi/supplicant/1.0/vts/functional/supplicant_hidl_test_utils.h
index 40ad695..1ccf091 100644
--- a/wifi/supplicant/1.0/vts/functional/supplicant_hidl_test_utils.h
+++ b/wifi/supplicant/1.0/vts/functional/supplicant_hidl_test_utils.h
@@ -28,12 +28,9 @@
#include "wifi_hidl_test_utils.h"
// Used to stop the android wifi framework before every test.
-void stopWifiFramework();
void stopWifiFramework(const std::string& wifi_instance_name);
-void startWifiFramework();
void startWifiFramework(const std::string& wifi_instance_name);
-void stopSupplicant();
void stopSupplicant(const std::string& wifi_instance_name);
// Used to configure the chip, driver and start wpa_supplicant before every
// test.
@@ -63,63 +60,6 @@
const android::sp<android::hardware::wifi::supplicant::V1_0::ISupplicant>&
supplicant);
-// TODO(b/143892896): Remove old APIs after all supplicant tests are updated.
-void startSupplicantAndWaitForHidlService();
-android::sp<android::hardware::wifi::supplicant::V1_0::ISupplicant>
-getSupplicant();
-android::sp<android::hardware::wifi::supplicant::V1_0::ISupplicantStaIface>
-getSupplicantStaIface();
-android::sp<android::hardware::wifi::supplicant::V1_0::ISupplicantStaNetwork>
-createSupplicantStaNetwork();
-android::sp<android::hardware::wifi::supplicant::V1_0::ISupplicantP2pIface>
-getSupplicantP2pIface();
-
bool turnOnExcessiveLogging();
-class WifiSupplicantHidlEnvironment
- : public ::testing::VtsHalHidlTargetTestEnvBase {
- protected:
- virtual void HidlSetUp() override { stopSupplicant(); }
- virtual void HidlTearDown() override {
- startSupplicantAndWaitForHidlService();
- }
-
- public:
- // Whether P2P feature is supported on the device.
- bool isP2pOn = true;
-
- void usage(char* me, char* arg) {
- fprintf(stderr,
- "unrecognized option: %s\n\n"
- "usage: %s <gtest options> <test options>\n\n"
- "test options are:\n\n"
- "-P, --p2p_on: Whether P2P feature is supported\n",
- arg, me);
- }
-
- int initFromOptions(int argc, char** argv) {
- static struct option options[] = {{"p2p_off", no_argument, 0, 'P'},
- {0, 0, 0, 0}};
-
- int c;
- while ((c = getopt_long(argc, argv, "P", options, NULL)) >= 0) {
- switch (c) {
- case 'P':
- isP2pOn = false;
- break;
- default:
- usage(argv[0], argv[optind]);
- return 2;
- }
- }
-
- if (optind < argc) {
- usage(argv[0], argv[optind]);
- return 2;
- }
-
- return 0;
- }
-};
-
#endif /* SUPPLICANT_HIDL_TEST_UTILS_H */
diff --git a/wifi/supplicant/1.1/vts/functional/Android.bp b/wifi/supplicant/1.1/vts/functional/Android.bp
index 6bcfa8a..90a3e87 100644
--- a/wifi/supplicant/1.1/vts/functional/Android.bp
+++ b/wifi/supplicant/1.1/vts/functional/Android.bp
@@ -37,7 +37,6 @@
name: "VtsHalWifiSupplicantV1_1TargetTest",
defaults: ["VtsHalTargetTestDefaults"],
srcs: [
- "VtsHalWifiSupplicantV1_1TargetTest.cpp",
"supplicant_hidl_test.cpp",
"supplicant_sta_iface_hidl_test.cpp",
"supplicant_sta_network_hidl_test.cpp",
diff --git a/wifi/supplicant/1.1/vts/functional/VtsHalWifiSupplicantV1_1TargetTest.cpp b/wifi/supplicant/1.1/vts/functional/VtsHalWifiSupplicantV1_1TargetTest.cpp
deleted file mode 100644
index f582cc1..0000000
--- a/wifi/supplicant/1.1/vts/functional/VtsHalWifiSupplicantV1_1TargetTest.cpp
+++ /dev/null
@@ -1,21 +0,0 @@
-/*
- * Copyright (C) 2016 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.
- */
-
-#include "supplicant_hidl_test_utils.h"
-
-// TODO(b/143892896): Remove this file after wifi_hidl_test_utils.cpp is
-// updated.
-WifiSupplicantHidlEnvironment* gEnv = nullptr;
diff --git a/wifi/supplicant/1.2/vts/functional/Android.bp b/wifi/supplicant/1.2/vts/functional/Android.bp
index 22dec84..80f3658 100644
--- a/wifi/supplicant/1.2/vts/functional/Android.bp
+++ b/wifi/supplicant/1.2/vts/functional/Android.bp
@@ -39,7 +39,6 @@
name: "VtsHalWifiSupplicantV1_2TargetTest",
defaults: ["VtsHalTargetTestDefaults"],
srcs: [
- "VtsHalWifiSupplicantV1_2TargetTest.cpp",
"supplicant_sta_iface_hidl_test.cpp",
"supplicant_sta_network_hidl_test.cpp",
],
@@ -68,7 +67,6 @@
name: "VtsHalWifiSupplicantP2pV1_2TargetTest",
defaults: ["VtsHalTargetTestDefaults"],
srcs: [
- "VtsHalWifiSupplicantP2pV1_2TargetTest.cpp",
"supplicant_p2p_iface_hidl_test.cpp",
],
static_libs: [
diff --git a/wifi/supplicant/1.2/vts/functional/VtsHalWifiSupplicantP2pV1_2TargetTest.cpp b/wifi/supplicant/1.2/vts/functional/VtsHalWifiSupplicantP2pV1_2TargetTest.cpp
index 22bf1db..7edec47 100644
--- a/wifi/supplicant/1.2/vts/functional/VtsHalWifiSupplicantP2pV1_2TargetTest.cpp
+++ b/wifi/supplicant/1.2/vts/functional/VtsHalWifiSupplicantP2pV1_2TargetTest.cpp
@@ -17,10 +17,6 @@
#include <VtsCoreUtil.h>
#include "supplicant_hidl_test_utils.h"
-// TODO(b/143892896): Remove this line after wifi_hidl_test_utils.cpp is
-// updated.
-WifiSupplicantHidlEnvironment* gEnv = nullptr;
-
int main(int argc, char** argv) {
if (!::testing::deviceSupportsFeature("android.hardware.wifi.direct"))
return 0;
diff --git a/wifi/supplicant/1.2/vts/functional/VtsHalWifiSupplicantV1_2TargetTest.cpp b/wifi/supplicant/1.2/vts/functional/VtsHalWifiSupplicantV1_2TargetTest.cpp
deleted file mode 100644
index 9dbeee1..0000000
--- a/wifi/supplicant/1.2/vts/functional/VtsHalWifiSupplicantV1_2TargetTest.cpp
+++ /dev/null
@@ -1,21 +0,0 @@
-/*
- * Copyright (C) 2019 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.
- */
-
-#include "supplicant_hidl_test_utils.h"
-
-// TODO(b/143892896): Remove this file after wifi_hidl_test_utils.cpp is
-// updated.
-WifiSupplicantHidlEnvironment* gEnv = nullptr;
diff --git a/wifi/supplicant/1.3/vts/functional/Android.bp b/wifi/supplicant/1.3/vts/functional/Android.bp
index 3dabe7c..00a0bf7 100644
--- a/wifi/supplicant/1.3/vts/functional/Android.bp
+++ b/wifi/supplicant/1.3/vts/functional/Android.bp
@@ -41,7 +41,6 @@
name: "VtsHalWifiSupplicantV1_3TargetTest",
defaults: ["VtsHalTargetTestDefaults"],
srcs: [
- "VtsHalWifiSupplicantV1_3TargetTest.cpp",
"supplicant_sta_iface_hidl_test.cpp",
"supplicant_sta_network_hidl_test.cpp",
],
diff --git a/wifi/supplicant/1.3/vts/functional/VtsHalWifiSupplicantV1_3TargetTest.cpp b/wifi/supplicant/1.3/vts/functional/VtsHalWifiSupplicantV1_3TargetTest.cpp
deleted file mode 100644
index 9dbeee1..0000000
--- a/wifi/supplicant/1.3/vts/functional/VtsHalWifiSupplicantV1_3TargetTest.cpp
+++ /dev/null
@@ -1,21 +0,0 @@
-/*
- * Copyright (C) 2019 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.
- */
-
-#include "supplicant_hidl_test_utils.h"
-
-// TODO(b/143892896): Remove this file after wifi_hidl_test_utils.cpp is
-// updated.
-WifiSupplicantHidlEnvironment* gEnv = nullptr;