Asterisk - The Open Source Telephony Project GIT-master-b023714
|
#include "asterisk.h"
#include <sys/stat.h>
#include <stdio.h>
#include "asterisk/file.h"
#include "asterisk/paths.h"
#include "asterisk/test.h"
#include "asterisk/module.h"
#include "asterisk/strings.h"
#include "asterisk/vector.h"
Go to the source code of this file.
Data Structures | |
struct | _filenames |
Macros | |
#define | FOUND -7 |
Functions | |
static void | __reg_module (void) |
static void | __unreg_module (void) |
struct ast_module * | AST_MODULE_SELF_SYM (void) |
AST_TEST_DEFINE (read_dirs_test) | |
static int | handle_find_file (const char *dir_name, const char *filename, void *obj) |
static int | load_module (void) |
static void | rm_file (struct ast_str *filename) |
static int | test_files_create (struct ast_test *test, char *dir_name, struct _filenames *filenames, int num) |
static int | test_files_destroy (struct ast_test *test, char *dir_name, struct _filenames *filenames) |
static char * | test_files_get_one (struct _filenames *filenames, int num) |
static int | unload_module (void) |
Variables | |
static struct ast_module_info | __mod_info = { .name = AST_MODULE, .flags = AST_MODFLAG_LOAD_ORDER , .description = "File test module" , .key = ASTERISK_GPL_KEY , .buildopt_sum = AST_BUILDOPT_SUM, .load = load_module, .unload = unload_module, .load_pri = AST_MODPRI_DEFAULT, .support_level = AST_MODULE_SUPPORT_CORE, } |
static const struct ast_module_info * | ast_module_info = &__mod_info |
#define FOUND -7 |
Definition at line 36 of file test_file.c.
|
static |
Definition at line 195 of file test_file.c.
|
static |
Definition at line 195 of file test_file.c.
struct ast_module * AST_MODULE_SELF_SYM | ( | void | ) |
Definition at line 195 of file test_file.c.
AST_TEST_DEFINE | ( | read_dirs_test | ) |
Definition at line 136 of file test_file.c.
References ast_file_read_dirs(), ast_random(), ast_str_alloca, ast_str_buffer(), ast_str_set(), AST_TEST_FAIL, AST_TEST_NOT_RUN, AST_TEST_PASS, ast_test_status_update, FOUND, handle_find_file(), mkdtemp(), NULL, TEST_EXECUTE, test_files_create(), test_files_destroy(), test_files_get_one(), and TEST_INIT.
|
static |
Definition at line 119 of file test_file.c.
References ast_alloca, ast_log, errno, FOUND, and LOG_ERROR.
Referenced by AST_TEST_DEFINE().
|
static |
Definition at line 189 of file test_file.c.
References AST_MODULE_LOAD_SUCCESS, and AST_TEST_REGISTER.
|
static |
Definition at line 40 of file test_file.c.
References ast_free, ast_log, ast_str_buffer(), and LOG_ERROR.
Referenced by test_files_destroy().
|
static |
Definition at line 66 of file test_file.c.
References ast_free, ast_str_buffer(), ast_str_create, ast_str_set(), ast_test_status_update, AST_VECTOR_APPEND, AST_VECTOR_INIT, mkdtemp(), and test_files_destroy().
Referenced by AST_TEST_DEFINE().
|
static |
Definition at line 49 of file test_file.c.
References ast_test_status_update, AST_VECTOR_CALLBACK_VOID, AST_VECTOR_FREE, and rm_file().
Referenced by AST_TEST_DEFINE(), and test_files_create().
|
static |
Definition at line 112 of file test_file.c.
References ast_random(), ast_str_buffer(), and AST_VECTOR_GET.
Referenced by AST_TEST_DEFINE().
|
static |
Definition at line 183 of file test_file.c.
References AST_TEST_UNREGISTER.
|
static |
Definition at line 195 of file test_file.c.
|
static |
Definition at line 195 of file test_file.c.