2012-12-28 15:40:03 +00:00
|
|
|
/*!
|
|
|
|
* \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
|
|
|
|
*
|
|
|
|
*
|
|
|
|
* -------------------------------------------------------------------------
|
|
|
|
*
|
2019-07-26 10:38:20 +00:00
|
|
|
* Copyright (C) 2010-2019 (see AUTHORS file for a list of contributors)
|
2012-12-28 15:40:03 +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
|
2015-01-08 18:49:59 +00:00
|
|
|
* (at your option) any later version.
|
2012-12-28 15:40:03 +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
|
2018-05-13 20:49:11 +00:00
|
|
|
* along with GNSS-SDR. If not, see <https://www.gnu.org/licenses/>.
|
2012-12-28 15:40:03 +00:00
|
|
|
*
|
|
|
|
* -------------------------------------------------------------------------
|
|
|
|
*/
|
|
|
|
|
2019-03-05 18:31:41 +00:00
|
|
|
|
2014-03-16 19:58:29 +00:00
|
|
|
#include "concurrent_map.h"
|
2018-12-09 21:00:09 +00:00
|
|
|
#include "concurrent_queue.h"
|
|
|
|
#include "gps_acq_assist.h"
|
2018-02-26 02:15:53 +00:00
|
|
|
#include <gflags/gflags.h>
|
|
|
|
#include <glog/logging.h>
|
|
|
|
#include <gtest/gtest.h>
|
|
|
|
#include <iostream>
|
|
|
|
|
|
|
|
|
2019-02-22 09:47:24 +00:00
|
|
|
Concurrent_Queue<Gps_Acq_Assist> global_gps_acq_assist_queue;
|
2012-12-28 15:40:03 +00:00
|
|
|
|
2019-02-22 09:47:24 +00:00
|
|
|
Concurrent_Map<Gps_Acq_Assist> global_gps_acq_assist_map;
|
2013-11-15 17:45:24 +00:00
|
|
|
|
2017-02-15 21:10:06 +00:00
|
|
|
DECLARE_string(log_dir);
|
2013-11-15 17:45:24 +00:00
|
|
|
|
2012-12-28 15:40:03 +00:00
|
|
|
int main(int argc, char **argv)
|
|
|
|
{
|
2013-07-04 13:47:40 +00:00
|
|
|
google::ParseCommandLineFlags(&argc, &argv, true);
|
2017-06-07 15:32:37 +00:00
|
|
|
try
|
2018-03-03 01:03:39 +00:00
|
|
|
{
|
2017-06-07 15:32:37 +00:00
|
|
|
testing::InitGoogleTest(&argc, argv);
|
2018-03-03 01:03:39 +00:00
|
|
|
}
|
|
|
|
catch (...)
|
|
|
|
{
|
|
|
|
} // catch the "testing::internal::<unnamed>::ClassUniqueToAlwaysTrue" from gtest
|
2012-12-28 15:40:03 +00:00
|
|
|
google::InitGoogleLogging(argv[0]);
|
2017-02-15 21:10:06 +00:00
|
|
|
int res = 0;
|
|
|
|
try
|
2018-03-03 01:03:39 +00:00
|
|
|
{
|
2017-02-15 21:10:06 +00:00
|
|
|
res = RUN_ALL_TESTS();
|
2018-03-03 01:03:39 +00:00
|
|
|
}
|
|
|
|
catch (...)
|
|
|
|
{
|
2017-02-15 21:10:06 +00:00
|
|
|
LOG(WARNING) << "Unexpected catch";
|
2018-03-03 01:03:39 +00:00
|
|
|
}
|
2017-02-15 21:10:06 +00:00
|
|
|
google::ShutDownCommandLineFlags();
|
|
|
|
return res;
|
2012-12-28 15:40:03 +00:00
|
|
|
}
|