Commit 471b5efe authored by Florian Kaltenberger's avatar Florian Kaltenberger

making UE unit tests compile

parent 7ff37059
......@@ -40,10 +40,12 @@ set(DEBUG_PSS True)
set(DEBUG_PHY True)
set(DEBUG_PHY_PROC False)
set(DEBUG_DLSCH True)
set(T_TRACER False)
# standard cmake file for nr ue build
include(../../../../../cmake_targets/CMakeLists.txt)
set(SRC_UNIT_TESTS
${OPENAIR1_DIR}/SIMULATION/NR_UE_PHY/unit_tests/src/pss_util_test.c
${OPENAIR1_DIR}/SIMULATION/NR_UE_PHY/unit_tests/src/dummy_functions.c
......@@ -53,43 +55,43 @@ set(INC_UNIT_TESTS
${OPENAIR1_DIR}/SIMULATION/NR_UE_PHY/unit_tests/src/pss_util_test.h
)
add_executable(pss_test ${OPENAIR1_DIR}/SIMULATION/NR_UE_PHY/unit_tests/src/pss_test.c ${SRC_UNIT_TESTS} ${INC_UNIT_TESTS})
add_executable(pss_test ${OPENAIR1_DIR}/SIMULATION/NR_UE_PHY/unit_tests/src/pss_test.c ${SRC_UNIT_TESTS} )
target_link_libraries(pss_test
-Wl,--start-group UTIL SCHED_NR_UE_LIB PHY PHY_COMMON PHY_UE PHY_NR_UE -Wl,--end-group
pthread m ${ATLAS_LIBRARIES}
)
add_executable(sss_test ${OPENAIR1_DIR}/SIMULATION/NR_UE_PHY/unit_tests/src/sss_test.c ${SRC_UNIT_TESTS} ${INC_UNIT_TESTS})
add_executable(sss_test ${OPENAIR1_DIR}/SIMULATION/NR_UE_PHY/unit_tests/src/sss_test.c ${SRC_UNIT_TESTS} )
target_link_libraries(sss_test
-Wl,--start-group UTIL SCHED_NR_UE_LIB PHY PHY_COMMON PHY_UE PHY_NR_UE -Wl,--end-group
pthread m ${ATLAS_LIBRARIES}
)
add_executable(frame_config_test ${OPENAIR1_DIR}/SIMULATION/NR_UE_PHY/unit_tests/src/frame_config_test.c ${SRC_UNIT_TESTS} ${INC_UNIT_TESTS})
add_executable(frame_config_test ${OPENAIR1_DIR}/SIMULATION/NR_UE_PHY/unit_tests/src/frame_config_test.c ${SRC_UNIT_TESTS} )
target_link_libraries(frame_config_test
-Wl,--start-group UTIL SCHED_NR_UE_LIB PHY PHY_COMMON PHY_UE PHY_NR_UE -Wl,--end-group
pthread m ${ATLAS_LIBRARIES}
)
add_executable(harq_test ${OPENAIR1_DIR}/SIMULATION/NR_UE_PHY/unit_tests/src/harq_test.c ${SRC_UNIT_TESTS} ${INC_UNIT_TESTS})
add_executable(harq_test ${OPENAIR1_DIR}/SIMULATION/NR_UE_PHY/unit_tests/src/harq_test.c ${SRC_UNIT_TESTS} )
target_link_libraries(harq_test
-Wl,--start-group UTIL SCHED_NR_UE_LIB PHY PHY_COMMON PHY_UE PHY_NR_UE -Wl,--end-group
pthread m ${ATLAS_LIBRARIES}
)
add_executable(srs_test ${OPENAIR1_DIR}/SIMULATION/NR_UE_PHY/unit_tests/src/srs_test.c ${SRC_UNIT_TESTS} ${INC_UNIT_TESTS})
add_executable(srs_test ${OPENAIR1_DIR}/SIMULATION/NR_UE_PHY/unit_tests/src/srs_test.c ${SRC_UNIT_TESTS} )
target_link_libraries(srs_test
-Wl,--start-group UTIL SCHED_NR_UE_LIB PHY PHY_COMMON PHY_UE PHY_NR_UE -Wl,--end-group
pthread m ${ATLAS_LIBRARIES}
)
add_executable(pbch_test ${OPENAIR1_DIR}/SIMULATION/NR_UE_PHY/unit_tests/src/pbch_test.c ${SRC_UNIT_TESTS} ${INC_UNIT_TESTS})
add_executable(pbch_test ${OPENAIR1_DIR}/SIMULATION/NR_UE_PHY/unit_tests/src/pbch_test.c ${SRC_UNIT_TESTS} )
target_link_libraries(pbch_test
-Wl,--start-group UTIL SCHED_NR_UE_LIB PHY PHY_COMMON PHY_UE PHY_NR_UE -Wl,--end-group
pthread m ${ATLAS_LIBRARIES}
)
add_executable(pucch_uci_test ${OPENAIR1_DIR}/SIMULATION/NR_UE_PHY/unit_tests/src/pucch_uci_test.c ${SRC_UNIT_TESTS} ${INC_UNIT_TESTS})
add_executable(pucch_uci_test ${OPENAIR1_DIR}/SIMULATION/NR_UE_PHY/unit_tests/src/pucch_uci_test.c ${SRC_UNIT_TESTS} )
target_link_libraries(pucch_uci_test
-Wl,--start-group UTIL SCHED_NR_UE_LIB PHY PHY_COMMON PHY_UE PHY_NR_UE -Wl,--end-group
pthread m ${ATLAS_LIBRARIES}
......
......@@ -111,7 +111,7 @@ void ue_send_mch_sdu(module_id_t module_idP, uint8_t CC_id, frame_t frameP,
uint8_t * sdu, uint16_t sdu_len, uint8_t eNB_index,
uint8_t sync_area){}
int ue_query_mch(uint8_t Mod_id, uint8_t CC_id, uint32_t frame,
int ue_query_mch(module_id_t Mod_id, uint8_t CC_id, uint32_t frame,
sub_frame_t subframe, uint8_t eNB_index,
uint8_t * sync_area, uint8_t * mcch_active){ return(0);}
......
......@@ -101,7 +101,7 @@ int test_synchro_pss_sss_nr(PHY_VARS_NR_UE *PHY_vars_UE, int position_symbol, in
int rate_change = SYNCHRO_RATE_CHANGE_FACTOR;
int decoded_pbch = -1;
set_sequence_pss(PHY_vars_UE, position_symbol, pss_sequence_number, INVALID_PSS_SEQUENCE);
set_sequence_pss(PHY_vars_UE, position_symbol, pss_sequence_number);
synchro_position = pss_synchro_nr(PHY_vars_UE, rate_change);
......@@ -311,7 +311,7 @@ int test_synchro_pss_sss(PHY_VARS_NR_UE *PHY_vars_UE, int position_symbol, int s
exit(0);
}
set_sequence_pss(PHY_vars_UE, position_symbol, sequence_number, sequence_number);
set_sequence_pss(PHY_vars_UE, position_symbol, sequence_number);
synchro_position = pss_synchro_nr(PHY_vars_UE, rate_change);
......
......@@ -59,6 +59,8 @@
#include "../../unit_tests/src/input_buffer_test.h"
#undef DEFINE_VARIABLES_INPUT_BUFFER_TEST_H
#include "common/utils/LOG/log.h"
/************** DEFINE *******************************************/
/*************** LOCAL VARIABLES***********************************/
......@@ -213,13 +215,13 @@ int init_test(unsigned char N_tx, unsigned char N_rx, unsigned char transmission
(void) transmission_mode;
NR_DL_FRAME_PARMS *frame_parms;
int log_level = LOG_TRACE;
int log_level = OAILOG_TRACE;
logInit();
// enable these lines if you need debug info
set_comp_log(PHY,LOG_DEBUG,LOG_HIGH,1);
set_glog(log_level,LOG_HIGH);
//set_comp_log(PHY,LOG_DEBUG,LOG_HIGH,1);
set_glog(log_level);
#ifndef NR_UNIT_TEST
......
Markdown is supported
0%
or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment