diff options
author | Harald Welte <laforge@gnumonks.org> | 2015-12-25 15:34:22 +0100 |
---|---|---|
committer | Harald Welte <laforge@gnumonks.org> | 2015-12-25 15:34:22 +0100 |
commit | 87ffeb91dc52db2a9aac26b9cd851b3f8ffd0beb (patch) | |
tree | 558299b9f287a9fed3c0d0f05e530bb0c2c2c20f /src/tests/test-hnbap.c | |
parent | 3cfa450fdcc3cb9a47c05c3bc543cb493dd43b20 (diff) |
factor out some common shared test init code
Diffstat (limited to 'src/tests/test-hnbap.c')
-rw-r--r-- | src/tests/test-hnbap.c | 18 |
1 files changed, 5 insertions, 13 deletions
diff --git a/src/tests/test-hnbap.c b/src/tests/test-hnbap.c index 7773b97..0005fe1 100644 --- a/src/tests/test-hnbap.c +++ b/src/tests/test-hnbap.c @@ -24,14 +24,14 @@ #include "hnbap_common.h" #include "hnbap_ies_defs.h" +#include "test_common.h" #include <assert.h> #define ASSERT(x) assert(x) #include <osmocom/core/utils.h> #include <osmocom/core/logging.h> - -void *talloc_asn1_ctx; +#include <osmocom/core/application.h> static const unsigned char hnbap_reg_req[] = { 0x00, 0x01, @@ -161,21 +161,13 @@ void test_asn1_decoding(void) } - -static const struct log_info osmo_log = { - .cat = NULL, - .num_cat = 0, -}; - int main(int argc, char **argv) { int rc; - rc = osmo_init_logging(&osmo_log); - if (rc < 0) { - printf("Error in init logging\n"); - return -1; - } + test_common_init(); + log_set_log_level(osmo_stderr_target, LOGL_INFO); + test_asn1_decoding(); |