summaryrefslogtreecommitdiffstats
diff options
context:
space:
mode:
authorHolger Hans Peter Freyther <zecke@selfish.org>2010-07-31 22:13:15 +0800
committerHolger Hans Peter Freyther <zecke@selfish.org>2010-07-31 22:13:15 +0800
commitf7630e662cd45b5ac980f546c04a5a10f792cd09 (patch)
tree3afd1a60a218dab7b8bb9c7eb11d81094e9f4022
parentaa45e92b0c6ccf7bf825e3e63ce5ba7648fee6d3 (diff)
sccp_test: Add debug code to the test app to have extended debugging
-rw-r--r--tests/sccp/sccp_test.c25
1 files changed, 25 insertions, 0 deletions
diff --git a/tests/sccp/sccp_test.c b/tests/sccp/sccp_test.c
index 76eab4d..6ddf2fc 100644
--- a/tests/sccp/sccp_test.c
+++ b/tests/sccp/sccp_test.c
@@ -810,9 +810,34 @@ static void test_sccp_parsing(void)
}
}
+static const struct log_info_cat default_categories[] = {
+ [0] = {
+ .name = "DSCCP",
+ .description = "DSCP",
+ .enabled = 1, .loglevel = LOGL_DEBUG,
+ },
+};
+
+static int null_flt()
+{
+ return 1;
+}
+
+const struct log_info log_info = {
+ .filter_fn = null_flt,
+ .cat = default_categories,
+ .num_cat = ARRAY_SIZE(default_categories),
+};
int main(int argc, char **argv)
{
+ struct log_target *stderr_target;
+ log_init(&log_info);
+ stderr_target = log_target_create_stderr();
+ log_add_target(stderr_target);
+
+ sccp_set_log_area(0);
+
test_sccp_system();
test_sccp_send_udt();
test_sccp_udt_communication();