From a373a8da6b855d0264ade9094ec8ce8810f62a08 Mon Sep 17 00:00:00 2001 From: Cedric Roux Date: Mon, 9 Sep 2024 11:30:59 +0200 Subject: [PATCH] nr rlc: fix standalone tests ./run_tests.sh was not functional anymore because of the introduction of AssertFatal() in nr_rlc_entity.c Including the .h and providing exit_function() solves the problem. --- openair2/LAYER2/nr_rlc/nr_rlc_entity.c | 1 + openair2/LAYER2/nr_rlc/tests/test.c | 9 +++++++++ 2 files changed, 10 insertions(+) diff --git a/openair2/LAYER2/nr_rlc/nr_rlc_entity.c b/openair2/LAYER2/nr_rlc/nr_rlc_entity.c index a4207716f5..edfce652b8 100644 --- a/openair2/LAYER2/nr_rlc/nr_rlc_entity.c +++ b/openair2/LAYER2/nr_rlc/nr_rlc_entity.c @@ -30,6 +30,7 @@ #include "LOG/log.h" #include "common/utils/time_stat.h" +#include "common/utils/assertions.h" static void nr_rlc_entity_get_stats( nr_rlc_entity_t *entity, diff --git a/openair2/LAYER2/nr_rlc/tests/test.c b/openair2/LAYER2/nr_rlc/tests/test.c index 2086dba3c6..04e49c460a 100644 --- a/openair2/LAYER2/nr_rlc/tests/test.c +++ b/openair2/LAYER2/nr_rlc/tests/test.c @@ -207,6 +207,15 @@ void max_retx_reached_ue(void *max_retx_reached_data, exit(1); } +#ifdef _STANDALONE_TESTING_ + +void exit_function(const char *file, const char *function, const int line, const char *s, const int assert) +{ + exit(1); +} + +#endif + int test_main(void) { nr_rlc_entity_t *gnb = NULL;