1
0
mirror of https://github.com/gnss-sdr/gnss-sdr synced 2025-02-20 13:00:10 +00:00

Fix tests

This commit is contained in:
Carles Fernandez 2018-01-24 18:06:03 +01:00
parent c9790a6549
commit 9ff66b3377
2 changed files with 15 additions and 15 deletions

View File

@ -420,14 +420,14 @@ TEST_F(GlonassL1CaPcpsAcquisitionGSoC2017Test, ConnectAndRun)
top_block->connect(source, 0, valve, 0);
top_block->connect(valve, 0, acquisition->get_left_block(), 0);
top_block->msg_connect(acquisition->get_right_block(), pmt::mp("events"), msg_rx, pmt::mp("events"));
}) << "Failure connecting the blocks of acquisition test."<< std::endl;
}) << "Failure connecting the blocks of acquisition test.";
EXPECT_NO_THROW( {
begin = std::chrono::system_clock::now();
top_block->run(); // Start threads and wait
end = std::chrono::system_clock::now();
elapsed_seconds = end - begin;
}) << "Failure running the top_block."<< std::endl;
}) << "Failure running the top_block.";
std::cout << "Processed " << nsamples << " samples in " << elapsed_seconds.count() * 1e6 << " microseconds" << std::endl;
@ -446,28 +446,28 @@ TEST_F(GlonassL1CaPcpsAcquisitionGSoC2017Test, ValidationOfResults)
ASSERT_NO_THROW( {
acquisition->set_channel(1);
}) << "Failure setting channel."<< std::endl;
}) << "Failure setting channel.";
ASSERT_NO_THROW( {
acquisition->set_gnss_synchro(&gnss_synchro);
}) << "Failure setting gnss_synchro."<< std::endl;
}) << "Failure setting gnss_synchro.";
ASSERT_NO_THROW( {
acquisition->set_doppler_max(10000);
}) << "Failure setting doppler_max."<< std::endl;
}) << "Failure setting doppler_max.";
ASSERT_NO_THROW( {
acquisition->set_doppler_step(500);
}) << "Failure setting doppler_step."<< std::endl;
}) << "Failure setting doppler_step.";
ASSERT_NO_THROW( {
acquisition->set_threshold(0.5);
}) << "Failure setting threshold."<< std::endl;
}) << "Failure setting threshold.";
ASSERT_NO_THROW( {
acquisition->connect(top_block);
top_block->msg_connect(acquisition->get_right_block(), pmt::mp("events"), msg_rx, pmt::mp("events"));
}) << "Failure connecting acquisition to the top_block."<< std::endl;
}) << "Failure connecting acquisition to the top_block.";
acquisition->init();
@ -478,7 +478,7 @@ TEST_F(GlonassL1CaPcpsAcquisitionGSoC2017Test, ValidationOfResults)
signal_source.reset(new GenSignalSource(signal_generator, filter, "SignalSource", queue));
signal_source->connect(top_block);
top_block->connect(signal_source->get_right_block(), 0, acquisition->get_left_block(), 0);
}) << "Failure connecting the blocks of acquisition test." << std::endl;
}) << "Failure connecting the blocks of acquisition test.";
// i = 0 --> satellite in acquisition is visible
// i = 1 --> satellite in acquisition is not visible
@ -501,7 +501,7 @@ TEST_F(GlonassL1CaPcpsAcquisitionGSoC2017Test, ValidationOfResults)
EXPECT_NO_THROW( {
top_block->run(); // Start threads and wait
}) << "Failure running the top_block."<< std::endl;
}) << "Failure running the top_block.";
if (i == 0)
{
@ -519,12 +519,12 @@ TEST_F(GlonassL1CaPcpsAcquisitionGSoC2017Test, ValidationOfResults)
#ifdef OLD_BOOST
ASSERT_NO_THROW( {
ch_thread.timed_join(boost::posix_time::seconds(1));
}) << "Failure while waiting the queue to stop" << std::endl;
}) << "Failure while waiting the queue to stop.";
#endif
#ifndef OLD_BOOST
ASSERT_NO_THROW( {
ch_thread.try_join_until(boost::chrono::steady_clock::now() + boost::chrono::milliseconds(50));
}) << "Failure while waiting the queue to stop" << std::endl;
}) << "Failure while waiting the queue to stop";
#endif
}

View File

@ -166,7 +166,7 @@ TEST_F(GlonassL1CaPcpsAcquisitionTest, ValidationOfResults)
top_block = gr::make_top_block("Acquisition test");
double expected_delay_samples = 31874;
double expected_doppler_hz = -9500;
double expected_doppler_hz = -8000;
init();
std::shared_ptr<GlonassL1CaPcpsAcquisition> acquisition = std::make_shared<GlonassL1CaPcpsAcquisition>(config.get(), "Acquisition_1G", 1, 1);
@ -181,7 +181,7 @@ TEST_F(GlonassL1CaPcpsAcquisitionTest, ValidationOfResults)
}) << "Failure setting gnss_synchro.";
ASSERT_NO_THROW( {
acquisition->set_threshold(0.0001);
acquisition->set_threshold(0.0005);
}) << "Failure setting threshold.";
ASSERT_NO_THROW( {
@ -189,7 +189,7 @@ TEST_F(GlonassL1CaPcpsAcquisitionTest, ValidationOfResults)
}) << "Failure setting doppler_max.";
ASSERT_NO_THROW( {
acquisition->set_doppler_step(250);
acquisition->set_doppler_step(500);
}) << "Failure setting doppler_step.";
ASSERT_NO_THROW( {