1
0
mirror of https://github.com/gnss-sdr/gnss-sdr synced 2024-11-15 06:14:58 +00:00
gnss-sdr/src/tests/single_test_main.cc

84 lines
2.4 KiB
C++
Raw Normal View History

/*!
* \file single_test_main.cc
* \brief This file contains the main function for tests (used with CTest).
* \author Carles Fernandez-Prades, 2012. cfernandez(at)cttc.es
*
*
* -------------------------------------------------------------------------
*
* Copyright (C) 2010-2018 (see AUTHORS file for a list of contributors)
*
* 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
2015-01-08 18:49:59 +00:00
* (at your option) any later version.
*
* 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 <https://www.gnu.org/licenses/>.
*
* -------------------------------------------------------------------------
*/
#include "concurrent_queue.h"
#include "concurrent_map.h"
#include "gps_navigation_message.h"
2014-12-19 22:19:50 +00:00
#include "gps_ephemeris.h"
2015-07-16 13:46:01 +00:00
#include "gps_cnav_ephemeris.h"
#include "gps_cnav_iono.h"
2014-12-19 22:19:50 +00:00
#include "gps_acq_assist.h"
#include "gps_ref_location.h"
#include "gps_ref_time.h"
#include "galileo_navigation_message.h"
#include <boost/thread.hpp>
#include <boost/filesystem.hpp>
#include <gflags/gflags.h>
#include <glog/logging.h>
#include <gnuradio/msg_queue.h>
#include <gtest/gtest.h>
#include <cmath>
#include <iostream>
#include <queue>
2014-12-19 22:19:50 +00:00
concurrent_queue<Gps_Acq_Assist> global_gps_acq_assist_queue;
2014-12-19 22:19:50 +00:00
concurrent_map<Gps_Acq_Assist> global_gps_acq_assist_map;
using google::LogMessage;
DECLARE_string(log_dir);
int main(int argc, char **argv)
{
google::ParseCommandLineFlags(&argc, &argv, true);
2017-06-07 15:32:37 +00:00
try
{
2017-06-07 15:32:37 +00:00
testing::InitGoogleTest(&argc, argv);
}
catch (...)
{
} // catch the "testing::internal::<unnamed>::ClassUniqueToAlwaysTrue" from gtest
google::InitGoogleLogging(argv[0]);
int res = 0;
try
{
res = RUN_ALL_TESTS();
}
catch (...)
{
LOG(WARNING) << "Unexpected catch";
}
google::ShutDownCommandLineFlags();
return res;
}