summaryrefslogtreecommitdiff
path: root/net/nimble/host/src/test/ble_gatt_find_s_test.c
diff options
context:
space:
mode:
authorChristopher Collins <ccollins@apache.org>2016-08-23 17:35:28 -0700
committerChristopher Collins <ccollins@apache.org>2016-08-23 17:35:28 -0700
commit70987f7d2e3c791132509f08566fe77de34142ac (patch)
tree269ca9b857f65c22b8f2b93560466984f96091e5 /net/nimble/host/src/test/ble_gatt_find_s_test.c
parent0d9c8f30efbe2dba00b21d9185e9db8e36cd579e (diff)
parent665e22f5722d6348c1b260192e27f69d855b58fd (diff)
Merge branch 'develop' - in preparation for
backwards-compatibility-breaking changes to develop. * develop: (290 commits) sim compiler - replace objsize with size Fix warnings reported by clang. MYNEWT-329 MYNEWT-354 STM32f407 discovery board BSP mbedtls; use smaller version of SHA256. boot; boot loader does not need to call os_init() anymore, as bsp_init() has been exported. boot; app does not need the dependency to mbedtls slinky; time-based waits must use OS_TICKS_PER_SEC. bootutil; adjust unit tests to work with status upkeep outside sys/config. bootutil; was returning wrong image header in response when swithing images. Add boot_set_req() routine for unit test use. boot/bootutil; remove debug console use from bootloader. bootutil/imgmgr; output of boot now shows the fallback image. imgmgr; automatically confirm image as good for now. bootutil; add 'confirm' step, telling that image was confirmed as good. Otherwise next restart we'll go back to old image. bootutil; make status element size depend on flash alignment restrictions. boot, imgmgr; return the slot number for test image. bootutil; move routines reading boot-copy-status from loader.c to bootutil_misc.c. boot; return full flash location of status bytes, instead of just offset. boot; don't use NFFS or FCB for keeping status. Interim commit. ...
Diffstat (limited to 'net/nimble/host/src/test/ble_gatt_find_s_test.c')
-rw-r--r--net/nimble/host/src/test/ble_gatt_find_s_test.c22
1 files changed, 16 insertions, 6 deletions
diff --git a/net/nimble/host/src/test/ble_gatt_find_s_test.c b/net/nimble/host/src/test/ble_gatt_find_s_test.c
index dca1f367..c3ab93df 100644
--- a/net/nimble/host/src/test/ble_gatt_find_s_test.c
+++ b/net/nimble/host/src/test/ble_gatt_find_s_test.c
@@ -46,17 +46,25 @@ ble_gatt_find_s_test_misc_init(void)
static int
ble_gatt_find_s_test_misc_cb(uint16_t conn_handle,
- struct ble_gatt_error *error,
- struct ble_gatt_svc *service,
+ const struct ble_gatt_error *error,
+ const struct ble_gatt_svc *service,
void *arg)
{
TEST_ASSERT(!ble_gatt_find_s_test_proc_complete);
- TEST_ASSERT(error == NULL);
+ TEST_ASSERT(error != NULL);
- if (service == NULL) {
- ble_gatt_find_s_test_proc_complete = 1;
- } else {
+ switch (error->status) {
+ case 0:
ble_gatt_find_s_test_svcs[ble_gatt_find_s_test_num_svcs++] = *service;
+ break;
+
+ case BLE_HS_EDONE:
+ ble_gatt_find_s_test_proc_complete = 1;
+ break;
+
+ default:
+ TEST_ASSERT(0);
+ break;
}
return 0;
@@ -320,6 +328,8 @@ TEST_CASE(ble_gatt_find_s_test_1)
TEST_SUITE(ble_gatt_find_s_test_suite)
{
+ tu_suite_set_post_test_cb(ble_hs_test_util_post_test, NULL);
+
ble_gatt_find_s_test_1();
}