mirror of
https://git.rwth-aachen.de/acs/public/villas/node/
synced 2025-03-09 00:00:00 +01:00
fix compilation of unit tests
This commit is contained in:
parent
1b281be53c
commit
3aa097f006
3 changed files with 8 additions and 6 deletions
11
tests/fpga.c
11
tests/fpga.c
|
@ -13,7 +13,7 @@
|
|||
|
||||
#include <xilinx/xtmrctr.h>
|
||||
|
||||
#include <villas/cfg.h>
|
||||
#include <villas/super_node.h>
|
||||
#include <villas/utils.h>
|
||||
#include <villas/nodes/fpga.h>
|
||||
|
||||
|
@ -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,
|
||||
|
|
|
@ -8,6 +8,7 @@
|
|||
#include <criterion/parameterized.h>
|
||||
|
||||
#include "log.h"
|
||||
#include "utils.h"
|
||||
|
||||
struct param {
|
||||
char *expression;
|
||||
|
|
|
@ -11,6 +11,8 @@
|
|||
#include <villas/log.h>
|
||||
#include <villas/memory.h>
|
||||
|
||||
#include "config.h"
|
||||
|
||||
int main(int argc, char *argv[]) {
|
||||
|
||||
struct criterion_test_set *tests = criterion_initialize();
|
||||
|
|
Loading…
Add table
Reference in a new issue