Skip to content

Commit

Permalink
Fix execution of extra tests in some environments
Browse files Browse the repository at this point in the history
and some code cleaning
  • Loading branch information
carlesfernandez committed Feb 5, 2017
1 parent 0db1ecc commit f8adffe
Show file tree
Hide file tree
Showing 10 changed files with 189 additions and 234 deletions.
2 changes: 1 addition & 1 deletion src/tests/CMakeLists.txt
Original file line number Diff line number Diff line change
Expand Up @@ -279,7 +279,7 @@ if(ENABLE_UNIT_TESTING)
signal_generator_blocks
signal_generator_adapters
pvt_gr_blocks
signak_processing_testing_lib
signal_processing_testing_lib
${VOLK_GNSSSDR_LIBRARIES}
${GNSS_SDR_TEST_OPTIONAL_LIBS}
)
Expand Down
8 changes: 0 additions & 8 deletions src/tests/system-tests/obs_gps_l1_system_test.cc
Original file line number Diff line number Diff line change
Expand Up @@ -53,14 +53,6 @@
#include "signal_generator_flags.h"


DECLARE_string(generator_binary);
DECLARE_string(rinex_nav_file);
DECLARE_int32(duration);
DECLARE_string(static_position);
DECLARE_string(dynamic_position);
DECLARE_string(filename_rinex_obs);
DECLARE_string(filename_raw_data);

// For GPS NAVIGATION (L1)
concurrent_queue<Gps_Acq_Assist> global_gps_acq_assist_queue;
concurrent_map<Gps_Acq_Assist> global_gps_acq_assist_map;
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -32,6 +32,6 @@ include_directories(

file(GLOB SIGNAL_PROCESSING_TESTING_LIB_HEADERS "*.h")
list(SORT SIGNAL_PROCESSING_TESTING_LIB_HEADERS)
add_library(signak_processing_testing_lib ${SIGNAL_PROCESSING_TESTING_LIB_SOURCES} ${SIGNAL_PROCESSING_TESTING_LIB_HEADERS})
add_library(signal_processing_testing_lib ${SIGNAL_PROCESSING_TESTING_LIB_SOURCES} ${SIGNAL_PROCESSING_TESTING_LIB_HEADERS})
source_group(Headers FILES ${SIGNAL_PROCESSING_TESTING_LIB_HEADERS})

Original file line number Diff line number Diff line change
Expand Up @@ -63,12 +63,12 @@ long int tlm_dump_reader::num_epochs()
{
std::ifstream::pos_type size;
int number_of_vars_in_epoch = 3;
int epoch_size_bytes = sizeof(double)*number_of_vars_in_epoch;
int epoch_size_bytes = sizeof(double) * number_of_vars_in_epoch;
std::ifstream tmpfile( d_dump_filename.c_str(), std::ios::binary | std::ios::ate);
if (tmpfile.is_open())
{
size = tmpfile.tellg();
long int nepoch=size / epoch_size_bytes;
long int nepoch = size / epoch_size_bytes;
return nepoch;
}
else
Expand All @@ -86,12 +86,12 @@ bool tlm_dump_reader::open_obs_file(std::string out_file)
d_dump_filename=out_file;
d_dump_file.exceptions ( std::ifstream::failbit | std::ifstream::badbit );
d_dump_file.open(d_dump_filename.c_str(), std::ios::in | std::ios::binary);
std::cout << "TLM dump enabled, Log file: " << d_dump_filename.c_str()<< std::endl;
std::cout << "TLM dump enabled, Log file: " << d_dump_filename.c_str() << std::endl;
return true;
}
catch (const std::ifstream::failure & e)
{
std::cout << "Problem opening TLM dump Log file: " << d_dump_filename.c_str()<< std::endl;
std::cout << "Problem opening TLM dump Log file: " << d_dump_filename.c_str() << std::endl;
return false;
}
}
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -28,16 +28,16 @@
* -------------------------------------------------------------------------
*/

#ifndef GNSS_SDR_tlm_dump_reader_H
#define GNSS_SDR_tlm_dump_reader_H
#ifndef GNSS_SDR_TLM_DUMP_READER_H
#define GNSS_SDR_TLM_DUMP_READER_H

#include <iostream>
#include <fstream>
#include <string>
#include <vector>

class tlm_dump_reader {

class tlm_dump_reader
{
public:
~tlm_dump_reader();
bool read_binary_obs();
Expand All @@ -51,10 +51,8 @@ class tlm_dump_reader {
double d_TOW_at_Preamble;

private:

std::string d_dump_filename;
std::ifstream d_dump_file;

};

#endif //GNSS_SDR_tlm_dump_reader_H
#endif //GNSS_SDR_TLM_DUMP_READER_H
Original file line number Diff line number Diff line change
Expand Up @@ -78,8 +78,8 @@ bool tracking_dump_reader::restart()
long int tracking_dump_reader::num_epochs()
{
std::ifstream::pos_type size;
int number_of_double_vars=11;
int number_of_float_vars=5;
int number_of_double_vars = 11;
int number_of_float_vars = 5;
int epoch_size_bytes=sizeof(unsigned long int) +
sizeof(double) * number_of_double_vars +
sizeof(float) * number_of_float_vars;
Expand Down Expand Up @@ -113,8 +113,10 @@ bool tracking_dump_reader::open_obs_file(std::string out_file)
std::cout << "Problem opening Tracking dump Log file: " << d_dump_filename.c_str() << std::endl;
return false;
}
}else{
return false;
}
else
{
return false;
}
}

Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -28,16 +28,16 @@
* -------------------------------------------------------------------------
*/

#ifndef GNSS_SDR_tracking_dump_reader_H
#define GNSS_SDR_tracking_dump_reader_H
#ifndef GNSS_SDR_TRACKING_DUMP_READER_H
#define GNSS_SDR_TRACKING_DUMP_READER_H

#include <iostream>
#include <fstream>
#include <string>
#include <vector>

class tracking_dump_reader {

class tracking_dump_reader
{
public:
~tracking_dump_reader();
bool read_binary_obs();
Expand Down Expand Up @@ -80,10 +80,8 @@ class tracking_dump_reader {
double aux2;

private:

std::string d_dump_filename;
std::ifstream d_dump_file;

};

#endif //GNSS_SDR_tracking_dump_reader_H
#endif //GNSS_SDR_TRACKING_DUMP_READER_H
Original file line number Diff line number Diff line change
Expand Up @@ -28,16 +28,16 @@
* -------------------------------------------------------------------------
*/

#ifndef GNSS_SDR_tracking_true_obs_reader_H
#define GNSS_SDR_tracking_true_obs_reader_H
#ifndef GNSS_SDR_TRACKING_TRUE_OBS_READER_H
#define GNSS_SDR_TRACKING_TRUE_OBS_READER_H

#include <iostream>
#include <fstream>
#include <string>
#include <vector>

class tracking_true_obs_reader {

class tracking_true_obs_reader
{
public:
~tracking_true_obs_reader();
bool read_binary_obs();
Expand All @@ -53,10 +53,8 @@ class tracking_true_obs_reader {
double tow;

private:

std::string d_dump_filename;
std::ifstream d_dump_file;

};

#endif //GNSS_SDR_tracking_true_obs_reader_H
#endif //GNSS_SDR_RACKING_TRUE_OBS_READER_H
Loading

0 comments on commit f8adffe

Please sign in to comment.