From 3aa097f0069b07391d65e723d0ff86dbe260d0f9 Mon Sep 17 00:00:00 2001 From: Steffen Vogel Date: Sun, 12 Mar 2017 23:16:33 -0300 Subject: [PATCH] fix compilation of unit tests --- tests/fpga.c | 11 +++++------ tests/log.c | 1 + tests/main.c | 2 ++ 3 files changed, 8 insertions(+), 6 deletions(-) diff --git a/tests/fpga.c b/tests/fpga.c index 79b808a82..a997483c2 100644 --- a/tests/fpga.c +++ b/tests/fpga.c @@ -13,7 +13,7 @@ #include -#include +#include #include #include @@ -32,7 +32,7 @@ #define CPU_HZ 3392389000 static struct fpga_card *card; -static struct super_node cfg; +static struct super_node sn; static void init() { @@ -41,9 +41,9 @@ static void init() char *argv[] = { "tests" }; config_setting_t *cfg_root; - cfg_parse(&cfg, TEST_CONFIG); + super_node_parse_uri(&sn, TEST_CONFIG); - cfg_root = config_root_setting(&cfg.cfg); + cfg_root = config_root_setting(&sn.cfg); ret = fpga_init(argc, argv, cfg_root); cr_assert_eq(ret, 0, "Failed to initilize FPGA"); @@ -61,10 +61,9 @@ static void fini() ret = fpga_card_destroy(card); cr_assert_eq(ret, 0, "Failed to de-initilize FPGA"); - cfg_destroy(&cfg); + super_node_destroy(&sn); } - TestSuite(fpga, .init = init, .fini = fini, diff --git a/tests/log.c b/tests/log.c index 5aee5af96..3718306ac 100644 --- a/tests/log.c +++ b/tests/log.c @@ -8,6 +8,7 @@ #include #include "log.h" +#include "utils.h" struct param { char *expression; diff --git a/tests/main.c b/tests/main.c index 42cfe9f82..fcb12e5f1 100644 --- a/tests/main.c +++ b/tests/main.c @@ -11,6 +11,8 @@ #include #include +#include "config.h" + int main(int argc, char *argv[]) { struct criterion_test_set *tests = criterion_initialize();