Donate to e Foundation | Murena handsets with /e/OS | Own a part of Murena! Learn more

Commit 058ed46d authored by Etan Cohen's avatar Etan Cohen Committed by android-build-merger
Browse files

Merge "[WIFI] Restore initialization code" am: 8f4416aa

am: 3ae14f0e

Change-Id: I96f5c77e7f9ee3b84f4a6cf7973638d3d4bba68d
parents a0032e39 3ae14f0e
Loading
Loading
Loading
Loading
+5 −2
Original line number Diff line number Diff line
@@ -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",
+0 −8
Original line number Diff line number Diff line
@@ -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);
+0 −8
Original line number Diff line number Diff line
@@ -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;
+9 −5
Original line number Diff line number Diff line
@@ -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 {}
};
 No newline at end of file