OSDN Git Service

supplicant(vts): Compilation fixes
authorRoshan Pius <rpius@google.com>
Tue, 21 Mar 2017 22:44:40 +0000 (15:44 -0700)
committerRoshan Pius <rpius@google.com>
Thu, 30 Mar 2017 21:59:18 +0000 (14:59 -0700)
Fixed couple of compilation failures from .hal changes and made change
to stop/start framework during tests.

Bug: 33457575
Test: mmma -j32 hardware/interfaces/wifi/supplicant/1.0/vts/functional
Change-Id: I1bac68bd71e92b025acdebd0fef8834b826bcfcb

wifi/supplicant/1.0/vts/Android.mk [new file with mode: 0644]
wifi/supplicant/1.0/vts/functional/supplicant_hidl_test_utils.cpp
wifi/supplicant/1.0/vts/functional/supplicant_sta_iface_hidl_test.cpp

diff --git a/wifi/supplicant/1.0/vts/Android.mk b/wifi/supplicant/1.0/vts/Android.mk
new file mode 100644 (file)
index 0000000..6361f9b
--- /dev/null
@@ -0,0 +1,2 @@
+LOCAL_PATH := $(call my-dir)
+include $(call all-makefiles-under,$(LOCAL_PATH))
index 1fcfc8c..df4bfa9 100644 (file)
@@ -136,14 +136,14 @@ class ServiceNotificationListener : public IServiceNotification {
 };
 
 void stopWifiFramework() {
-    ASSERT_EQ(std::system("svc wifi disable"), 0);
+    ASSERT_EQ(std::system("stop"), 0);
     // TODO: Use some other mechanism to wait for the framework to
     // finish disabling.
     sleep(5);
 }
 
 void startWifiFramework() {
-    ASSERT_EQ(std::system("svc wifi enable"), 0);
+    ASSERT_EQ(std::system("start"), 0);
     // These tests don't care whether the framework
     // finished enabling or not.
 }
index c2a58b6..5abf4e0 100644 (file)
@@ -104,11 +104,13 @@ class IfaceCallback : public ISupplicantStaIfaceCallback {
     }
     Return<void> onDisconnected(const hidl_array<uint8_t, 6>& /* bssid */,
                                 bool /* locallyGenerated */,
-                                uint32_t /* reasonCode */) override {
+                                ISupplicantStaIfaceCallback::ReasonCode
+                                /* reasonCode */) override {
         return Void();
     }
     Return<void> onAssociationRejected(
-        const hidl_array<uint8_t, 6>& /* bssid */, uint32_t /* statusCode */,
+        const hidl_array<uint8_t, 6>& /* bssid */,
+        ISupplicantStaIfaceCallback::StatusCode /* statusCode */,
         bool /*timedOut */) override {
         return Void();
     }
@@ -116,6 +118,11 @@ class IfaceCallback : public ISupplicantStaIfaceCallback {
         const hidl_array<uint8_t, 6>& /* bssid */) override {
         return Void();
     }
+    Return<void> onBssidChanged(
+        ISupplicantStaIfaceCallback::BssidChangeReason /* reason */,
+        const hidl_array<uint8_t, 6>& /* bssid */) override {
+        return Void();
+    }
     Return<void> onEapFailure() override { return Void(); }
     Return<void> onWpsEventSuccess() override { return Void(); }
     Return<void> onWpsEventFail(