From 001896fbd76eb1e50226dab33499e27fcd30d5a0 Mon Sep 17 00:00:00 2001 From: Carles Fernandez Date: Mon, 10 Oct 2016 11:19:58 +0200 Subject: [PATCH] Fix crash --- src/tests/system-tests/ttff_gps_l1.cc | 15 +++++++++++---- 1 file changed, 11 insertions(+), 4 deletions(-) diff --git a/src/tests/system-tests/ttff_gps_l1.cc b/src/tests/system-tests/ttff_gps_l1.cc index 80807aaaf..86d6c8350 100644 --- a/src/tests/system-tests/ttff_gps_l1.cc +++ b/src/tests/system-tests/ttff_gps_l1.cc @@ -238,10 +238,17 @@ void TTFF_GPS_L1_CA_Test::config_1() void TTFF_GPS_L1_CA_Test::config_2() { - //std::string path = std::string(TEST_PATH); - //std::string filename = path + "../../conf/gnss-sdr_GPS_L1_USRP_X300_realtime.conf"; - config2 = std::make_shared(FLAGS_config_file_ttff); - config2->set_property("SignalSource.samples", std::to_string(FLAGS_fs_in * FLAGS_max_measurement_duration)); + if(FLAGS_config_file_ttff.empty()) + { + std::string path = std::string(TEST_PATH); + std::string filename = path + "../../conf/gnss-sdr_GPS_L1_USRP_X300_realtime.conf"; + config2 = std::make_shared(filename); + } + else + { + config2 = std::make_shared(FLAGS_config_file_ttff); + } + config2->set_property("SignalSource.samples", std::to_string(FLAGS_fs_in * FLAGS_max_measurement_duration)); }