mirror of
https://github.com/gnss-sdr/gnss-sdr
synced 2025-01-13 10:50:34 +00:00
Fix execution of unit tests on a device
When -DENABLE_FPGA=ON, run_tests and all the required aux files are installed on the filesystem
This commit is contained in:
parent
3286ddecde
commit
cfba2ddffb
@ -170,10 +170,10 @@ if(ENABLE_UNIT_TESTING_EXTRA OR ENABLE_SYSTEM_TESTING_EXTRA OR ENABLE_FPGA)
|
||||
add_definitions(-DDEFAULT_RINEX_NAV="/usr/share/gnss-sim/brdc3540.14n")
|
||||
add_definitions(-DDEFAULT_POSITION_FILE="/usr/share/gnss-sim/circle.csv")
|
||||
else(ENABLE_FPGA)
|
||||
set(SW_GENERATOR_BIN ${CMAKE_CURRENT_BINARY_DIR}/../../gnss-sim/gnss_sim)
|
||||
add_definitions(-DSW_GENERATOR_BIN="${SW_GENERATOR_BIN}")
|
||||
add_definitions(-DDEFAULT_RINEX_NAV="${CMAKE_CURRENT_BINARY_DIR}/../../../thirdparty/gnss-sim/brdc3540.14n")
|
||||
add_definitions(-DDEFAULT_POSITION_FILE="${CMAKE_CURRENT_BINARY_DIR}/../../../thirdparty/gnss-sim/circle.csv")
|
||||
set(SW_GENERATOR_BIN ${CMAKE_CURRENT_BINARY_DIR}/../../gnss-sim/gnss_sim)
|
||||
add_definitions(-DSW_GENERATOR_BIN="${SW_GENERATOR_BIN}")
|
||||
add_definitions(-DDEFAULT_RINEX_NAV="${CMAKE_CURRENT_BINARY_DIR}/../../../thirdparty/gnss-sim/brdc3540.14n")
|
||||
add_definitions(-DDEFAULT_POSITION_FILE="${CMAKE_CURRENT_BINARY_DIR}/../../../thirdparty/gnss-sim/circle.csv")
|
||||
endif(ENABLE_FPGA)
|
||||
|
||||
################################################################################
|
||||
@ -217,13 +217,23 @@ if(ENABLE_UNIT_TESTING_EXTRA)
|
||||
file(DOWNLOAD https://sourceforge.net/projects/gnss-sdr/files/data/gps_l2c_m_prn7_5msps.dat ${CMAKE_CURRENT_SOURCE_DIR}/../../thirdparty/signal_samples/gps_l2c_m_prn7_5msps.dat
|
||||
SHOW_PROGRESS
|
||||
EXPECTED_HASH MD5=a6fcbefe155137945d3c33c5ef7bd0f9 )
|
||||
if(ENABLE_FPGA)
|
||||
install(FILES ${CMAKE_CURRENT_SOURCE_DIR}/../../thirdparty/signal_samples/gps_l2c_m_prn7_5msps.dat DESTINATION share/gnss-sdr/signal_samples)
|
||||
endif(ENABLE_FPGA)
|
||||
endif(NOT EXISTS ${CMAKE_SOURCE_DIR}/thirdparty/signal_samples/gps_l2c_m_prn7_5msps.dat)
|
||||
endif(ENABLE_UNIT_TESTING_EXTRA)
|
||||
file(COPY ${CMAKE_SOURCE_DIR}/src/tests/signal_samples/GSoC_CTTC_capture_2012_07_26_4Msps_4ms.dat DESTINATION ${CMAKE_SOURCE_DIR}/thirdparty/signal_samples)
|
||||
file(COPY ${CMAKE_SOURCE_DIR}/src/tests/signal_samples/Galileo_E1_ID_1_Fs_4Msps_8ms.dat DESTINATION ${CMAKE_SOURCE_DIR}/thirdparty/signal_samples)
|
||||
file(COPY ${CMAKE_SOURCE_DIR}/src/tests/signal_samples/GPS_L1_CA_ID_1_Fs_4Msps_2ms.dat DESTINATION ${CMAKE_SOURCE_DIR}/thirdparty/signal_samples)
|
||||
|
||||
add_definitions(-DTEST_PATH="${CMAKE_SOURCE_DIR}/thirdparty/")
|
||||
if(ENABLE_FPGA)
|
||||
install(FILES ${CMAKE_SOURCE_DIR}/src/tests/signal_samples/GSoC_CTTC_capture_2012_07_26_4Msps_4ms.dat DESTINATION share/gnss-sdr/signal_samples)
|
||||
install(FILES ${CMAKE_SOURCE_DIR}/src/tests/signal_samples/Galileo_E1_ID_1_Fs_4Msps_8ms.dat DESTINATION share/gnss-sdr/signal_samples)
|
||||
install(FILES ${CMAKE_SOURCE_DIR}/src/tests/signal_samples/GPS_L1_CA_ID_1_Fs_4Msps_2ms.dat DESTINATION share/gnss-sdr/signal_samples)
|
||||
add_definitions(-DTEST_PATH="${CMAKE_INSTALL_PREFIX}/share/gnss-sdr/")
|
||||
else(ENABLE_FPGA)
|
||||
file(COPY ${CMAKE_SOURCE_DIR}/src/tests/signal_samples/GSoC_CTTC_capture_2012_07_26_4Msps_4ms.dat DESTINATION ${CMAKE_SOURCE_DIR}/thirdparty/signal_samples)
|
||||
file(COPY ${CMAKE_SOURCE_DIR}/src/tests/signal_samples/Galileo_E1_ID_1_Fs_4Msps_8ms.dat DESTINATION ${CMAKE_SOURCE_DIR}/thirdparty/signal_samples)
|
||||
file(COPY ${CMAKE_SOURCE_DIR}/src/tests/signal_samples/GPS_L1_CA_ID_1_Fs_4Msps_2ms.dat DESTINATION ${CMAKE_SOURCE_DIR}/thirdparty/signal_samples)
|
||||
add_definitions(-DTEST_PATH="${CMAKE_SOURCE_DIR}/thirdparty/")
|
||||
endif(ENABLE_FPGA)
|
||||
|
||||
include_directories(
|
||||
${GTEST_INCLUDE_DIRECTORIES}
|
||||
@ -308,6 +318,9 @@ if(ENABLE_UNIT_TESTING)
|
||||
if(NOT ${GTEST_DIR_LOCAL})
|
||||
add_dependencies(run_tests gtest-${gtest_RELEASE})
|
||||
endif(NOT ${GTEST_DIR_LOCAL})
|
||||
if(ENABLE_FPGA)
|
||||
install(TARGETS run_tests RUNTIME DESTINATION bin COMPONENT "run_tests")
|
||||
endif(ENABLE_FPGA)
|
||||
endif(ENABLE_UNIT_TESTING)
|
||||
|
||||
if(ENABLE_FPGA)
|
||||
|
Loading…
Reference in New Issue
Block a user