Diff between cd9a6e7a441321f96f6c78548fe38d2a5b6390d5 and 364db6c20484f9f55816507a3e48512758061e8e

Changed Files

File Additions Deletions Status
android/tester-bluetooth.c +15 -0 modified
android/tester-main.c +11 -0 modified
android/tester-main.h +1 -0 modified

Full Patch

diff --git a/android/tester-bluetooth.c b/android/tester-bluetooth.c
index c912d7d..0f55d9e 100644
--- a/android/tester-bluetooth.c
+++ b/android/tester-bluetooth.c
@@ -30,6 +30,18 @@ static struct test_case bluetooth_init = {
 	.step_num = get_test_case_step_num(dummy_steps),
 };
 
+static struct step bluetooth_enable_success_steps[] = {
+	{
+		.action_result.status = BT_STATUS_SUCCESS,
+		.action = bluetooth_enable_action,
+	},
+};
+static struct test_case bluetooth_enable_success_tc = {
+	.step = bluetooth_enable_success_steps,
+	.title = "Bluetooth Enable - Success",
+	.step_num = get_test_case_step_num(bluetooth_enable_success_steps),
+};
+
 struct queue *get_bluetooth_tests(void)
 {
 	list = queue_new();
@@ -37,6 +49,9 @@ struct queue *get_bluetooth_tests(void)
 	if (!queue_push_tail(list, &bluetooth_init))
 		return NULL;
 
+	if (!queue_push_tail(list, &bluetooth_enable_success_tc))
+		return NULL;
+
 	return list;
 }
 
diff --git a/android/tester-main.c b/android/tester-main.c
index 51326f5..f49ce82 100644
--- a/android/tester-main.c
+++ b/android/tester-main.c
@@ -544,6 +544,17 @@ void dummy_action(void)
 	verify_step(&step, NULL);
 }
 
+void bluetooth_enable_action(void)
+{
+	struct test_data *data = tester_get_data();
+	struct step step;
+
+	memset(&step, 0, sizeof(step));
+	step.action_result.status = data->if_bluetooth->enable();
+
+	verify_step(&step, NULL);
+}
+
 static void generic_test_function(const void *test_data)
 {
 	struct test_data *data = tester_get_data();
diff --git a/android/tester-main.h b/android/tester-main.h
index a4f2ed8..d79e4c5 100644
--- a/android/tester-main.h
+++ b/android/tester-main.h
@@ -91,3 +91,4 @@ void remove_bluetooth_tests(void);
 
 /* Actions */
 void dummy_action(void);
+void bluetooth_enable_action(void);