libamxrt
0.4.2
Ambiorix Run Time Library
|
#include <stdlib.h>
#include <stdio.h>
#include <setjmp.h>
#include <stdarg.h>
#include <cmocka.h>
#include <string.h>
#include <sys/types.h>
#include <sys/stat.h>
#include <unistd.h>
#include "test_amxrt_runtime.h"
Go to the source code of this file.
Data Structures | |
struct | dummy_bus |
Typedefs | |
typedef struct dummy_bus | dummy_bus_t |
Functions | |
int | __wrap_amxb_be_load_multiple (amxc_var_t *const bes) |
int | __wrap_amxb_connect (amxb_bus_ctx_t **ctx, const char *uri) |
int | __wrap_amxb_listen (amxb_bus_ctx_t **ctx, const char *uri) |
int | __wrap_amxb_get_fd (amxb_bus_ctx_t *ctx) |
void | __wrap_amxb_free (amxb_bus_ctx_t **ctx) |
int | __wrap_amxb_register (amxb_bus_ctx_t *ctx, amxd_dm_t *dm) |
int | __wrap_amxb_read (amxb_bus_ctx_t *ctx) |
int | __wrap_amxb_wait_for_object (const char *object) |
int | __wrap_daemon (int nochdir, int noclose) |
int | __wrap_setpriority (int which, id_t who, int value) |
int | __wrap_amxb_be_load_multiple (UNUSED amxc_var_t *const bes) |
int | __wrap_amxb_connect (amxb_bus_ctx_t **ctx, UNUSED const char *uri) |
int | __wrap_amxb_listen (amxb_bus_ctx_t **ctx, UNUSED const char *uri) |
int | __wrap_amxb_get_fd (UNUSED amxb_bus_ctx_t *ctx) |
int | __wrap_amxb_register (UNUSED amxb_bus_ctx_t *ctx, UNUSED amxd_dm_t *dm) |
int | __wrap_amxb_read (UNUSED amxb_bus_ctx_t *ctx) |
int | __wrap_amxb_wait_for_object (UNUSED const char *object) |
int | __wrap_daemon (UNUSED int nochdir, UNUSED int noclose) |
int | __wrap_setpriority (UNUSED int which, UNUSED id_t who, UNUSED int value) |
int | test_runtime_setup (UNUSED void **state) |
int | test_runtime_teardown (UNUSED void **state) |
void | test_runtime_start_prints_help_and_exits (UNUSED void **state) |
void | test_runtime_parses_default_odl (UNUSED void **state) |
void | test_runtime_parses_odls (UNUSED void **state) |
void | test_runtime_parses_odls_and_handle_events (UNUSED void **state) |
void | test_runtime_succeeds_when_no_odl (UNUSED void **state) |
void | test_runtime_fails_when_invalid_odl (UNUSED void **state) |
void | test_runtime_connects_to_uri (UNUSED void **state) |
void | test_runtime_cannot_load_backends (UNUSED void **state) |
void | test_runtime_cannot_connect_bus_uri (UNUSED void **state) |
void | test_runtime_creates_pid_file (UNUSED void **state) |
void | test_runtime_daemon_failed (UNUSED void **state) |
void | test_runtime_set_priority_failed (UNUSED void **state) |
void | test_runtime_parse_args_odl (UNUSED void **state) |
void | test_runtime_parse_args_wrong_odl (UNUSED void **state) |
void | test_runtime_no_pidfile (UNUSED void **state) |
void | test_runtime_parses_post_includes (UNUSED void **state) |
void | test_runtime_opens_syslog (UNUSED void **state) |
void | test_runtime_dumps_config (UNUSED void **state) |
void | test_runtime_enables_system_signals_list (UNUSED void **state) |
void | test_runtime_enables_system_signal (UNUSED void **state) |
void | test_runtime_forced_options_are_kept (UNUSED void **state) |
void | test_runtime_options_can_be_overwritten (UNUSED void **state) |
void | test_runtime_can_pass_option_path (UNUSED void **state) |
void | test_runtime_forced_options_with_path_are_kept (UNUSED void **state) |
void | test_runtime_can_pass_json_value_option (UNUSED void **state) |
void | test_runtime_fails_when_registering_dm_fails (UNUSED void **state) |
void | test_runtime_can_wait_for_objects (UNUSED void **state) |
void | test_runtime_wait_for_objects_can_fail (UNUSED void **state) |
void | test_runtime_can_suspend_events_while_waiting (UNUSED void **state) |
void | test_runtime_stops_el_when_registering_after_wait_fails (UNUSED void **state) |
void | test_runtime_can_create_listen_sockets (UNUSED void **state) |
void | test_runtime_connect_fails_if_no_backends (UNUSED void **state) |
Variables | |
static dummy_bus_t | dummy_ctx |
typedef struct dummy_bus dummy_bus_t |
int __wrap_amxb_be_load_multiple | ( | amxc_var_t *const | bes | ) |
int __wrap_amxb_be_load_multiple | ( | UNUSED amxc_var_t *const | bes | ) |
Definition at line 84 of file test_amxrt_runtime.c.
int __wrap_amxb_connect | ( | amxb_bus_ctx_t ** | ctx, |
const char * | uri | ||
) |
int __wrap_amxb_connect | ( | amxb_bus_ctx_t ** | ctx, |
UNUSED const char * | uri | ||
) |
Definition at line 88 of file test_amxrt_runtime.c.
void __wrap_amxb_free | ( | amxb_bus_ctx_t ** | ctx | ) |
Definition at line 102 of file test_amxrt_runtime.c.
int __wrap_amxb_get_fd | ( | amxb_bus_ctx_t * | ctx | ) |
int __wrap_amxb_get_fd | ( | UNUSED amxb_bus_ctx_t * | ctx | ) |
Definition at line 98 of file test_amxrt_runtime.c.
int __wrap_amxb_listen | ( | amxb_bus_ctx_t ** | ctx, |
const char * | uri | ||
) |
int __wrap_amxb_listen | ( | amxb_bus_ctx_t ** | ctx, |
UNUSED const char * | uri | ||
) |
Definition at line 93 of file test_amxrt_runtime.c.
int __wrap_amxb_read | ( | amxb_bus_ctx_t * | ctx | ) |
int __wrap_amxb_read | ( | UNUSED amxb_bus_ctx_t * | ctx | ) |
Definition at line 110 of file test_amxrt_runtime.c.
int __wrap_amxb_register | ( | amxb_bus_ctx_t * | ctx, |
amxd_dm_t * | dm | ||
) |
int __wrap_amxb_register | ( | UNUSED amxb_bus_ctx_t * | ctx, |
UNUSED amxd_dm_t * | dm | ||
) |
Definition at line 106 of file test_amxrt_runtime.c.
int __wrap_amxb_wait_for_object | ( | const char * | object | ) |
int __wrap_amxb_wait_for_object | ( | UNUSED const char * | object | ) |
Definition at line 117 of file test_amxrt_runtime.c.
int __wrap_daemon | ( | int | nochdir, |
int | noclose | ||
) |
int __wrap_daemon | ( | UNUSED int | nochdir, |
UNUSED int | noclose | ||
) |
Definition at line 121 of file test_amxrt_runtime.c.
int __wrap_setpriority | ( | int | which, |
id_t | who, | ||
int | value | ||
) |
int __wrap_setpriority | ( | UNUSED int | which, |
UNUSED id_t | who, | ||
UNUSED int | value | ||
) |
Definition at line 125 of file test_amxrt_runtime.c.
void test_runtime_can_create_listen_sockets | ( | UNUSED void ** | state | ) |
Definition at line 792 of file test_amxrt_runtime.c.
void test_runtime_can_pass_json_value_option | ( | UNUSED void ** | state | ) |
Definition at line 661 of file test_amxrt_runtime.c.
void test_runtime_can_pass_option_path | ( | UNUSED void ** | state | ) |
Definition at line 604 of file test_amxrt_runtime.c.
void test_runtime_can_suspend_events_while_waiting | ( | UNUSED void ** | state | ) |
Definition at line 750 of file test_amxrt_runtime.c.
void test_runtime_can_wait_for_objects | ( | UNUSED void ** | state | ) |
Definition at line 711 of file test_amxrt_runtime.c.
void test_runtime_cannot_connect_bus_uri | ( | UNUSED void ** | state | ) |
Definition at line 296 of file test_amxrt_runtime.c.
void test_runtime_cannot_load_backends | ( | UNUSED void ** | state | ) |
Definition at line 282 of file test_amxrt_runtime.c.
void test_runtime_connect_fails_if_no_backends | ( | UNUSED void ** | state | ) |
Definition at line 806 of file test_amxrt_runtime.c.
void test_runtime_connects_to_uri | ( | UNUSED void ** | state | ) |
Definition at line 264 of file test_amxrt_runtime.c.
void test_runtime_creates_pid_file | ( | UNUSED void ** | state | ) |
Definition at line 311 of file test_amxrt_runtime.c.
void test_runtime_daemon_failed | ( | UNUSED void ** | state | ) |
Definition at line 359 of file test_amxrt_runtime.c.
void test_runtime_dumps_config | ( | UNUSED void ** | state | ) |
Definition at line 485 of file test_amxrt_runtime.c.
void test_runtime_enables_system_signal | ( | UNUSED void ** | state | ) |
Definition at line 528 of file test_amxrt_runtime.c.
void test_runtime_enables_system_signals_list | ( | UNUSED void ** | state | ) |
Definition at line 505 of file test_amxrt_runtime.c.
void test_runtime_fails_when_invalid_odl | ( | UNUSED void ** | state | ) |
Definition at line 251 of file test_amxrt_runtime.c.
void test_runtime_fails_when_registering_dm_fails | ( | UNUSED void ** | state | ) |
Definition at line 694 of file test_amxrt_runtime.c.
void test_runtime_forced_options_are_kept | ( | UNUSED void ** | state | ) |
Definition at line 551 of file test_amxrt_runtime.c.
void test_runtime_forced_options_with_path_are_kept | ( | UNUSED void ** | state | ) |
Definition at line 632 of file test_amxrt_runtime.c.
void test_runtime_no_pidfile | ( | UNUSED void ** | state | ) |
Definition at line 431 of file test_amxrt_runtime.c.
void test_runtime_opens_syslog | ( | UNUSED void ** | state | ) |
Definition at line 465 of file test_amxrt_runtime.c.
void test_runtime_options_can_be_overwritten | ( | UNUSED void ** | state | ) |
Definition at line 578 of file test_amxrt_runtime.c.
void test_runtime_parse_args_odl | ( | UNUSED void ** | state | ) |
Definition at line 394 of file test_amxrt_runtime.c.
void test_runtime_parse_args_wrong_odl | ( | UNUSED void ** | state | ) |
Definition at line 416 of file test_amxrt_runtime.c.
void test_runtime_parses_default_odl | ( | UNUSED void ** | state | ) |
Definition at line 157 of file test_amxrt_runtime.c.
void test_runtime_parses_odls | ( | UNUSED void ** | state | ) |
Definition at line 192 of file test_amxrt_runtime.c.
void test_runtime_parses_odls_and_handle_events | ( | UNUSED void ** | state | ) |
Definition at line 211 of file test_amxrt_runtime.c.
void test_runtime_parses_post_includes | ( | UNUSED void ** | state | ) |
Definition at line 448 of file test_amxrt_runtime.c.
void test_runtime_set_priority_failed | ( | UNUSED void ** | state | ) |
Definition at line 376 of file test_amxrt_runtime.c.
int test_runtime_setup | ( | UNUSED void ** | state | ) |
Definition at line 129 of file test_amxrt_runtime.c.
void test_runtime_start_prints_help_and_exits | ( | UNUSED void ** | state | ) |
Definition at line 150 of file test_amxrt_runtime.c.
void test_runtime_stops_el_when_registering_after_wait_fails | ( | UNUSED void ** | state | ) |
Definition at line 773 of file test_amxrt_runtime.c.
void test_runtime_succeeds_when_no_odl | ( | UNUSED void ** | state | ) |
Definition at line 233 of file test_amxrt_runtime.c.
int test_runtime_teardown | ( | UNUSED void ** | state | ) |
Definition at line 141 of file test_amxrt_runtime.c.
void test_runtime_wait_for_objects_can_fail | ( | UNUSED void ** | state | ) |
Definition at line 730 of file test_amxrt_runtime.c.
|
static |
Definition at line 71 of file test_amxrt_runtime.c.