[hamradio-commits] [gnss-sdr] 17/27: fixing includes

Carles Fernandez carles_fernandez-guest at moszumanska.debian.org
Wed Jan 14 09:07:42 UTC 2015


This is an automated email from the git hooks/post-receive script.

carles_fernandez-guest pushed a commit to branch master
in repository gnss-sdr.

commit f978f8e3e79f6a15307008e5e0fd93155edbc5fa
Author: Carles Fernandez <carles.fernandez at gmail.com>
Date:   Fri Jan 9 13:47:52 2015 +0100

    fixing includes
---
 src/core/receiver/concurrent_queue.h               |  3 +-
 src/core/receiver/control_thread.cc                |  2 -
 src/core/receiver/control_thread.h                 |  2 +-
 src/main/main.cc                                   |  5 +-
 src/tests/control_thread/control_thread_test.cc    |  2 +-
 ..._e1_pcps_ambiguous_acquisition_gsoc2013_test.cc | 22 +++++-
 ...ileo_e1_pcps_ambiguous_acquisition_gsoc_test.cc | 14 ++--
 .../galileo_e1_pcps_ambiguous_acquisition_test.cc  | 13 +++-
 ...s_cccwsr_ambiguous_acquisition_gsoc2013_test.cc | 20 ++++++
 ...uicksync_ambiguous_acquisition_gsoc2014_test.cc | 30 ++++++++
 ...cps_tong_ambiguous_acquisition_gsoc2013_test.cc | 12 ++++
 ...e5a_pcps_acquisition_gsoc2014_gensource_test.cc | 13 +++-
 .../gps_l1_ca_pcps_acquisition_gsoc2013_test.cc    | 20 ++++++
 ..._ca_pcps_quicksync_acquisition_gsoc2014_test.cc | 80 +++++++++++++++-------
 ...ps_l1_ca_pcps_tong_acquisition_gsoc2013_test.cc | 20 ++++++
 src/tests/single_test_main.cc                      |  3 +-
 src/tests/test_main.cc                             |  9 ++-
 src/utils/front-end-cal/main.cc                    |  3 +-
 18 files changed, 218 insertions(+), 55 deletions(-)

diff --git a/src/core/receiver/concurrent_queue.h b/src/core/receiver/concurrent_queue.h
index 89f3e7c..7fdadcb 100644
--- a/src/core/receiver/concurrent_queue.h
+++ b/src/core/receiver/concurrent_queue.h
@@ -32,8 +32,7 @@
 #define GNSS_SDR_CONCURRENT_QUEUE_H
 
 #include <queue>
-#include <boost/thread/mutex.hpp>
-#include <boost/thread/thread.hpp>
+#include <boost/thread.hpp>
 
 template<typename Data>
 
diff --git a/src/core/receiver/control_thread.cc b/src/core/receiver/control_thread.cc
index 93c2972..abd3b7f 100644
--- a/src/core/receiver/control_thread.cc
+++ b/src/core/receiver/control_thread.cc
@@ -36,11 +36,9 @@
 #include <unistd.h>
 #include <iostream>
 #include <map>
-#include <memory>
 #include <string>
 #include <boost/lexical_cast.hpp>
 #include <boost/chrono.hpp>
-#include <boost/thread.hpp>
 #include <gnuradio/message.h>
 #include <gflags/gflags.h>
 #include <glog/logging.h>
diff --git a/src/core/receiver/control_thread.h b/src/core/receiver/control_thread.h
index 67f6d2c..c540329 100644
--- a/src/core/receiver/control_thread.h
+++ b/src/core/receiver/control_thread.h
@@ -37,7 +37,7 @@
 
 #include <memory>
 #include <vector>
-#include <boost/thread/thread.hpp>
+#include <boost/thread.hpp>
 #include <gnuradio/msg_queue.h>
 #include "control_message_factory.h"
 #include "gnss_sdr_supl_client.h"
diff --git a/src/main/main.cc b/src/main/main.cc
index 0befe50..da71cb9 100644
--- a/src/main/main.cc
+++ b/src/main/main.cc
@@ -31,7 +31,7 @@
 * -------------------------------------------------------------------------
 */
 #ifndef GNSS_SDR_VERSION
-#define GNSS_SDR_VERSION "0.0.2"
+#define GNSS_SDR_VERSION "0.0.4"
 #endif
 
 #include <ctime>
@@ -40,8 +40,7 @@
 #include <boost/exception/diagnostic_information.hpp>
 #include <boost/exception_ptr.hpp>
 #include <boost/filesystem.hpp>
-#include <boost/thread/mutex.hpp>
-#include <boost/thread/thread.hpp>
+#include <boost/thread.hpp>
 #include <gflags/gflags.h>
 #include <glog/logging.h>
 #include <gnuradio/msg_queue.h>
diff --git a/src/tests/control_thread/control_thread_test.cc b/src/tests/control_thread/control_thread_test.cc
index 50a8f2e..5b80eca 100644
--- a/src/tests/control_thread/control_thread_test.cc
+++ b/src/tests/control_thread/control_thread_test.cc
@@ -35,7 +35,7 @@
 #include <exception>
 #include <memory>
 #include <boost/lexical_cast.hpp>
-#include <boost/thread/thread.hpp>
+#include <boost/thread.hpp>
 #include <boost/exception/diagnostic_information.hpp>
 #include <boost/exception_ptr.hpp>
 #include <gtest/gtest.h>
diff --git a/src/tests/gnss_block/galileo_e1_pcps_ambiguous_acquisition_gsoc2013_test.cc b/src/tests/gnss_block/galileo_e1_pcps_ambiguous_acquisition_gsoc2013_test.cc
index 2b9853d..d84b7f4 100644
--- a/src/tests/gnss_block/galileo_e1_pcps_ambiguous_acquisition_gsoc2013_test.cc
+++ b/src/tests/gnss_block/galileo_e1_pcps_ambiguous_acquisition_gsoc2013_test.cc
@@ -33,6 +33,7 @@
 
 #include <ctime>
 #include <iostream>
+#include <boost/chrono.hpp>
 #include <gnuradio/top_block.h>
 #include <gnuradio/blocks/file_source.h>
 #include <gnuradio/analog/sig_source_waveform.h>
@@ -47,7 +48,6 @@
 #include "signal_generator_c.h"
 #include "fir_filter.h"
 #include "gen_signal_source.h"
-#include "boost/shared_ptr.hpp"
 #include "gnss_sdr_valve.h"
 
 
@@ -483,6 +483,16 @@ TEST_F(GalileoE1PcpsAmbiguousAcquisitionGSoC2013Test, ValidationOfResults)
             {
                 EXPECT_EQ(2, message) << "Acquisition failure. Expected message: 2=ACQ FAIL.";
             }
+#ifdef OLD_BOOST
+            ASSERT_NO_THROW( {
+                ch_thread.timed_join(boost::posix_time::seconds(1));
+            }) << "Failure while waiting the queue to stop" << std::endl;
+#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;
+#endif
         }
 }
 
@@ -570,5 +580,15 @@ TEST_F(GalileoE1PcpsAmbiguousAcquisitionGSoC2013Test, ValidationOfResultsProbabi
                 std::cout << "Estimated probability of false alarm (satellite absent) = " << Pfa_a << std::endl;
                 std::cout << "Mean acq time = " << mean_acq_time_us << " microseconds." << std::endl;
             }
+#ifdef OLD_BOOST
+            ASSERT_NO_THROW( {
+                ch_thread.timed_join(boost::posix_time::seconds(1));
+            }) << "Failure while waiting the queue to stop" << std::endl;
+#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;
+#endif
         }
 }
diff --git a/src/tests/gnss_block/galileo_e1_pcps_ambiguous_acquisition_gsoc_test.cc b/src/tests/gnss_block/galileo_e1_pcps_ambiguous_acquisition_gsoc_test.cc
index 4ace398..bdf71ae 100644
--- a/src/tests/gnss_block/galileo_e1_pcps_ambiguous_acquisition_gsoc_test.cc
+++ b/src/tests/gnss_block/galileo_e1_pcps_ambiguous_acquisition_gsoc_test.cc
@@ -246,18 +246,20 @@ TEST_F(GalileoE1PcpsAmbiguousAcquisitionGSoCTest, ValidationOfResults)
     }) << "Failure running the top_block." << std::endl;
 
 #ifdef OLD_BOOST
-            ASSERT_NO_THROW( {
-                ch_thread.timed_join(boost::posix_time::seconds(1));
-            }) << "Failure while waiting the queue to stop" << std::endl;
+    ASSERT_NO_THROW( {
+        ch_thread.timed_join(boost::posix_time::seconds(1));
+    }) << "Failure while waiting the queue to stop" << std::endl;
 #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;
+    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;
 #endif
 
     unsigned long int nsamples = gnss_synchro.Acq_samplestamp_samples;
     std::cout <<  "Acquired " << nsamples << " samples in " << (end - begin) << " microseconds" << std::endl;
 
     EXPECT_EQ(0, message) << "Acquisition failure. Expected message: 0=ACQ STOP.";
+
+
 }
diff --git a/src/tests/gnss_block/galileo_e1_pcps_ambiguous_acquisition_test.cc b/src/tests/gnss_block/galileo_e1_pcps_ambiguous_acquisition_test.cc
index 481b2a9..e2d6ad3 100644
--- a/src/tests/gnss_block/galileo_e1_pcps_ambiguous_acquisition_test.cc
+++ b/src/tests/gnss_block/galileo_e1_pcps_ambiguous_acquisition_test.cc
@@ -230,9 +230,16 @@ TEST_F(GalileoE1PcpsAmbiguousAcquisitionTest, ValidationOfResults)
         end = tv.tv_sec *1000000 + tv.tv_usec;
     }) << "Failure running the top_block." << std::endl;
 
-    //ASSERT_NO_THROW( {
-    //    ch_thread.timed_join(boost::posix_time::seconds(1));
-    //}) << "Failure while waiting the queue to stop" << std::endl;
+#ifdef OLD_BOOST
+            ASSERT_NO_THROW( {
+                ch_thread.timed_join(boost::posix_time::seconds(1));
+            }) << "Failure while waiting the queue to stop" << std::endl;
+#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;
+#endif
 
     unsigned long int nsamples = gnss_synchro.Acq_samplestamp_samples;
     std::cout <<  "Acquired " << nsamples << " samples in " << (end - begin) << " microseconds" << std::endl;
diff --git a/src/tests/gnss_block/galileo_e1_pcps_cccwsr_ambiguous_acquisition_gsoc2013_test.cc b/src/tests/gnss_block/galileo_e1_pcps_cccwsr_ambiguous_acquisition_gsoc2013_test.cc
index e480105..ac0107f 100644
--- a/src/tests/gnss_block/galileo_e1_pcps_cccwsr_ambiguous_acquisition_gsoc2013_test.cc
+++ b/src/tests/gnss_block/galileo_e1_pcps_cccwsr_ambiguous_acquisition_gsoc2013_test.cc
@@ -481,6 +481,16 @@ TEST_F(GalileoE1PcpsCccwsrAmbiguousAcquisitionTest, ValidationOfResults)
             {
                 EXPECT_EQ(2, message) << "Acquisition failure. Expected message: 2=ACQ FAIL.";
             }
+#ifdef OLD_BOOST
+            ASSERT_NO_THROW( {
+                ch_thread.timed_join(boost::posix_time::seconds(1));
+            }) << "Failure while waiting the queue to stop" << std::endl;
+#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;
+#endif
         }
 }
 
@@ -566,5 +576,15 @@ TEST_F(GalileoE1PcpsCccwsrAmbiguousAcquisitionTest, ValidationOfResultsProbabili
                 std::cout << "Probability of false alarm (satellite absent) = " << Pfa_a << std::endl;
                 std::cout << "Mean acq time = " << mean_acq_time_us << " microseconds." << std::endl;
             }
+#ifdef OLD_BOOST
+            ASSERT_NO_THROW( {
+                ch_thread.timed_join(boost::posix_time::seconds(1));
+            }) << "Failure while waiting the queue to stop" << std::endl;
+#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;
+#endif
         }
 }
diff --git a/src/tests/gnss_block/galileo_e1_pcps_quicksync_ambiguous_acquisition_gsoc2014_test.cc b/src/tests/gnss_block/galileo_e1_pcps_quicksync_ambiguous_acquisition_gsoc2014_test.cc
index 2d92412..6b4bedf 100644
--- a/src/tests/gnss_block/galileo_e1_pcps_quicksync_ambiguous_acquisition_gsoc2014_test.cc
+++ b/src/tests/gnss_block/galileo_e1_pcps_quicksync_ambiguous_acquisition_gsoc2014_test.cc
@@ -614,6 +614,16 @@ TEST_F(GalileoE1PcpsQuickSyncAmbiguousAcquisitionGSoC2014Test, ValidationOfResul
                 {
                     EXPECT_EQ(2, message) << "Acquisition failure. Expected message: 2=ACQ FAIL.";
                 }
+#ifdef OLD_BOOST
+            ASSERT_NO_THROW( {
+                ch_thread.timed_join(boost::posix_time::seconds(1));
+            }) << "Failure while waiting the queue to stop" << std::endl;
+#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;
+#endif
         }
     LOG(INFO) << "End validation of results test";
 }
@@ -700,6 +710,16 @@ TEST_F(GalileoE1PcpsQuickSyncAmbiguousAcquisitionGSoC2014Test, ValidationOfResul
                 {
                     EXPECT_EQ(2, message) << "Acquisition failure. Expected message: 2=ACQ FAIL.";
                 }
+#ifdef OLD_BOOST
+            ASSERT_NO_THROW( {
+                ch_thread.timed_join(boost::posix_time::seconds(1));
+            }) << "Failure while waiting the queue to stop" << std::endl;
+#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;
+#endif
         }
     LOG(INFO) << "End validation of results with noise+interference test";
 }
@@ -814,5 +834,15 @@ TEST_F(GalileoE1PcpsQuickSyncAmbiguousAcquisitionGSoC2014Test, ValidationOfResul
 		                pdpfafile.close();
                     }
                 }
+#ifdef OLD_BOOST
+            ASSERT_NO_THROW( {
+                ch_thread.timed_join(boost::posix_time::seconds(1));
+            }) << "Failure while waiting the queue to stop" << std::endl;
+#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;
+#endif
         }
 }
diff --git a/src/tests/gnss_block/galileo_e1_pcps_tong_ambiguous_acquisition_gsoc2013_test.cc b/src/tests/gnss_block/galileo_e1_pcps_tong_ambiguous_acquisition_gsoc2013_test.cc
index 1a3ca9c..a9e21f7 100644
--- a/src/tests/gnss_block/galileo_e1_pcps_tong_ambiguous_acquisition_gsoc2013_test.cc
+++ b/src/tests/gnss_block/galileo_e1_pcps_tong_ambiguous_acquisition_gsoc2013_test.cc
@@ -37,6 +37,7 @@
 #include <iostream>
 #include <boost/shared_ptr.hpp>
 #include <boost/chrono.hpp>
+#include <boost/thread.hpp>
 #include <gnuradio/top_block.h>
 #include <gnuradio/blocks/file_source.h>
 #include <gnuradio/analog/sig_source_waveform.h>
@@ -486,6 +487,17 @@ TEST_F(GalileoE1PcpsTongAmbiguousAcquisitionGSoC2013Test, ValidationOfResults)
             {
                 EXPECT_EQ(2, message) << "Acquisition failure. Expected message: 2=ACQ FAIL.";
             }
+
+#ifdef OLD_BOOST
+            ASSERT_NO_THROW( {
+                ch_thread.timed_join(boost::posix_time::seconds(1));
+            }) << "Failure while waiting the queue to stop" << std::endl;
+#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;
+#endif
         }
 }
 
diff --git a/src/tests/gnss_block/galileo_e5a_pcps_acquisition_gsoc2014_gensource_test.cc b/src/tests/gnss_block/galileo_e5a_pcps_acquisition_gsoc2014_gensource_test.cc
index 9becffc..3578842 100644
--- a/src/tests/gnss_block/galileo_e5a_pcps_acquisition_gsoc2014_gensource_test.cc
+++ b/src/tests/gnss_block/galileo_e5a_pcps_acquisition_gsoc2014_gensource_test.cc
@@ -31,6 +31,7 @@
 
 #include <ctime>
 #include <iostream>
+#include <boost/chrono.hpp>
 #include <gnuradio/top_block.h>
 #include <gnuradio/blocks/file_source.h>
 #include <gnuradio/analog/sig_source_waveform.h>
@@ -48,7 +49,6 @@
 #include "fir_filter.h"
 #include "gen_signal_source.h"
 #include "gnss_sdr_valve.h"
-#include "boost/shared_ptr.hpp"
 #include "pass_through.h"
 #include "file_output_filter.h"
 
@@ -709,7 +709,16 @@ TEST_F(GalileoE5aPcpsAcquisitionGSoC2014GensourceTest, ValidationOfSIM)
             EXPECT_NO_THROW( {
                 top_block->run(); // Start threads and wait
             }) << "Failure running the top_block."<< std::endl;
-
+#ifdef OLD_BOOST
+            ASSERT_NO_THROW( {
+                ch_thread.timed_join(boost::posix_time::seconds(1));
+            }) << "Failure while waiting the queue to stop" << std::endl;
+#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;
+#endif
             //std::cout << gnss_synchro.Acq_delay_samples << "acq delay" <<std::endl;
             //std::cout << gnss_synchro.Acq_doppler_hz << "acq doppler" <<std::endl;
             //std::cout << gnss_synchro.Acq_samplestamp_samples << "acq samples" <<std::endl;
diff --git a/src/tests/gnss_block/gps_l1_ca_pcps_acquisition_gsoc2013_test.cc b/src/tests/gnss_block/gps_l1_ca_pcps_acquisition_gsoc2013_test.cc
index 4a0854d..299f280 100644
--- a/src/tests/gnss_block/gps_l1_ca_pcps_acquisition_gsoc2013_test.cc
+++ b/src/tests/gnss_block/gps_l1_ca_pcps_acquisition_gsoc2013_test.cc
@@ -476,6 +476,16 @@ TEST_F(GpsL1CaPcpsAcquisitionGSoC2013Test, ValidationOfResults)
             {
                 EXPECT_EQ(2, message) << "Acquisition failure. Expected message: 2=ACQ FAIL.";
             }
+#ifdef OLD_BOOST
+            ASSERT_NO_THROW( {
+                ch_thread.timed_join(boost::posix_time::seconds(1));
+            }) << "Failure while waiting the queue to stop" << std::endl;
+#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;
+#endif
         }
 
     delete acquisition;
@@ -561,6 +571,16 @@ TEST_F(GpsL1CaPcpsAcquisitionGSoC2013Test, ValidationOfResultsProbabilities)
                 std::cout << "Estimated probability of false alarm (satellite absent) = " << Pfa_a << std::endl;
                 std::cout << "Mean acq time = " << mean_acq_time_us << " microseconds." << std::endl;
             }
+#ifdef OLD_BOOST
+            ASSERT_NO_THROW( {
+                ch_thread.timed_join(boost::posix_time::seconds(1));
+            }) << "Failure while waiting the queue to stop" << std::endl;
+#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;
+#endif
         }
 
     delete acquisition;
diff --git a/src/tests/gnss_block/gps_l1_ca_pcps_quicksync_acquisition_gsoc2014_test.cc b/src/tests/gnss_block/gps_l1_ca_pcps_quicksync_acquisition_gsoc2014_test.cc
index de5ecfc..ce7b880 100644
--- a/src/tests/gnss_block/gps_l1_ca_pcps_quicksync_acquisition_gsoc2014_test.cc
+++ b/src/tests/gnss_block/gps_l1_ca_pcps_quicksync_acquisition_gsoc2014_test.cc
@@ -597,6 +597,16 @@ TEST_F(GpsL1CaPcpsQuickSyncAcquisitionGSoC2014Test, ValidationOfResults)
                     EXPECT_EQ(2, message)
                         << "Acquisition failure. Expected message: 2=ACQ FAIL.";
                 }
+#ifdef OLD_BOOST
+            ASSERT_NO_THROW( {
+                ch_thread.timed_join(boost::posix_time::seconds(1));
+            }) << "Failure while waiting the queue to stop" << std::endl;
+#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;
+#endif
         }
     unsigned long int nsamples = gnss_synchro.Acq_samplestamp_samples;
     std::cout <<  "----Acquired: " << nsamples << " samples"<< std::endl;
@@ -687,6 +697,16 @@ TEST_F(GpsL1CaPcpsQuickSyncAcquisitionGSoC2014Test, ValidationOfResultsWithNoise
                     EXPECT_EQ(2, message)
                         << "Acquisition failure. Expected message: 2=ACQ FAIL.";
                 }
+#ifdef OLD_BOOST
+            ASSERT_NO_THROW( {
+                ch_thread.timed_join(boost::posix_time::seconds(1));
+            }) << "Failure while waiting the queue to stop" << std::endl;
+#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;
+#endif
         }
     unsigned long int nsamples = gnss_synchro.Acq_samplestamp_samples;
     std::cout <<  "----Acquired: " << nsamples << " samples"<< std::endl;
@@ -769,19 +789,19 @@ TEST_F(GpsL1CaPcpsQuickSyncAcquisitionGSoC2014Test, ValidationOfResultsProbabili
                     std::cout << "Estimated probability of false alarm (satellite present) = " << Pfa_p << std::endl;
                     std::cout << "Estimated probability of miss detection (satellite present) = " << Pmd << std::endl;
                     std::cout << "Mean acq time = " << mean_acq_time_us << " microseconds." << std::endl;
-					
-					if(dump_test_results)
-					{
-		                std::stringstream filenamepd;
-		                filenamepd.str("");
-		                filenamepd << "../data/test_statistics_" << gnss_synchro.System
-		                           << "_" << gnss_synchro.Signal << "_sat_"
-		                           << gnss_synchro.PRN  << "CN0_dB_0_" << FLAGS_value_CN0_dB_0 << "_dBHz.csv";
 
-		                pdpfafile.open(filenamepd.str().c_str(), std::ios::app | std::ios::out);
-		                pdpfafile << FLAGS_value_threshold << "," << Pd << "," << Pfa_p << "," << Pmd << std::endl;
-		                pdpfafile.close();
-                    }
+                    if(dump_test_results)
+                        {
+                            std::stringstream filenamepd;
+                            filenamepd.str("");
+                            filenamepd << "../data/test_statistics_" << gnss_synchro.System
+                                       << "_" << gnss_synchro.Signal << "_sat_"
+                                       << gnss_synchro.PRN  << "CN0_dB_0_" << FLAGS_value_CN0_dB_0 << "_dBHz.csv";
+
+                            pdpfafile.open(filenamepd.str().c_str(), std::ios::app | std::ios::out);
+                            pdpfafile << FLAGS_value_threshold << "," << Pd << "," << Pfa_p << "," << Pmd << std::endl;
+                            pdpfafile.close();
+                        }
 
 
                 }
@@ -789,19 +809,29 @@ TEST_F(GpsL1CaPcpsQuickSyncAcquisitionGSoC2014Test, ValidationOfResultsProbabili
                 {
                     std::cout << "Estimated probability of false alarm (satellite absent) = " << Pfa_a << std::endl;
                     std::cout << "Mean acq time = " << mean_acq_time_us << " microseconds." << std::endl;
-					
-					if(dump_test_results)
-					{
-		                std::stringstream filenamepf;
-		                filenamepf.str("");
-		                filenamepf << "../data/test_statistics_" << gnss_synchro.System
-		                           << "_" << gnss_synchro.Signal << "_sat_"
-		                           << gnss_synchro.PRN  << "CN0_dB_0_" << FLAGS_value_CN0_dB_0 << "_dBHz.csv";
-
-		                pdpfafile.open(filenamepf.str().c_str(), std::ios::app | std::ios::out);
-		                pdpfafile << FLAGS_value_threshold << "," << Pfa_a << std::endl;
-		                pdpfafile.close();
-                    }
+
+                    if(dump_test_results)
+                        {
+                            std::stringstream filenamepf;
+                            filenamepf.str("");
+                            filenamepf << "../data/test_statistics_" << gnss_synchro.System
+                                       << "_" << gnss_synchro.Signal << "_sat_"
+                                       << gnss_synchro.PRN  << "CN0_dB_0_" << FLAGS_value_CN0_dB_0 << "_dBHz.csv";
+
+                            pdpfafile.open(filenamepf.str().c_str(), std::ios::app | std::ios::out);
+                            pdpfafile << FLAGS_value_threshold << "," << Pfa_a << std::endl;
+                            pdpfafile.close();
+                        }
                 }
+#ifdef OLD_BOOST
+            ASSERT_NO_THROW( {
+                ch_thread.timed_join(boost::posix_time::seconds(1));
+            }) << "Failure while waiting the queue to stop" << std::endl;
+#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;
+#endif
         }
 }
diff --git a/src/tests/gnss_block/gps_l1_ca_pcps_tong_acquisition_gsoc2013_test.cc b/src/tests/gnss_block/gps_l1_ca_pcps_tong_acquisition_gsoc2013_test.cc
index 6ee4fc5..ec1565d 100644
--- a/src/tests/gnss_block/gps_l1_ca_pcps_tong_acquisition_gsoc2013_test.cc
+++ b/src/tests/gnss_block/gps_l1_ca_pcps_tong_acquisition_gsoc2013_test.cc
@@ -476,6 +476,16 @@ TEST_F(GpsL1CaPcpsTongAcquisitionGSoC2013Test, ValidationOfResults)
             {
                 EXPECT_EQ(2, message) << "Acquisition failure. Expected message: 2=ACQ FAIL.";
             }
+#ifdef OLD_BOOST
+            ASSERT_NO_THROW( {
+                ch_thread.timed_join(boost::posix_time::seconds(1));
+            }) << "Failure while waiting the queue to stop" << std::endl;
+#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;
+#endif
         }
 }
 
@@ -560,5 +570,15 @@ TEST_F(GpsL1CaPcpsTongAcquisitionGSoC2013Test, ValidationOfResultsProbabilities)
                 std::cout << "Estimated probability of false alarm (satellite absent) = " << Pfa_a << std::endl;
                 std::cout << "Mean acq time = " << mean_acq_time_us << " microseconds." << std::endl;
             }
+#ifdef OLD_BOOST
+            ASSERT_NO_THROW( {
+                ch_thread.timed_join(boost::posix_time::seconds(1));
+            }) << "Failure while waiting the queue to stop" << std::endl;
+#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;
+#endif
         }
 }
diff --git a/src/tests/single_test_main.cc b/src/tests/single_test_main.cc
index b36dcd8..ad92eea 100644
--- a/src/tests/single_test_main.cc
+++ b/src/tests/single_test_main.cc
@@ -31,8 +31,7 @@
 
 #include <iostream>
 #include <queue>
-#include <boost/thread/mutex.hpp>
-#include <boost/thread/thread.hpp>
+#include <boost/thread.hpp>
 #include <boost/filesystem.hpp>
 #include <gflags/gflags.h>
 #include <glog/logging.h>
diff --git a/src/tests/test_main.cc b/src/tests/test_main.cc
index 2e155ce..c6c6622 100644
--- a/src/tests/test_main.cc
+++ b/src/tests/test_main.cc
@@ -35,13 +35,12 @@
 #include <iostream>
 #include <queue>
 #include <memory>
-#include <gtest/gtest.h>
-#include <glog/logging.h>
+#include <boost/thread.hpp>
+#include <boost/filesystem.hpp>
 #include <gflags/gflags.h>
+#include <glog/logging.h>
 #include <gnuradio/msg_queue.h>
-#include <boost/thread/mutex.hpp>
-#include <boost/thread/thread.hpp>
-#include <boost/filesystem.hpp>
+#include <gtest/gtest.h>
 #include "concurrent_queue.h"
 #include "concurrent_map.h"
 #include "control_thread.h"
diff --git a/src/utils/front-end-cal/main.cc b/src/utils/front-end-cal/main.cc
index 1160937..2d38099 100644
--- a/src/utils/front-end-cal/main.cc
+++ b/src/utils/front-end-cal/main.cc
@@ -39,8 +39,7 @@
 #include <vector>
 #include <boost/filesystem.hpp>
 #include <boost/lexical_cast.hpp>
-#include <boost/thread/mutex.hpp>
-#include <boost/thread/thread.hpp>
+#include <boost/thread.hpp>
 #include <gflags/gflags.h>
 #include <glog/logging.h>
 #include <gnuradio/msg_queue.h>

-- 
Alioth's /usr/local/bin/git-commit-notice on /srv/git.debian.org/git/pkg-hamradio/gnss-sdr.git



More information about the pkg-hamradio-commits mailing list