Disable irrelevant unit/component test by default

master
Xavier Arteaga 4 years ago committed by Andre Puschmann
parent 70d232c917
commit f33731ecd4

@ -85,6 +85,8 @@ option(ENABLE_SRSLOG_TRACING "Enable event tracing using srslog" OFF)
option(ASSERTS_ENABLED "Enable srsRAN asserts" ON)
option(STOP_ON_WARNING "Interrupt application on warning" OFF)
option(ENABLE_ALL_TEST "Enable all unit/component test" OFF)
# Users that want to try this feature need to make sure the lto plugin is
# loaded by bintools (ar, nm, ...). Older versions of bintools will not do
# it automatically so it is necessary to use the gcc wrappers of the compiler
@ -593,6 +595,18 @@ function(add_nr_test)
set_tests_properties(${TNAME} PROPERTIES LABELS "nr;${CTEST_LABELS}")
endfunction()
function(add_nr_advanced_test)
if (NOT ${ENABLE_ALL_TEST})
return()
endif()
add_test(${ARGN})
set(TNAME ${ARGV0})
if(${TNAME} STREQUAL NAME)
set(TNAME ${ARGV1})
endif()
set_tests_properties(${TNAME} PROPERTIES LABELS "nr;${CTEST_LABELS}")
endfunction()
########################################################################
# Add general includes and dependencies
########################################################################

@ -48,7 +48,7 @@ endif(HAVE_AVX512)
### Test LDPC libs
function(ldpc_unit_tests)
foreach(i IN LISTS ARGN)
add_nr_test(NAME ${test_name}-LS${i} COMMAND ${test_command} -l${i}
add_nr_advanced_test(NAME ${test_name}-LS${i} COMMAND ${test_command} -l${i}
WORKING_DIRECTORY ${CMAKE_CURRENT_SOURCE_DIR}/
)
endforeach()
@ -167,36 +167,36 @@ function(ldpc_rm_unit_tests)
math(EXPR tmpN "${N} - (${N} % ${Div})")
math(EXPR E "${Ordval}*(${tmpN})/${Div}") #twice the rate
add_nr_test(NAME ${test_name}-b${bgval}-l${i}-e${E}-f10-m${Modval}-r${rvval}-M${N} COMMAND ${test_command} -b${bgval} -l${i} -e${E} -f10 -m${Modval} -r${rvval} -M${N}
add_nr_advanced_test(NAME ${test_name}-b${bgval}-l${i}-e${E}-f10-m${Modval}-r${rvval}-M${N} COMMAND ${test_command} -b${bgval} -l${i} -e${E} -f10 -m${Modval} -r${rvval} -M${N}
WORKING_DIRECTORY ${CMAKE_CURRENT_SOURCE_DIR}/
)
math(EXPR M "${N} / 2")
# Half size buffer
add_nr_test(NAME ${test_name}-b${bgval}-l${i}-e${E}-f10-m${Modval}-r${rvval}-M${M} COMMAND ${test_command} -b${bgval} -l${i} -e${E} -f10 -m${Modval} -r${rvval} -M${M}
add_nr_advanced_test(NAME ${test_name}-b${bgval}-l${i}-e${E}-f10-m${Modval}-r${rvval}-M${M} COMMAND ${test_command} -b${bgval} -l${i} -e${E} -f10 -m${Modval} -r${rvval} -M${M}
WORKING_DIRECTORY ${CMAKE_CURRENT_SOURCE_DIR}/
)
math(EXPR Div "2*${Ordval}")
math(EXPR tmpN "${N} - (${N} % ${Div})")
math(EXPR E "${Ordval}*(${tmpN})/${Div}") #twice the rate
add_nr_test(NAME ${test_name}-b${bgval}-l${i}-e${E}-f10-m${Modval}-r${rvval}-M${N} COMMAND ${test_command} -b${bgval} -l${i} -e${E} -f10 -m${Modval} -r${rvval} -M${N}
add_nr_advanced_test(NAME ${test_name}-b${bgval}-l${i}-e${E}-f10-m${Modval}-r${rvval}-M${N} COMMAND ${test_command} -b${bgval} -l${i} -e${E} -f10 -m${Modval} -r${rvval} -M${N}
WORKING_DIRECTORY ${CMAKE_CURRENT_SOURCE_DIR}/
)
math(EXPR M "${N}/ 2")
# Half size buffer
add_nr_test(NAME ${test_name}-b${bgval}-l${i}-e${E}-f10-m${Modval}-r${rvval}-M${M} COMMAND ${test_command} -b${bgval} -l${i} -e${E} -f10 -m${Modval} -r${rvval} -M${M}
add_nr_advanced_test(NAME ${test_name}-b${bgval}-l${i}-e${E}-f10-m${Modval}-r${rvval}-M${M} COMMAND ${test_command} -b${bgval} -l${i} -e${E} -f10 -m${Modval} -r${rvval} -M${M}
WORKING_DIRECTORY ${CMAKE_CURRENT_SOURCE_DIR}/
)
math(EXPR Div "${Ordval}")
math(EXPR tmpN "2*${N} - (2*${N} % ${Div})") #Half the rate
math(EXPR E "${Ordval}*(${tmpN})/${Div}")
add_nr_test(NAME ${test_name}-b${bgval}-l${i}-e${E}-f10-m${Modval}-r${rvval}-M${N} COMMAND ${test_command} -b${bgval} -l${i} -e${E} -f10 -m${Modval} -r${rvval} -M${N}
add_nr_advanced_test(NAME ${test_name}-b${bgval}-l${i}-e${E}-f10-m${Modval}-r${rvval}-M${N} COMMAND ${test_command} -b${bgval} -l${i} -e${E} -f10 -m${Modval} -r${rvval} -M${N}
WORKING_DIRECTORY ${CMAKE_CURRENT_SOURCE_DIR}/
)
math(EXPR M "${N}/ 2")
# Half size buffer
add_nr_test(NAME ${test_name}-b${bgval}-l${i}-e${E}-f10-m${Modval}-r${rvval}-M${M} COMMAND ${test_command} -b${bgval} -l${i} -e${E} -f10 -m${Modval} -r${rvval} -M${M}
add_nr_advanced_test(NAME ${test_name}-b${bgval}-l${i}-e${E}-f10-m${Modval}-r${rvval}-M${M} COMMAND ${test_command} -b${bgval} -l${i} -e${E} -f10 -m${Modval} -r${rvval} -M${M}
WORKING_DIRECTORY ${CMAKE_CURRENT_SOURCE_DIR}/
)
endforeach()

@ -28,7 +28,7 @@ function(polar_tests_lite)
list(GET listE ${num} eval)
list(GET listK ${num} kval)
list(GET listI ${num} ival)
add_nr_test(NAME ${test_name}-s${S}-n${nval}-e${eval}-k${kval}-i${ival}
add_nr_advanced_test(NAME ${test_name}-s${S}-n${nval}-e${eval}-k${kval}-i${ival}
COMMAND ${test_command} -s${S} -n${nval} -e${eval} -k${kval} -i${ival}
)
endforeach()
@ -42,7 +42,7 @@ function(polar_tests)
foreach(Kval RANGE 36 164 32)
math(EXPR Emin "${Kval} + 1")
foreach(Eval RANGE ${Emin} 8192 128)
add_nr_test(NAME ${test_name}-s${S}-k${Kval}-e${Eval}-n${nval}-i0
add_nr_advanced_test(NAME ${test_name}-s${S}-k${Kval}-e${Eval}-n${nval}-i0
COMMAND ${test_command} -s${S} -k${Kval} -e${Eval} -n${nval} -i0
)
endforeach()
@ -54,7 +54,7 @@ function(polar_tests)
foreach(Kval RANGE 18 25)
math(EXPR Emin "${Kval} + 3 + 1")
foreach(Eval RANGE ${Emin} 8192 128)
add_nr_test(NAME ${test_name}-s${S}-k${Kval}-e${Eval}-n${nval}-i1
add_nr_advanced_test(NAME ${test_name}-s${S}-k${Kval}-e${Eval}-n${nval}-i1
COMMAND ${test_command} -s${S} -k${Kval} -e${Eval} -n${nval} -i1
)
endforeach()
@ -63,7 +63,7 @@ function(polar_tests)
foreach(Kval RANGE 32 1023 32)
math(EXPR Emin "${Kval} + 1")
foreach(Eval RANGE ${Emin} 8192 128)
add_nr_test(NAME ${test_name}-s${S}-k${Kval}-e${Eval}-n${nval}-i1
add_nr_advanced_test(NAME ${test_name}-s${S}-k${Kval}-e${Eval}-n${nval}-i1
COMMAND ${test_command} -s${S} -k${Kval} -e${Eval} -n${nval} -i1
)
endforeach()

@ -453,11 +453,7 @@ add_lte_test(npdsch_npdcch_dci_formatN1_test npdsch_npdcch_file_test -c 0 -s 1 -
add_executable(pusch_test pusch_test.c)
target_link_libraries(pusch_test srsran_phy)
if (NOT DEFINED TEST_EXTENSION)
set(TEST_EXTENSION Normal)
endif(NOT DEFINED TEST_EXTENSION)
if (TEST_EXTENSION STREQUAL Paranoid)
if (${ENABLE_ALL_TEST})
# All valid number of PRBs for PUSCH
set(cell_n_prb_valid 1 2 3 4 5 6 8 9 10 12 15 16 18 20 24 25 27 30 32 36 40 45 48 50 54 60 64 72 75 80 81 90 96 100)
@ -469,7 +465,7 @@ if (TEST_EXTENSION STREQUAL Paranoid)
set(pusch_cqi none wideband)
else (TEST_EXTENSION STREQUAL Paranoid)
else ()
set(cell_n_prb_valid 50)
set(pusch_min_mcs 0)
@ -480,7 +476,7 @@ else (TEST_EXTENSION STREQUAL Paranoid)
set(pusch_cqi none wideband)
endif (TEST_EXTENSION STREQUAL Paranoid)
endif ()
foreach (cell_n_prb 6 15 25 50 75 100)
set(pusch_cell_n_prb)

Loading…
Cancel
Save