File tree Expand file tree Collapse file tree 1 file changed +17
-0
lines changed Expand file tree Collapse file tree 1 file changed +17
-0
lines changed Original file line number Diff line number Diff line change 3131 *
3232 */
3333
34+ #if HAVE_CONFIG_H
3435#include "pico/config.h"
36+ #endif
3537
3638#include <check.h>
3739#include <pthread.h>
3840#include "pico/channel.h"
3941#include "pico/channel_rvp.h"
42+
43+ #ifdef HAVE_LIBPICOBT // Only build if Bluetooth is present
44+
4045#include "pico/channel_bt.h"
4146#include "pico/channel_btout.h"
4247#include "mockbt/mockbt.h"
4348
49+ #endif // HAVE_LIBPICOBT // Only build if Bluetooth is present
50+
4451// Defines
4552
4653// Structure definitions
@@ -312,6 +319,8 @@ START_TEST (set_url) {
312319}
313320END_TEST
314321
322+ #ifdef HAVE_LIBPICOBT // Only build if Bluetooth is present
323+
315324START_TEST (channel_set_bt_bluetooth_not_present ) {
316325 RVPChannel * channel ;
317326 bool result ;
@@ -382,6 +391,8 @@ START_TEST (channel_set_bt_error_registering_service) {
382391}
383392END_TEST
384393
394+ #endif // HAVE_LIBPICOBT // Only build if Bluetooth is present
395+
385396int main (void ) {
386397 int number_failed ;
387398 Suite * s ;
@@ -395,8 +406,14 @@ int main (void) {
395406 tcase_add_test (tc , echo_test );
396407 tcase_add_test (tc , get_url );
397408 tcase_add_test (tc , set_url );
409+
410+ #ifdef HAVE_LIBPICOBT // Only build if Bluetooth is present
411+
398412 tcase_add_test (tc , channel_set_bt_bluetooth_not_present );
399413 tcase_add_test (tc , channel_set_bt_error_registering_service );
414+
415+ #endif // HAVE_LIBPICOBT // Only build if Bluetooth is present
416+
400417 suite_add_tcase (s , tc );
401418 sr = srunner_create (s );
402419
You can’t perform that action at this time.
0 commit comments