mirror of
https://github.com/gnss-sdr/gnss-sdr
synced 2025-04-05 10:17:03 +00:00
adding 'make check' target
This commit is contained in:
parent
d183623a4e
commit
a9bcc6a155
@ -195,12 +195,13 @@ target_link_libraries(run_tests ${CLANG_FLAGS}
|
||||
#########################################################
|
||||
# ToDo
|
||||
|
||||
#set(CMAKE_CTEST_COMMAND ctest -V)
|
||||
#add_custom_target(check COMMAND ${CMAKE_CTEST_COMMAND})
|
||||
|
||||
set(CMAKE_CTEST_COMMAND ctest -V)
|
||||
add_custom_target(check COMMAND ${CMAKE_CTEST_COMMAND})
|
||||
|
||||
add_executable(control_thread_test EXCLUDE_FROM_ALL
|
||||
${CMAKE_CURRENT_SOURCE_DIR}/single_test_main.cc
|
||||
${CMAKE_CURRENT_SOURCE_DIR}/control_thread/control_message_factory_test.cc
|
||||
# ${CMAKE_CURRENT_SOURCE_DIR}/control_thread/control_thread_test.cc
|
||||
)
|
||||
|
||||
target_link_libraries(control_thread_test ${Boost_LIBRARIES}
|
||||
@ -209,41 +210,38 @@ target_link_libraries(control_thread_test ${Boost_LIBRARIES}
|
||||
${GTEST_LIBRARIES}
|
||||
gnss_sp_libs
|
||||
gnss_rx
|
||||
${VOLK_GNSSSDR_LIBRARIES} ${ORC_LIBRARIES}
|
||||
)
|
||||
|
||||
add_test(control_thread_test control_thread_test)
|
||||
|
||||
|
||||
add_executable(gnss_block_test EXCLUDE_FROM_ALL
|
||||
${CMAKE_CURRENT_SOURCE_DIR}/single_test_main.cc
|
||||
${CMAKE_CURRENT_SOURCE_DIR}/gnss_block/file_signal_source_test.cc
|
||||
${CMAKE_CURRENT_SOURCE_DIR}/gnss_block/fir_filter_test.cc
|
||||
${CMAKE_CURRENT_SOURCE_DIR}/gnss_block/gps_l1_ca_pcps_acquisition_test.cc
|
||||
${CMAKE_CURRENT_SOURCE_DIR}/gnss_block/gps_l1_ca_pcps_acquisition_gsoc2013_test.cc
|
||||
${CMAKE_CURRENT_SOURCE_DIR}/gnss_block/gps_l1_ca_pcps_multithread_acquisition_gsoc2013_test.cc
|
||||
# ${CMAKE_CURRENT_SOURCE_DIR}/gnss_block/gps_l1_ca_pcps_opencl_acquisition_gsoc2013_test.cc
|
||||
${CMAKE_CURRENT_SOURCE_DIR}/gnss_block/gps_l1_ca_pcps_tong_acquisition_gsoc2013_test.cc
|
||||
${CMAKE_CURRENT_SOURCE_DIR}/gnss_block/gps_l1_ca_pcps_quicksync_acquisition_gsoc2014_test.cc
|
||||
${CMAKE_CURRENT_SOURCE_DIR}/gnss_block/galileo_e1_pcps_ambiguous_acquisition_test.cc
|
||||
${CMAKE_CURRENT_SOURCE_DIR}/gnss_block/galileo_e1_pcps_ambiguous_acquisition_gsoc_test.cc
|
||||
${CMAKE_CURRENT_SOURCE_DIR}/gnss_block/galileo_e1_pcps_ambiguous_acquisition_gsoc2013_test.cc
|
||||
${CMAKE_CURRENT_SOURCE_DIR}/gnss_block/galileo_e1_pcps_8ms_ambiguous_acquisition_gsoc2013_test.cc
|
||||
${CMAKE_CURRENT_SOURCE_DIR}/gnss_block/galileo_e1_pcps_cccwsr_ambiguous_acquisition_gsoc2013_test.cc
|
||||
${CMAKE_CURRENT_SOURCE_DIR}/gnss_block/galileo_e1_pcps_quicksync_ambiguous_acquisition_gsoc2014_test.cc
|
||||
${CMAKE_CURRENT_SOURCE_DIR}/gnss_block/galileo_e1_pcps_tong_ambiguous_acquisition_gsoc2013_test.cc
|
||||
#${CMAKE_CURRENT_SOURCE_DIR}/gnss_block/galileo_e1_dll_pll_veml_tracking_test.cc
|
||||
${CMAKE_CURRENT_SOURCE_DIR}/gnss_block/galileo_e1_dll_pll_veml_tracking_test.cc
|
||||
${CMAKE_CURRENT_SOURCE_DIR}/gnss_block/file_output_filter_test.cc
|
||||
${CMAKE_CURRENT_SOURCE_DIR}/gnss_block/gnss_block_factory_test.cc
|
||||
)
|
||||
target_link_libraries(gnss_block_test ${Boost_LIBRARIES}
|
||||
${GFLAGS_LIBS}
|
||||
${GLOG_LIBRARIES}
|
||||
${GTEST_LIBRARIES}
|
||||
${GTEST_LIBRARIES}
|
||||
${GNURADIO_RUNTIME_LIBRARIES}
|
||||
${GNURADIO_BLOCKS_LIBRARIES}
|
||||
${GNURADIO_FILTER_LIBRARIES}
|
||||
${GNURADIO_ANALOG_LIBRARIES}
|
||||
gnss_sp_libs
|
||||
gnss_rx
|
||||
gnss_rx
|
||||
gnss_system_parameters
|
||||
signal_generator_blocks
|
||||
out_adapters
|
||||
${VOLK_GNSSSDR_LIBRARIES} ${ORC_LIBRARIES}
|
||||
)
|
||||
|
||||
add_test(gnss_block_test gnss_block_test)
|
||||
|
||||
add_dependencies(check control_thread_test gnss_block_test)
|
||||
|
||||
|
@ -32,6 +32,7 @@
|
||||
|
||||
|
||||
#include <string>
|
||||
#include <gtest/gtest.h>
|
||||
#include "control_message_factory.h"
|
||||
|
||||
|
||||
|
@ -62,14 +62,14 @@ TEST(Control_Thread_Test, InstantiateRunControlMessages)
|
||||
config->set_property("SignalSource.repeat", "true");
|
||||
config->set_property("SignalConditioner.implementation", "Pass_Through");
|
||||
config->set_property("SignalConditioner.item_type", "gr_complex");
|
||||
config->set_property("Channels.count", "2");
|
||||
config->set_property("Acquisition.implementation", "GPS_L1_CA_PCPS_Acquisition");
|
||||
config->set_property("Acquisition.item_type", "gr_complex");
|
||||
config->set_property("Acquisition.threshold", "0.8");
|
||||
config->set_property("Tracking.implementation", "GPS_L1_CA_DLL_PLL_Tracking");
|
||||
config->set_property("Tracking.item_type", "gr_complex");
|
||||
config->set_property("TelemetryDecoder.implementation", "GPS_L1_CA_Telemetry_Decoder");
|
||||
config->set_property("TelemetryDecoder.item_type", "gr_complex");
|
||||
config->set_property("Channels_GPS.count", "2");
|
||||
config->set_property("Acquisition_GPS.implementation", "GPS_L1_CA_PCPS_Acquisition");
|
||||
config->set_property("Acquisition_GPS.item_type", "gr_complex");
|
||||
config->set_property("Acquisition_GPS.threshold", "0.8");
|
||||
config->set_property("Tracking_GPS.implementation", "GPS_L1_CA_DLL_PLL_Tracking");
|
||||
config->set_property("Tracking_GPS.item_type", "gr_complex");
|
||||
config->set_property("TelemetryDecoder_GPS.implementation", "GPS_L1_CA_Telemetry_Decoder");
|
||||
config->set_property("TelemetryDecoder_GPS.item_type", "gr_complex");
|
||||
config->set_property("Observables.implementation", "GPS_L1_CA_Observables");
|
||||
config->set_property("Observables.item_type", "gr_complex");
|
||||
config->set_property("PVT.implementation", "GPS_L1_CA_PVT");
|
||||
@ -81,8 +81,18 @@ TEST(Control_Thread_Test, InstantiateRunControlMessages)
|
||||
|
||||
gr::msg_queue::sptr control_queue = gr::msg_queue::make(0);
|
||||
//ControlMessageFactory *control_msg_factory = new ControlMessageFactory();
|
||||
std::unique_ptr<ControlMessageFactory> control_msg_factory(new ControlMessageFactory());
|
||||
|
||||
//try
|
||||
//{
|
||||
std::unique_ptr<ControlMessageFactory> control_msg_factory(new ControlMessageFactory());
|
||||
//}
|
||||
//catch( boost::exception & e )
|
||||
//{
|
||||
// std::cout << "Boost exception: " << boost::diagnostic_information(e);
|
||||
//}
|
||||
//catch(std::exception const& ex)
|
||||
//{
|
||||
// std::cout << "STD exception: " << ex.what();
|
||||
//}
|
||||
control_queue->handle(control_msg_factory->GetQueueMessage(0,0));
|
||||
control_queue->handle(control_msg_factory->GetQueueMessage(1,0));
|
||||
control_queue->handle(control_msg_factory->GetQueueMessage(200,0));
|
||||
@ -124,13 +134,13 @@ TEST(Control_Thread_Test, InstantiateRunControlMessages2)
|
||||
config->set_property("SignalSource.repeat", "true");
|
||||
config->set_property("SignalConditioner.implementation", "Pass_Through");
|
||||
config->set_property("SignalConditioner.item_type", "gr_complex");
|
||||
config->set_property("Channels.count", "1");
|
||||
config->set_property("Acquisition.implementation", "GPS_L1_CA_PCPS_Acquisition");
|
||||
config->set_property("Acquisition.item_type", "gr_complex");
|
||||
config->set_property("Tracking.implementation", "GPS_L1_CA_DLL_FLL_PLL_Tracking");
|
||||
config->set_property("Tracking.item_type", "gr_complex");
|
||||
config->set_property("TelemetryDecoder.implementation", "GPS_L1_CA_Telemetry_Decoder");
|
||||
config->set_property("TelemetryDecoder.item_type", "gr_complex");
|
||||
config->set_property("Channels_GPS.count", "1");
|
||||
config->set_property("Acquisition_GPS.implementation", "GPS_L1_CA_PCPS_Acquisition");
|
||||
config->set_property("Acquisition_GPS.item_type", "gr_complex");
|
||||
config->set_property("Tracking_GPS.implementation", "GPS_L1_CA_DLL_FLL_PLL_Tracking");
|
||||
config->set_property("Tracking_GPS.item_type", "gr_complex");
|
||||
config->set_property("TelemetryDecoder_GPS.implementation", "GPS_L1_CA_Telemetry_Decoder");
|
||||
config->set_property("TelemetryDecoder_GPS.item_type", "gr_complex");
|
||||
config->set_property("Observables.implementation", "GPS_L1_CA_Observables");
|
||||
config->set_property("Observables.item_type", "gr_complex");
|
||||
config->set_property("PVT.implementation", "GPS_L1_CA_PVT");
|
||||
@ -145,9 +155,9 @@ TEST(Control_Thread_Test, InstantiateRunControlMessages2)
|
||||
std::unique_ptr<ControlMessageFactory> control_msg_factory2(new ControlMessageFactory());
|
||||
|
||||
control_queue2->handle(control_msg_factory2->GetQueueMessage(0,0));
|
||||
control_queue2->handle(control_msg_factory2->GetQueueMessage(0,2));
|
||||
control_queue2->handle(control_msg_factory2->GetQueueMessage(0,1));
|
||||
control_queue2->handle(control_msg_factory2->GetQueueMessage(0,3));
|
||||
control_queue2->handle(control_msg_factory2->GetQueueMessage(2,0));
|
||||
control_queue2->handle(control_msg_factory2->GetQueueMessage(1,0));
|
||||
control_queue2->handle(control_msg_factory2->GetQueueMessage(3,0));
|
||||
control_queue2->handle(control_msg_factory2->GetQueueMessage(200,0));
|
||||
|
||||
control_thread2->set_control_queue(control_queue2);
|
||||
@ -165,8 +175,8 @@ TEST(Control_Thread_Test, InstantiateRunControlMessages2)
|
||||
std::cout << "STD exception: " << ex.what();
|
||||
}
|
||||
|
||||
unsigned int expected5 = 5;
|
||||
unsigned int expected0 = 0;
|
||||
unsigned int expected1 = 1;
|
||||
EXPECT_EQ(expected5, control_thread2->processed_control_messages());
|
||||
EXPECT_EQ(expected1, control_thread2->applied_actions());
|
||||
EXPECT_EQ(expected1, control_thread2->processed_control_messages());
|
||||
EXPECT_EQ(expected0, control_thread2->applied_actions());
|
||||
}
|
||||
|
@ -29,7 +29,7 @@
|
||||
* -------------------------------------------------------------------------
|
||||
*/
|
||||
|
||||
|
||||
#include <gtest/gtest.h>
|
||||
#include "file_output_filter.h"
|
||||
#include "in_memory_configuration.h"
|
||||
|
||||
|
@ -33,6 +33,7 @@
|
||||
#include <gnuradio/msg_queue.h>
|
||||
#include <gnuradio/top_block.h>
|
||||
#include <gnuradio/blocks/null_sink.h>
|
||||
#include <gtest/gtest.h>
|
||||
#include "file_signal_source.h"
|
||||
#include "in_memory_configuration.h"
|
||||
|
||||
|
@ -36,6 +36,7 @@
|
||||
#include <gnuradio/analog/sig_source_c.h>
|
||||
#include <gnuradio/msg_queue.h>
|
||||
#include <gnuradio/blocks/null_sink.h>
|
||||
#include <gtest/gtest.h>
|
||||
#include "gnss_block_factory.h"
|
||||
#include "gnss_block_interface.h"
|
||||
#include "in_memory_configuration.h"
|
||||
|
@ -40,6 +40,7 @@
|
||||
#include <gnuradio/msg_queue.h>
|
||||
#include <gnuradio/blocks/null_sink.h>
|
||||
#include <gnuradio/blocks/skiphead.h>
|
||||
#include <gtest/gtest.h>
|
||||
#include "gnss_block_factory.h"
|
||||
#include "gnss_block_interface.h"
|
||||
#include "in_memory_configuration.h"
|
||||
|
@ -40,6 +40,7 @@
|
||||
#include <gnuradio/analog/sig_source_c.h>
|
||||
#include <gnuradio/msg_queue.h>
|
||||
#include <gnuradio/blocks/null_sink.h>
|
||||
#include <gtest/gtest.h>
|
||||
#include "gnss_block_factory.h"
|
||||
#include "gnss_block_interface.h"
|
||||
#include "in_memory_configuration.h"
|
||||
|
@ -35,6 +35,7 @@
|
||||
|
||||
#include <vector>
|
||||
#include <gnuradio/msg_queue.h>
|
||||
#include <gtest/gtest.h>
|
||||
#include "in_memory_configuration.h"
|
||||
#include "gnss_block_interface.h"
|
||||
#include "acquisition_interface.h"
|
||||
@ -57,7 +58,6 @@ TEST(GNSS_Block_Factory_Test, InstantiateFileSignalSource)
|
||||
std::shared_ptr<GNSSBlockFactory> factory = std::make_shared<GNSSBlockFactory>();
|
||||
// Example of a block as a shared_ptr
|
||||
std::shared_ptr<GNSSBlockInterface> signal_source = factory->GetSignalSource(configuration, queue);
|
||||
LOG(INFO) << "signal source created";
|
||||
EXPECT_STREQ("SignalSource", signal_source->role().c_str());
|
||||
EXPECT_STREQ("File_Signal_Source", signal_source->implementation().c_str());
|
||||
}
|
||||
|
@ -39,6 +39,7 @@
|
||||
#include <gnuradio/analog/sig_source_c.h>
|
||||
#include <gnuradio/msg_queue.h>
|
||||
#include <gnuradio/blocks/null_sink.h>
|
||||
#include <gtest/gtest.h>
|
||||
#include "gnss_block_interface.h"
|
||||
#include "in_memory_configuration.h"
|
||||
#include "configuration_interface.h"
|
||||
|
@ -40,6 +40,7 @@
|
||||
#include <gnuradio/analog/sig_source_c.h>
|
||||
#include <gnuradio/msg_queue.h>
|
||||
#include <gnuradio/blocks/null_sink.h>
|
||||
#include <gtest/gtest.h>
|
||||
#include "gnss_block_factory.h"
|
||||
#include "gnss_block_interface.h"
|
||||
#include "in_memory_configuration.h"
|
||||
|
@ -41,6 +41,7 @@
|
||||
#include <gnuradio/analog/sig_source_c.h>
|
||||
#include <gnuradio/msg_queue.h>
|
||||
#include <gnuradio/blocks/null_sink.h>
|
||||
#include <gtest/gtest.h>
|
||||
#include "gnss_block_interface.h"
|
||||
#include "in_memory_configuration.h"
|
||||
#include "configuration_interface.h"
|
||||
|
@ -42,11 +42,14 @@
|
||||
#include <gnuradio/analog/sig_source_c.h>
|
||||
#include <gnuradio/msg_queue.h>
|
||||
#include <gnuradio/blocks/null_sink.h>
|
||||
#include <gtest/gtest.h>
|
||||
#include "gnss_block_factory.h"
|
||||
#include "gnss_block_interface.h"
|
||||
#include "in_memory_configuration.h"
|
||||
#include "gnss_sdr_valve.h"
|
||||
#include "gnss_synchro.h"
|
||||
#include "signal_generator.h"
|
||||
#include "signal_generator_c.h"
|
||||
#include "gps_l1_ca_pcps_quicksync_acquisition.h"
|
||||
|
||||
DEFINE_double(value_threshold, 0.3, "Value of the threshold for the acquisition");
|
||||
|
@ -41,6 +41,7 @@
|
||||
#include <gnuradio/analog/sig_source_c.h>
|
||||
#include <gnuradio/msg_queue.h>
|
||||
#include <gnuradio/blocks/null_sink.h>
|
||||
#include <gtest/gtest.h>
|
||||
#include "gnss_block_interface.h"
|
||||
#include "in_memory_configuration.h"
|
||||
#include "configuration_interface.h"
|
||||
|
@ -41,18 +41,32 @@
|
||||
#include "concurrent_queue.h"
|
||||
#include "concurrent_map.h"
|
||||
#include "gps_navigation_message.h"
|
||||
#include "gps_ephemeris.h"
|
||||
#include "gps_acq_assist.h"
|
||||
#include "gps_ref_location.h"
|
||||
#include "gps_ref_time.h"
|
||||
#include "galileo_navigation_message.h"
|
||||
#include "sbas_ionospheric_correction.h"
|
||||
#include "sbas_telemetry_data.h"
|
||||
#include "sbas_ephemeris.h"
|
||||
#include "sbas_satellite_correction.h"
|
||||
|
||||
|
||||
concurrent_queue<Gps_Ephemeris> global_gps_ephemeris_queue2;
|
||||
// concurrent_queue<Gps_Ephemeris> global_gps_ephemeris_queue2;
|
||||
concurrent_queue<Gps_Ephemeris> global_gps_ephemeris_queue;
|
||||
concurrent_queue<Gps_Iono> global_gps_iono_queue;
|
||||
concurrent_queue<Gps_Utc_Model> global_gps_utc_model_queue;
|
||||
concurrent_queue<Gps_Almanac> global_gps_almanac_queue;
|
||||
concurrent_queue<Gps_Acq_Assist> global_gps_acq_assist_queue;
|
||||
concurrent_queue<Gps_Ref_Location> global_gps_ref_location_queue;
|
||||
concurrent_queue<Gps_Ref_Time> global_gps_ref_time_queue;
|
||||
|
||||
concurrent_map<Gps_Ephemeris> global_gps_ephemeris_map;
|
||||
concurrent_map<Gps_Iono> global_gps_iono_map;
|
||||
concurrent_map<Gps_Utc_Model> global_gps_utc_model_map;
|
||||
|
||||
concurrent_map<Gps_Acq_Assist> global_gps_acq_assist_map;
|
||||
concurrent_map<Gps_Ref_Location> global_gps_ref_location_map;
|
||||
concurrent_map<Gps_Ref_Time> global_gps_ref_time_map;
|
||||
|
||||
concurrent_queue<Galileo_Ephemeris> global_galileo_ephemeris_queue;
|
||||
concurrent_queue<Galileo_Iono> global_galileo_iono_queue;
|
||||
|
@ -116,12 +116,16 @@ concurrent_queue<Gps_Iono> global_gps_iono_queue;
|
||||
concurrent_queue<Gps_Utc_Model> global_gps_utc_model_queue;
|
||||
concurrent_queue<Gps_Almanac> global_gps_almanac_queue;
|
||||
concurrent_queue<Gps_Acq_Assist> global_gps_acq_assist_queue;
|
||||
concurrent_queue<Gps_Ref_Location> global_gps_ref_location_queue;
|
||||
concurrent_queue<Gps_Ref_Time> global_gps_ref_time_queue;
|
||||
|
||||
concurrent_map<Gps_Ephemeris> global_gps_ephemeris_map;
|
||||
concurrent_map<Gps_Iono> global_gps_iono_map;
|
||||
concurrent_map<Gps_Utc_Model> global_gps_utc_model_map;
|
||||
concurrent_map<Gps_Almanac> global_gps_almanac_map;
|
||||
concurrent_map<Gps_Acq_Assist> global_gps_acq_assist_map;
|
||||
concurrent_map<Gps_Ref_Location> global_gps_ref_location_map;
|
||||
concurrent_map<Gps_Ref_Time> global_gps_ref_time_map;
|
||||
|
||||
// For GALILEO NAVIGATION
|
||||
concurrent_queue<Galileo_Ephemeris> global_galileo_ephemeris_queue;
|
||||
|
Loading…
x
Reference in New Issue
Block a user