mirror of
				https://github.com/gnss-sdr/gnss-sdr
				synced 2025-10-31 15:23:04 +00:00 
			
		
		
		
	Add new configuration option ENABLE_UNIT_TESTING_EXTRA
If set to ON, it donwload some raw signal files and add more tests to run_tests. This allows a smaller source code tarball. It defaults to OFF
This commit is contained in:
		| @@ -68,6 +68,7 @@ endif(ENABLE_PACKAGING) | |||||||
|  |  | ||||||
| # Testing | # Testing | ||||||
| option(ENABLE_UNIT_TESTING "Build unit tests" ON) | option(ENABLE_UNIT_TESTING "Build unit tests" ON) | ||||||
|  | option(ENABLE_UNIT_TESTING_EXTRA "Download external files and build extra unit tests" OFF) | ||||||
| option(ENABLE_SYSTEM_TESTING "Build system tests" OFF) | option(ENABLE_SYSTEM_TESTING "Build system tests" OFF) | ||||||
| option(ENABLE_SYSTEM_TESTING_EXTRA "Download external tools and build extra system tests" OFF) | option(ENABLE_SYSTEM_TESTING_EXTRA "Download external tools and build extra system tests" OFF) | ||||||
| if(ENABLE_SYSTEM_TESTING_EXTRA) | if(ENABLE_SYSTEM_TESTING_EXTRA) | ||||||
|   | |||||||
| @@ -188,7 +188,20 @@ if(ENABLE_SYSTEM_TESTING_EXTRA) | |||||||
| endif(ENABLE_SYSTEM_TESTING_EXTRA) | endif(ENABLE_SYSTEM_TESTING_EXTRA) | ||||||
|  |  | ||||||
|  |  | ||||||
| add_definitions(-DTEST_PATH="${CMAKE_SOURCE_DIR}/src/tests/") | if(ENABLE_UNIT_TESTING_EXTRA) | ||||||
|  |    add_definitions(-DEXTRA_TESTS) | ||||||
|  |    if(NOT EXISTS ${CMAKE_SOURCE_DIR}/thirdparty/signal_samples/gps_l2c_m_prn7_5msps.dat) | ||||||
|  |       message(STATUS "Downloading some data files for testing...") | ||||||
|  |       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 ) | ||||||
|  |    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/") | ||||||
|  |  | ||||||
| include_directories( | include_directories( | ||||||
|      ${GTEST_INCLUDE_DIRECTORIES} |      ${GTEST_INCLUDE_DIRECTORIES} | ||||||
|   | |||||||
										
											Binary file not shown.
										
									
								
							| @@ -114,10 +114,9 @@ DECLARE_string(log_dir); | |||||||
| #include "unit-tests/signal-processing-blocks/tracking/galileo_e1_dll_pll_veml_tracking_test.cc" | #include "unit-tests/signal-processing-blocks/tracking/galileo_e1_dll_pll_veml_tracking_test.cc" | ||||||
| #include "unit-tests/signal-processing-blocks/tracking/galileo_e5a_tracking_test.cc" | #include "unit-tests/signal-processing-blocks/tracking/galileo_e5a_tracking_test.cc" | ||||||
| #include "unit-tests/signal-processing-blocks/tracking/gps_l2_m_dll_pll_tracking_test.cc" | #include "unit-tests/signal-processing-blocks/tracking/gps_l2_m_dll_pll_tracking_test.cc" | ||||||
| #include "unit-tests/signal-processing-blocks/tracking/gps_l1_ca_dll_pll_tracking_test.cc" |  | ||||||
| #include "unit-tests/signal-processing-blocks/telemetry_decoder/gps_l1_ca_telemetry_decoder_test.cc" |  | ||||||
| #include "unit-tests/signal-processing-blocks/tracking/tracking_loop_filter_test.cc" | #include "unit-tests/signal-processing-blocks/tracking/tracking_loop_filter_test.cc" | ||||||
| #include "unit-tests/signal-processing-blocks/tracking/cpu_multicorrelator_test.cc" | #include "unit-tests/signal-processing-blocks/tracking/cpu_multicorrelator_test.cc" | ||||||
|  |  | ||||||
| #if CUDA_BLOCKS_TEST | #if CUDA_BLOCKS_TEST | ||||||
| #include "unit-tests/signal-processing-blocks/tracking/gpu_multicorrelator_test.cc" | #include "unit-tests/signal-processing-blocks/tracking/gpu_multicorrelator_test.cc" | ||||||
| #endif | #endif | ||||||
| @@ -126,6 +125,11 @@ DECLARE_string(log_dir); | |||||||
| #include "unit-tests/signal-processing-blocks/pvt/rtcm_printer_test.cc" | #include "unit-tests/signal-processing-blocks/pvt/rtcm_printer_test.cc" | ||||||
| #include "unit-tests/signal-processing-blocks/pvt/rinex_printer_test.cc" | #include "unit-tests/signal-processing-blocks/pvt/rinex_printer_test.cc" | ||||||
|  |  | ||||||
|  | #if EXTRA_TESTS | ||||||
|  | #include "unit-tests/signal-processing-blocks/tracking/gps_l1_ca_dll_pll_tracking_test.cc" | ||||||
|  | #include "unit-tests/signal-processing-blocks/telemetry_decoder/gps_l1_ca_telemetry_decoder_test.cc" | ||||||
|  | #endif | ||||||
|  |  | ||||||
| // For GPS NAVIGATION (L1) | // For GPS NAVIGATION (L1) | ||||||
| concurrent_queue<Gps_Acq_Assist> global_gps_acq_assist_queue; | concurrent_queue<Gps_Acq_Assist> global_gps_acq_assist_queue; | ||||||
| concurrent_map<Gps_Acq_Assist> global_gps_acq_assist_map; | concurrent_map<Gps_Acq_Assist> global_gps_acq_assist_map; | ||||||
|   | |||||||
| @@ -50,6 +50,7 @@ | |||||||
| #include "gnss_sdr_valve.h" | #include "gnss_sdr_valve.h" | ||||||
| #include "gnss_synchro.h" | #include "gnss_synchro.h" | ||||||
| #include "gps_l1_ca_telemetry_decoder.h" | #include "gps_l1_ca_telemetry_decoder.h" | ||||||
|  | #include "gps_l1_ca_dll_pll_tracking.h" | ||||||
|  |  | ||||||
| // ######## GNURADIO BLOCK MESSAGE RECEVER FOR TRACKING MESSAGES ######### | // ######## GNURADIO BLOCK MESSAGE RECEVER FOR TRACKING MESSAGES ######### | ||||||
| class GpsL1CADllPllTelemetryDecoderTest_msg_rx; | class GpsL1CADllPllTelemetryDecoderTest_msg_rx; | ||||||
| @@ -244,7 +245,7 @@ TEST_F(GpsL1CATelemetryDecoderTest, ValidationOfResults) | |||||||
|  |  | ||||||
|     ASSERT_NO_THROW( { |     ASSERT_NO_THROW( { | ||||||
|         std::string path = std::string(TEST_PATH); |         std::string path = std::string(TEST_PATH); | ||||||
|         std::string file =  path + "data/gps_l1ca_prn1_2.6msps.dat"; |         std::string file =  path + "signal_samples/gps_l1ca_prn1_2.6msps.dat"; | ||||||
|         const char * file_name = file.c_str(); |         const char * file_name = file.c_str(); | ||||||
|         gr::blocks::file_source::sptr file_source = gr::blocks::file_source::make(sizeof(int8_t), file_name, false); |         gr::blocks::file_source::sptr file_source = gr::blocks::file_source::make(sizeof(int8_t), file_name, false); | ||||||
|         //boost::shared_ptr<gr::block> valve = gnss_sdr_make_valve(sizeof(gr_complex), nsamples, queue); |         //boost::shared_ptr<gr::block> valve = gnss_sdr_make_valve(sizeof(gr_complex), nsamples, queue); | ||||||
|   | |||||||
| @@ -181,7 +181,7 @@ TEST_F(GpsL1CADllPllTrackingTest, ValidationOfResults) | |||||||
|  |  | ||||||
|     ASSERT_NO_THROW( { |     ASSERT_NO_THROW( { | ||||||
|         std::string path = std::string(TEST_PATH); |         std::string path = std::string(TEST_PATH); | ||||||
|         std::string file =  path + "data/gps_l1ca_prn1_2.6msps.dat"; |         std::string file =  path + "signal_samples/gps_l1ca_prn1_2.6msps.dat"; | ||||||
|         const char * file_name = file.c_str(); |         const char * file_name = file.c_str(); | ||||||
|         gr::blocks::file_source::sptr file_source = gr::blocks::file_source::make(sizeof(int8_t), file_name, false); |         gr::blocks::file_source::sptr file_source = gr::blocks::file_source::make(sizeof(int8_t), file_name, false); | ||||||
|         //boost::shared_ptr<gr::block> valve = gnss_sdr_make_valve(sizeof(gr_complex), nsamples, queue); |         //boost::shared_ptr<gr::block> valve = gnss_sdr_make_valve(sizeof(gr_complex), nsamples, queue); | ||||||
|   | |||||||
		Reference in New Issue
	
	Block a user
	 Carles Fernandez
					Carles Fernandez