#include <amxc/amxc_macros.h>
Go to the source code of this file.
◆ test_amxb_ubus_has_setup()
int test_amxb_ubus_has_setup |
( |
UNUSED void ** |
state | ) |
|
Definition at line 89 of file test_amxb_ubus_has.c.
92 printf(
"Ubus socket = %s\n", ubus_sock);
94 amxc_string_init(&txt, 0);
96 amxc_string_reset(&txt);
97 amxc_string_setf(&txt,
"amxrt -u ubus: -B ../mod-amxb-test-ubus.so -A ../test_data/test_nemo.odl &");
98 system(amxc_string_get(&txt, 0));
100 amxc_string_clean(&txt);
102 assert_int_equal(amxb_be_load(
"../mod-amxb-test-ubus.so"), 0);
103 assert_int_equal(amxb_connect(&
bus_ctx, ubus_sock), 0);
static const char * test_amxb_ubus_get_socket(void)
static amxb_bus_ctx_t * bus_ctx
◆ test_amxb_ubus_has_teardown()
int test_amxb_ubus_has_teardown |
( |
UNUSED void ** |
state | ) |
|
Definition at line 110 of file test_amxb_ubus_has.c.
114 system(
"killall amxrt");
116 amxb_be_remove_all();
117 unlink(
"test_config.odl");
◆ test_ubus_has()
void test_ubus_has |
( |
UNUSED void ** |
state | ) |
|
Definition at line 122 of file test_amxb_ubus_has.c.
123 assert_ptr_equal(amxb_be_who_has(
"NeMo.Intf."),
bus_ctx);
124 assert_null(amxb_be_who_has(
"Device.Wifi."));
125 assert_null(amxb_be_who_has(NULL));
126 assert_null(amxb_be_who_has(
""));