From 6f5299b16c3c05f168a15dcf85c17244b36b7a71 Mon Sep 17 00:00:00 2001 From: Jaehyun Kim Date: Tue, 11 Sep 2018 13:17:50 +0900 Subject: [PATCH] Support Softap feature in HAL TC Change-Id: I9592e806316f725f3a5f62cf9cbd808049fbb82e Signed-off-by: Jaehyun Kim --- haltests/haltests.h | 4 +++- haltests/net-config-haltests.cpp | 12 ++++++------ 2 files changed, 9 insertions(+), 7 deletions(-) diff --git a/haltests/haltests.h b/haltests/haltests.h index 495602e..f114a4f 100755 --- a/haltests/haltests.h +++ b/haltests/haltests.h @@ -28,7 +28,8 @@ extern "C" { #define MAX_PATH_LENGTH 256 #define FEATURE_WIFI "http://tizen.org/feature/network.wifi" -#define WIFIDIRECT_FEATURE "http://tizen.org/feature/network.wifi.direct" +#define FEATURE_WIFIDIRECT "http://tizen.org/feature/network.wifi.direct" +#define FEATURE_SOFTAP "http://tizen.org/feature/network.wifi.softap" #define WIFI_ADDRESS_PATH "/sys/class/net/wlan0/address" #define WIFI_P2P_PATH "/sys/class/net/p2p0/address" @@ -39,6 +40,7 @@ GMainLoop *g_pMainLoop; guint g_nTimeoutId; bool g_bFeatureWifi; bool g_bFeatureP2P; +bool g_bFeatureSoftap; #define RUN_GMAIN_LOOP(callback) {\ g_pMainLoop = g_main_loop_new(NULL, false);\ diff --git a/haltests/net-config-haltests.cpp b/haltests/net-config-haltests.cpp index 29dd521..a2866a0 100755 --- a/haltests/net-config-haltests.cpp +++ b/haltests/net-config-haltests.cpp @@ -268,7 +268,7 @@ TEST(Hal_wifi, Deinit_p) TEST(Hal_wifi_direct, Init_p) { - g_bFeatureP2P = __check_feature_supported((char*)WIFIDIRECT_FEATURE); + g_bFeatureP2P = __check_feature_supported((char*)FEATURE_WIFIDIRECT); SKIP_NOT_SUPPORTED(g_bFeatureP2P); int rv = wifi_direct_initialize(); @@ -351,8 +351,8 @@ TEST(Hal_wifi_direct, Deinit_p) TEST(Hal_softap, Init_p) { - g_bFeatureWifi = __check_feature_supported((char*)FEATURE_WIFI); - SKIP_NOT_SUPPORTED(g_bFeatureWifi); + g_bFeatureSoftap = __check_feature_supported((char*)FEATURE_SOFTAP); + SKIP_NOT_SUPPORTED(g_bFeatureSoftap); int ret = SOFTAP_ERROR_NONE; @@ -368,7 +368,7 @@ TEST(Hal_softap, Init_p) TEST(Hal_softap, Activate_p) { - SKIP_NOT_SUPPORTED(g_bFeatureWifi); + SKIP_NOT_SUPPORTED(g_bFeatureSoftap); int ret = SOFTAP_ERROR_NONE; bool enabled = false; @@ -394,7 +394,7 @@ done: TEST(Hal_softap, Deactivate_p) { - SKIP_NOT_SUPPORTED(g_bFeatureWifi); + SKIP_NOT_SUPPORTED(g_bFeatureSoftap); int ret = SOFTAP_ERROR_NONE; @@ -411,7 +411,7 @@ TEST(Hal_softap, Deactivate_p) TEST(Hal_softap, Deinit_p) { - SKIP_NOT_SUPPORTED(g_bFeatureWifi); + SKIP_NOT_SUPPORTED(g_bFeatureSoftap); int ret = SOFTAP_ERROR_NONE; -- 2.7.4