diff --git a/tools/gpstest/run_unittest.sh b/tools/gpstest/run_unittest.sh index d284fa74e5..9f93fdfc9a 100755 --- a/tools/gpstest/run_unittest.sh +++ b/tools/gpstest/run_unittest.sh @@ -3,8 +3,8 @@ # NOTE: can only run inside limeGPS test box! # run limeGPS with random static location -timeout 300 ./simulate_gps_signal.py & -gps_PID=$? +timeout 300 ./simulate_gps_signal.py 32.7518 -117.1962 & +gps_PID=$(ps -aux | grep -m 1 "timeout 300" | cut -d ' ' -f 7) echo "starting limeGPS..." sleep 10 diff --git a/tools/gpstest/test_gps.py b/tools/gpstest/test_gps.py index b5d0cdd254..8bc5dc89a8 100644 --- a/tools/gpstest/test_gps.py +++ b/tools/gpstest/test_gps.py @@ -65,7 +65,7 @@ def verify_ubloxgnss_data(socket: messaging.SubSocket, max_time: int): sat_count.append(event.ubloxGnss.measurementReport.numMeas) num_sat = int(sum(sat_count)/len(sat_count)) - assert num_sat > 5, f"Not enough satellites {num_sat} (TestBox setup!)" + assert num_sat >= 5, f"Not enough satellites {num_sat} (TestBox setup!)" def verify_gps_location(socket: messaging.SubSocket, max_time: int): @@ -188,4 +188,4 @@ class TestGPS(unittest.TestCase): if __name__ == "__main__": - unittest.main() \ No newline at end of file + unittest.main()