From 19bc085e8904ea9d921dd5f98ef088e134df77d6 Mon Sep 17 00:00:00 2001 From: Carles Fernandez Date: Sun, 25 Dec 2016 12:49:14 +0100 Subject: [PATCH] Change name to obs_gps_l1_system_test --- src/tests/CMakeLists.txt | 26 +++++++-------- ...stem_test.cc => obs_gps_l1_system_test.cc} | 33 +++++++------------ 2 files changed, 24 insertions(+), 35 deletions(-) rename src/tests/system-tests/{trk_system_test.cc => obs_gps_l1_system_test.cc} (96%) diff --git a/src/tests/CMakeLists.txt b/src/tests/CMakeLists.txt index 02d972f90..f08fccc10 100644 --- a/src/tests/CMakeLists.txt +++ b/src/tests/CMakeLists.txt @@ -481,23 +481,23 @@ if(ENABLE_SYSTEM_TESTING) ${CMAKE_SOURCE_DIR}/install/$ ) - add_executable(trk_system_test - ${CMAKE_CURRENT_SOURCE_DIR}/system-tests/trk_system_test.cc ) + add_executable(obs_gps_l1_system_test + ${CMAKE_CURRENT_SOURCE_DIR}/system-tests/obs_gps_l1_system_test.cc ) if(NOT ${GTEST_DIR_LOCAL}) - add_dependencies(trk_system_test gtest-${gtest_RELEASE} ) + add_dependencies(obs_gps_l1_system_test gtest-${gtest_RELEASE} ) else(NOT ${GTEST_DIR_LOCAL}) - add_dependencies(trk_system_test gtest) + add_dependencies(obs_gps_l1_system_test gtest) endif(NOT ${GTEST_DIR_LOCAL}) include_directories(${GPSTK_INCLUDE_DIRS}) - target_link_libraries(trk_system_test ${GFlags_LIBS} - ${GLOG_LIBRARIES} - ${GTEST_LIBRARIES} - gnss_sp_libs - gnss_rx - ${gpstk_libs}) - add_custom_command(TARGET trk_system_test POST_BUILD - COMMAND ${CMAKE_COMMAND} -E copy $ - ${CMAKE_SOURCE_DIR}/install/$ + target_link_libraries(obs_gps_l1_system_test ${GFlags_LIBS} + ${GLOG_LIBRARIES} + ${GTEST_LIBRARIES} + gnss_sp_libs + gnss_rx + ${gpstk_libs}) + add_custom_command(TARGET obs_gps_l1_system_test POST_BUILD + COMMAND ${CMAKE_COMMAND} -E copy $ + ${CMAKE_SOURCE_DIR}/install/$ ) endif(ENABLE_SYSTEM_TESTING) diff --git a/src/tests/system-tests/trk_system_test.cc b/src/tests/system-tests/obs_gps_l1_system_test.cc similarity index 96% rename from src/tests/system-tests/trk_system_test.cc rename to src/tests/system-tests/obs_gps_l1_system_test.cc index cba9c6ef9..0eee934a9 100644 --- a/src/tests/system-tests/trk_system_test.cc +++ b/src/tests/system-tests/obs_gps_l1_system_test.cc @@ -1,5 +1,5 @@ /*! - * \file trk_system_test.cc + * \file obs_gps_l1_system_test.cc * \brief This class implements a test for the validation of generated observables. * \author Carles Fernandez-Prades, 2016. cfernandez(at)cttc.es * @@ -64,7 +64,7 @@ DEFINE_string(filename_raw_data, "signal_out.bin", "Filename of output raw data concurrent_queue global_gps_acq_assist_queue; concurrent_map global_gps_acq_assist_map; -class Trk_System_Test: public ::testing::Test +class Obs_Gps_L1_System_Test: public ::testing::Test { public: std::string generator_binary; @@ -93,7 +93,7 @@ public: }; -bool Trk_System_Test::check_valid_rinex_nav(std::string filename) +bool Obs_Gps_L1_System_Test::check_valid_rinex_nav(std::string filename) { bool res = false; res = gpstk::isRinexNavFile(filename); @@ -101,7 +101,7 @@ bool Trk_System_Test::check_valid_rinex_nav(std::string filename) } -bool Trk_System_Test::check_valid_rinex_obs(std::string filename) +bool Obs_Gps_L1_System_Test::check_valid_rinex_obs(std::string filename) { bool res = false; res = gpstk::isRinexObsFile(filename); @@ -109,7 +109,7 @@ bool Trk_System_Test::check_valid_rinex_obs(std::string filename) } -int Trk_System_Test::configure_generator() +int Obs_Gps_L1_System_Test::configure_generator() { // Configure signal generator generator_binary = FLAGS_generator_binary; @@ -124,7 +124,7 @@ int Trk_System_Test::configure_generator() } -int Trk_System_Test::generate_signal() +int Obs_Gps_L1_System_Test::generate_signal() { pid_t wait_result; int child_status; @@ -149,7 +149,7 @@ int Trk_System_Test::generate_signal() } -int Trk_System_Test::configure_receiver() +int Obs_Gps_L1_System_Test::configure_receiver() { config = std::make_shared(); @@ -305,7 +305,7 @@ int Trk_System_Test::configure_receiver() } -int Trk_System_Test::run_receiver() +int Obs_Gps_L1_System_Test::run_receiver() { std::shared_ptr control_thread; control_thread = std::make_shared(config); @@ -344,7 +344,7 @@ int Trk_System_Test::run_receiver() } -void Trk_System_Test::check_results() +void Obs_Gps_L1_System_Test::check_results() { std::vector> > pseudorange_ref(33); std::vector> > carrierphase_ref(33); @@ -415,17 +415,6 @@ void Trk_System_Test::check_results() exit(1); } - // Example: count observations per sat: - /* std::vector> >::iterator iter; - int prn_id=0; - for(iter = pseudorange_ref.begin(); iter != pseudorange_ref.end(); iter++) - { - double size_v = iter->size(); - std::cout << "Size for sat " << prn_id << ": " << size_v << std::endl; - prn_id++; - }*/ - - // Open and read GNSS-SDR-generated RINEX observables file try { std::string arg2_gen = std::string("./") + generated_rinex_obs; @@ -659,7 +648,7 @@ void Trk_System_Test::check_results() } -TEST_F(Trk_System_Test, Tracking_system_test) +TEST_F(Obs_Gps_L1_System_Test, Observables_system_test) { std::cout << "Validating input RINEX nav file: " << FLAGS_rinex_nav_file << " ..." << std::endl; bool is_rinex_nav_valid = check_valid_rinex_nav(FLAGS_rinex_nav_file); @@ -695,7 +684,7 @@ TEST_F(Trk_System_Test, Tracking_system_test) int main(int argc, char **argv) { - std::cout << "Running Tracking validation test..." << std::endl; + std::cout << "Running Observables validation test..." << std::endl; int res = 0; try {