2012-01-23 00:52:05 +00:00
|
|
|
/*!
|
2014-06-17 17:13:24 +00:00
|
|
|
* \file test_main.cc
|
|
|
|
* \brief This file implements all system tests.
|
|
|
|
* \author Carles Fernandez-Prades, 2012. cfernandez(at)cttc.es
|
|
|
|
*
|
|
|
|
*
|
|
|
|
* -------------------------------------------------------------------------
|
|
|
|
*
|
2015-01-08 18:49:59 +00:00
|
|
|
* Copyright (C) 2010-2015 (see AUTHORS file for a list of contributors)
|
2014-06-17 17:13:24 +00:00
|
|
|
*
|
|
|
|
* GNSS-SDR is a software defined Global Navigation
|
|
|
|
* Satellite Systems receiver
|
|
|
|
*
|
|
|
|
* This file is part of GNSS-SDR.
|
|
|
|
*
|
|
|
|
* GNSS-SDR is free software: you can redistribute it and/or modify
|
|
|
|
* it under the terms of the GNU General Public License as published by
|
|
|
|
* the Free Software Foundation, either version 3 of the License, or
|
2017-06-07 15:33:59 +00:00
|
|
|
* (at your option) any later version.
|
2014-06-17 17:13:24 +00:00
|
|
|
*
|
|
|
|
* GNSS-SDR is distributed in the hope that it will be useful,
|
|
|
|
* but WITHOUT ANY WARRANTY; without even the implied warranty of
|
|
|
|
* MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
|
|
|
|
* GNU General Public License for more details.
|
|
|
|
*
|
|
|
|
* You should have received a copy of the GNU General Public License
|
|
|
|
* along with GNSS-SDR. If not, see <http://www.gnu.org/licenses/>.
|
|
|
|
*
|
|
|
|
* -------------------------------------------------------------------------
|
|
|
|
*/
|
2012-01-23 00:52:05 +00:00
|
|
|
|
2015-05-01 07:28:45 +00:00
|
|
|
#include <cmath>
|
2011-10-01 18:45:20 +00:00
|
|
|
#include <iostream>
|
2012-01-23 00:52:05 +00:00
|
|
|
#include <queue>
|
2014-04-03 21:59:14 +00:00
|
|
|
#include <memory>
|
2015-01-09 12:47:52 +00:00
|
|
|
#include <boost/thread.hpp>
|
2016-04-25 13:38:31 +00:00
|
|
|
#include <boost/make_shared.hpp>
|
2015-01-09 12:47:52 +00:00
|
|
|
#include <boost/filesystem.hpp>
|
2014-03-23 10:47:19 +00:00
|
|
|
#include <gflags/gflags.h>
|
2015-01-09 12:47:52 +00:00
|
|
|
#include <glog/logging.h>
|
2013-07-04 13:47:40 +00:00
|
|
|
#include <gnuradio/msg_queue.h>
|
2015-01-09 12:47:52 +00:00
|
|
|
#include <gtest/gtest.h>
|
2012-01-23 00:52:05 +00:00
|
|
|
#include "concurrent_queue.h"
|
2013-03-15 18:05:37 +00:00
|
|
|
#include "concurrent_map.h"
|
2014-03-23 09:45:03 +00:00
|
|
|
#include "control_thread.h"
|
2012-01-23 00:52:05 +00:00
|
|
|
#include "gps_navigation_message.h"
|
|
|
|
|
2013-07-15 17:07:10 +00:00
|
|
|
#include "gps_ephemeris.h"
|
2015-06-05 16:46:00 +00:00
|
|
|
#include "gps_cnav_ephemeris.h"
|
2013-07-15 17:07:10 +00:00
|
|
|
#include "gps_almanac.h"
|
|
|
|
#include "gps_iono.h"
|
2015-06-05 16:46:00 +00:00
|
|
|
#include "gps_cnav_iono.h"
|
2013-07-15 17:07:10 +00:00
|
|
|
#include "gps_utc_model.h"
|
|
|
|
|
|
|
|
#include "galileo_ephemeris.h"
|
|
|
|
#include "galileo_almanac.h"
|
|
|
|
#include "galileo_iono.h"
|
|
|
|
#include "galileo_utc_model.h"
|
|
|
|
|
2013-11-09 23:11:46 +00:00
|
|
|
#include "sbas_ephemeris.h"
|
2014-03-23 09:45:03 +00:00
|
|
|
|
2017-06-21 04:44:44 +00:00
|
|
|
#include "glonass_gnav_ephemeris.h"
|
|
|
|
#include "glonass_gnav_almanac.h"
|
|
|
|
#include "glonass_gnav_utc_model.h"
|
|
|
|
|
2014-03-23 09:45:03 +00:00
|
|
|
using google::LogMessage;
|
|
|
|
|
|
|
|
DECLARE_string(log_dir);
|
|
|
|
|
2016-09-29 10:26:48 +00:00
|
|
|
#include "unit-tests/arithmetic/complex_carrier_test.cc"
|
|
|
|
#include "unit-tests/arithmetic/conjugate_test.cc"
|
|
|
|
#include "unit-tests/arithmetic/magnitude_squared_test.cc"
|
|
|
|
#include "unit-tests/arithmetic/multiply_test.cc"
|
|
|
|
#include "unit-tests/arithmetic/code_generation_test.cc"
|
|
|
|
#include "unit-tests/arithmetic/fft_length_test.cc"
|
2017-10-17 12:17:11 +00:00
|
|
|
#include "unit-tests/arithmetic/fft_speed_test.cc"
|
2017-11-17 13:47:50 +00:00
|
|
|
#include "unit-tests/arithmetic/matio_test.cc"
|
2016-09-29 10:26:48 +00:00
|
|
|
|
|
|
|
#include "unit-tests/control-plane/file_configuration_test.cc"
|
|
|
|
#include "unit-tests/control-plane/in_memory_configuration_test.cc"
|
|
|
|
#include "unit-tests/control-plane/control_message_factory_test.cc"
|
|
|
|
#include "unit-tests/control-plane/control_thread_test.cc"
|
|
|
|
#include "unit-tests/control-plane/gnss_flowgraph_test.cc"
|
|
|
|
#include "unit-tests/control-plane/string_converter_test.cc"
|
|
|
|
#include "unit-tests/control-plane/gnss_block_factory_test.cc"
|
|
|
|
|
2016-10-10 17:36:41 +00:00
|
|
|
#include "unit-tests/signal-processing-blocks/sources/file_signal_source_test.cc"
|
|
|
|
#include "unit-tests/signal-processing-blocks/sources/gnss_sdr_valve_test.cc"
|
2017-07-11 10:51:19 +00:00
|
|
|
#include "unit-tests/signal-processing-blocks/sources/unpack_2bit_samples_test.cc"
|
2016-10-10 17:36:41 +00:00
|
|
|
|
|
|
|
#include "unit-tests/signal-processing-blocks/adapter/pass_through_test.cc"
|
2017-07-10 21:59:18 +00:00
|
|
|
#include "unit-tests/signal-processing-blocks/adapter/adapter_test.cc"
|
2016-10-10 17:36:41 +00:00
|
|
|
|
|
|
|
#include "unit-tests/signal-processing-blocks/filter/fir_filter_test.cc"
|
2017-10-16 14:36:51 +00:00
|
|
|
#include "unit-tests/signal-processing-blocks/filter/pulse_blanking_filter_test.cc"
|
2017-10-17 07:38:16 +00:00
|
|
|
#include "unit-tests/signal-processing-blocks/filter/notch_filter_test.cc"
|
2017-10-17 09:44:23 +00:00
|
|
|
#include "unit-tests/signal-processing-blocks/filter/notch_filter_lite_test.cc"
|
2016-10-10 17:36:41 +00:00
|
|
|
|
|
|
|
#include "unit-tests/signal-processing-blocks/resampler/direct_resampler_conditioner_cc_test.cc"
|
2018-02-03 09:49:03 +00:00
|
|
|
#include "unit-tests/signal-processing-blocks/resampler/mmse_resampler_test.cc"
|
2016-10-10 17:36:41 +00:00
|
|
|
|
|
|
|
#include "unit-tests/signal-processing-blocks/acquisition/gps_l1_ca_pcps_acquisition_test.cc"
|
|
|
|
#include "unit-tests/signal-processing-blocks/acquisition/gps_l1_ca_pcps_acquisition_gsoc2013_test.cc"
|
|
|
|
#include "unit-tests/signal-processing-blocks/acquisition/gps_l1_ca_pcps_quicksync_acquisition_gsoc2014_test.cc"
|
|
|
|
#include "unit-tests/signal-processing-blocks/acquisition/gps_l1_ca_pcps_tong_acquisition_gsoc2013_test.cc"
|
|
|
|
#include "unit-tests/signal-processing-blocks/acquisition/galileo_e1_pcps_ambiguous_acquisition_test.cc"
|
|
|
|
#include "unit-tests/signal-processing-blocks/acquisition/galileo_e1_pcps_ambiguous_acquisition_gsoc_test.cc"
|
|
|
|
#include "unit-tests/signal-processing-blocks/acquisition/galileo_e1_pcps_ambiguous_acquisition_gsoc2013_test.cc"
|
|
|
|
#include "unit-tests/signal-processing-blocks/acquisition/galileo_e1_pcps_8ms_ambiguous_acquisition_gsoc2013_test.cc"
|
|
|
|
#include "unit-tests/signal-processing-blocks/acquisition/galileo_e1_pcps_tong_ambiguous_acquisition_gsoc2013_test.cc"
|
|
|
|
#include "unit-tests/signal-processing-blocks/acquisition/galileo_e1_pcps_cccwsr_ambiguous_acquisition_gsoc2013_test.cc"
|
|
|
|
#include "unit-tests/signal-processing-blocks/acquisition/galileo_e1_pcps_quicksync_ambiguous_acquisition_gsoc2014_test.cc"
|
|
|
|
#include "unit-tests/signal-processing-blocks/acquisition/galileo_e5a_pcps_acquisition_gsoc2014_gensource_test.cc"
|
2017-07-10 23:41:38 +00:00
|
|
|
#include "unit-tests/signal-processing-blocks/acquisition/glonass_l1_ca_pcps_acquisition_gsoc2017_test.cc"
|
2017-10-03 11:47:55 +00:00
|
|
|
|
2016-04-30 09:33:52 +00:00
|
|
|
#if OPENCL_BLOCKS_TEST
|
2016-10-10 17:36:41 +00:00
|
|
|
#include "unit-tests/signal-processing-blocks/acquisition/gps_l1_ca_pcps_opencl_acquisition_gsoc2013_test.cc"
|
2016-04-30 09:33:52 +00:00
|
|
|
#endif
|
2016-06-17 10:48:31 +00:00
|
|
|
|
2016-10-10 17:36:41 +00:00
|
|
|
#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"
|
2018-01-26 14:07:53 +00:00
|
|
|
#include "unit-tests/signal-processing-blocks/tracking/glonass_l1_ca_dll_pll_tracking_test.cc"
|
|
|
|
#include "unit-tests/signal-processing-blocks/tracking/glonass_l1_ca_dll_pll_c_aid_tracking_test.cc"
|
2016-10-10 17:36:41 +00:00
|
|
|
#include "unit-tests/signal-processing-blocks/tracking/tracking_loop_filter_test.cc"
|
|
|
|
#include "unit-tests/signal-processing-blocks/tracking/cpu_multicorrelator_test.cc"
|
2017-09-15 23:14:15 +00:00
|
|
|
#include "unit-tests/signal-processing-blocks/tracking/cpu_multicorrelator_real_codes_test.cc"
|
2017-01-28 15:49:46 +00:00
|
|
|
|
2016-06-17 10:48:31 +00:00
|
|
|
#if CUDA_BLOCKS_TEST
|
2017-01-28 15:49:46 +00:00
|
|
|
#include "unit-tests/signal-processing-blocks/tracking/gpu_multicorrelator_test.cc"
|
2016-06-17 10:48:31 +00:00
|
|
|
#endif
|
|
|
|
|
2017-03-13 19:54:25 +00:00
|
|
|
#if FPGA_BLOCKS_TEST
|
|
|
|
#include "unit-tests/signal-processing-blocks/tracking/gps_l1_ca_dll_pll_tracking_test_fpga.cc"
|
2017-05-05 14:15:27 +00:00
|
|
|
#include "unit-tests/signal-processing-blocks/acquisition/gps_l1_ca_pcps_acquisition_test_fpga.cc"
|
2017-03-13 19:54:25 +00:00
|
|
|
#endif
|
|
|
|
|
2016-10-10 17:36:41 +00:00
|
|
|
#include "unit-tests/signal-processing-blocks/pvt/rtcm_test.cc"
|
|
|
|
#include "unit-tests/signal-processing-blocks/pvt/rtcm_printer_test.cc"
|
2016-10-31 21:32:58 +00:00
|
|
|
#include "unit-tests/signal-processing-blocks/pvt/rinex_printer_test.cc"
|
2017-08-25 09:42:02 +00:00
|
|
|
#include "unit-tests/signal-processing-blocks/pvt/nmea_printer_test.cc"
|
2014-06-17 17:13:24 +00:00
|
|
|
|
2017-01-28 15:49:46 +00:00
|
|
|
#if EXTRA_TESTS
|
2017-02-03 08:17:53 +00:00
|
|
|
#include "unit-tests/signal-processing-blocks/acquisition/gps_l2_m_pcps_acquisition_test.cc"
|
2018-01-26 12:40:52 +00:00
|
|
|
#include "unit-tests/signal-processing-blocks/acquisition/glonass_l1_ca_pcps_acquisition_test.cc"
|
2017-02-03 11:04:15 +00:00
|
|
|
#include "unit-tests/signal-processing-blocks/tracking/gps_l2_m_dll_pll_tracking_test.cc"
|
|
|
|
#if MODERN_ARMADILLO
|
2017-01-28 15:49:46 +00:00
|
|
|
#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"
|
2017-04-12 15:04:51 +00:00
|
|
|
#include "unit-tests/signal-processing-blocks/observables/hybrid_observables_test.cc"
|
2017-02-03 11:04:15 +00:00
|
|
|
#endif
|
2017-01-28 15:49:46 +00:00
|
|
|
#endif
|
|
|
|
|
2017-06-21 04:44:44 +00:00
|
|
|
#include "unit-tests/system-parameters/glonass_gnav_ephemeris_test.cc"
|
2017-08-19 21:04:14 +00:00
|
|
|
#include "unit-tests/system-parameters/glonass_gnav_nav_message_test.cc"
|
2017-02-13 16:20:49 +00:00
|
|
|
|
2015-06-05 16:46:00 +00:00
|
|
|
// For GPS NAVIGATION (L1)
|
2013-04-02 14:02:55 +00:00
|
|
|
concurrent_queue<Gps_Acq_Assist> global_gps_acq_assist_queue;
|
|
|
|
concurrent_map<Gps_Acq_Assist> global_gps_acq_assist_map;
|
2012-01-23 00:52:05 +00:00
|
|
|
|
|
|
|
int main(int argc, char **argv)
|
|
|
|
{
|
2014-03-23 09:45:03 +00:00
|
|
|
std::cout << "Running GNSS-SDR Tests..." << std::endl;
|
2015-06-12 15:58:50 +00:00
|
|
|
int res = 0;
|
2016-10-13 22:26:05 +00:00
|
|
|
try
|
|
|
|
{
|
|
|
|
testing::InitGoogleTest(&argc, argv);
|
|
|
|
}
|
|
|
|
catch(...) {} // catch the "testing::internal::<unnamed>::ClassUniqueToAlwaysTrue" from gtest
|
2015-06-12 15:58:50 +00:00
|
|
|
google::ParseCommandLineFlags(&argc, &argv, true);
|
|
|
|
google::InitGoogleLogging(argv[0]);
|
2015-05-15 01:02:45 +00:00
|
|
|
try
|
|
|
|
{
|
2015-06-12 15:58:50 +00:00
|
|
|
res = RUN_ALL_TESTS();
|
2015-05-15 01:02:45 +00:00
|
|
|
}
|
2015-05-22 16:36:12 +00:00
|
|
|
catch(...)
|
2015-05-15 01:02:45 +00:00
|
|
|
{
|
2015-05-22 16:37:24 +00:00
|
|
|
LOG(WARNING) << "Unexpected catch";
|
2015-05-15 01:02:45 +00:00
|
|
|
}
|
2015-05-22 16:36:12 +00:00
|
|
|
google::ShutDownCommandLineFlags();
|
2015-06-12 15:58:50 +00:00
|
|
|
return res;
|
2012-01-23 00:52:05 +00:00
|
|
|
}
|