Merge "[WIFI] Restore initialization code"

This commit is contained in:
Etan Cohen
2017-03-24 16:08:55 +00:00
committed by Gerrit Code Review
4 changed files with 14 additions and 23 deletions

View File

@@ -17,7 +17,7 @@
cc_library_static {
name: "VtsHalWifiV1_0TargetTestUtil",
srcs: [
"VtsHalWifiV1_0TargetTest.cpp",
"wifi_hidl_call_util_selftest.cpp",
"wifi_hidl_test.cpp",
"wifi_hidl_test_utils.cpp"],
@@ -38,6 +38,7 @@ cc_test {
name: "VtsHalWifiV1_0TargetTest",
defaults: ["hidl_defaults"],
srcs: [
"VtsHalWifiV1_0TargetTest.cpp",
"wifi_ap_iface_hidl_test.cpp",
"wifi_chip_hidl_test.cpp",
"wifi_p2p_iface_hidl_test.cpp",
@@ -63,7 +64,9 @@ cc_test {
cc_test {
name: "VtsHalWifiNanV1_0TargetTest",
defaults: ["hidl_defaults"],
srcs: ["wifi_nan_iface_hidl_test.cpp"],
srcs: [
"VtsHalWifiV1_0TargetTest.cpp",
"wifi_nan_iface_hidl_test.cpp"],
shared_libs: [
"libbase",
"liblog",

View File

@@ -20,14 +20,6 @@
#include "wifi_hidl_test_utils.h"
class WifiHidlEnvironment : public ::testing::Environment {
public:
virtual void SetUp() override { stopFramework(); }
virtual void TearDown() override { startFramework(); }
private:
};
int main(int argc, char** argv) {
::testing::AddGlobalTestEnvironment(new WifiHidlEnvironment);
::testing::InitGoogleTest(&argc, argv);

View File

@@ -82,14 +82,6 @@ bool configureChipToSupportIfaceTypeInternal(const sp<IWifiChip>& wifi_chip,
}
} // namespace
void stopFramework() {
ASSERT_EQ(std::system("stop"), 0);
stopWifi();
sleep(5);
}
void startFramework() { ASSERT_EQ(std::system("start"), 0); }
sp<IWifi> getWifi() {
sp<IWifi> wifi = ::testing::VtsHalHidlTargetTestBase::getService<IWifi>();
return wifi;

View File

@@ -24,11 +24,6 @@
#include <android/hardware/wifi/1.0/IWifiRttController.h>
#include <android/hardware/wifi/1.0/IWifiStaIface.h>
// Used to stop the android framework (wifi service) before every
// test.
void stopFramework();
void startFramework();
// Helper functions to obtain references to the various HIDL interface objects.
// 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
@@ -49,3 +44,12 @@ bool configureChipToSupportIfaceType(
android::hardware::wifi::V1_0::ChipModeId* configured_mode_id);
// Used to trigger IWifi.stop() at the end of every test.
void stopWifi();
class WifiHidlEnvironment : public ::testing::Environment {
public:
virtual void SetUp() override {
stopWifi();
sleep(5);
}
virtual void TearDown() override {}
};