summaryrefslogtreecommitdiff
path: root/android/tester-pan.c
diff options
context:
space:
mode:
authorRavi kumar Veeramally <ravikumar.veeramally@linux.intel.com>2014-08-05 14:19:12 +0300
committerJohan Hedberg <johan.hedberg@intel.com>2014-08-06 10:38:20 +0300
commitc56590911515e5db82a194f36b03fede6588d802 (patch)
tree4291cd88747b62fac9988ac90c6fe703aac71d6b /android/tester-pan.c
parentb3a5e37ed7a8822ca6e5496fa7352e094eb40da4 (diff)
downloadbluez-c56590911515e5db82a194f36b03fede6588d802.tar.gz
android/tester: Add PAN Enable NAP test case
Diffstat (limited to 'android/tester-pan.c')
-rw-r--r--android/tester-pan.c15
1 files changed, 15 insertions, 0 deletions
diff --git a/android/tester-pan.c b/android/tester-pan.c
index abf4b3494..74ced79b4 100644
--- a/android/tester-pan.c
+++ b/android/tester-pan.c
@@ -111,6 +111,16 @@ static void pan_get_local_role_action(void)
schedule_action_verification(step);
}
+static void pan_enable_nap_action(void)
+{
+ struct test_data *data = tester_get_data();
+ struct step *step = g_new0(struct step, 1);
+
+ step->action_status = data->if_pan->enable(BTPAN_ROLE_PANNAP);
+
+ schedule_action_verification(step);
+}
+
static struct test_case test_cases[] = {
TEST_CASE_BREDRLE("PAN Init",
ACTION_SUCCESS(dummy_action, NULL),
@@ -189,6 +199,11 @@ static struct test_case test_cases[] = {
BTPAN_ROLE_PANU, BTPAN_ROLE_PANNAP),
CALLBACK_STATE(CB_BT_ADAPTER_STATE_CHANGED, BT_STATE_OFF),
),
+ TEST_CASE_BREDRLE("PAN Enable NAP - Success",
+ ACTION_SUCCESS(pan_enable_nap_action, NULL),
+ CALLBACK_PAN_CTRL_STATE(CB_PAN_CONTROL_STATE, BT_STATUS_SUCCESS,
+ BTPAN_STATE_ENABLED, BTPAN_ROLE_PANNAP),
+ ),
};
struct queue *get_pan_tests(void)