From b48c74c2e94fda21792c7afe8832a2e03e29a2bd Mon Sep 17 00:00:00 2001 From: robbederks Date: Tue, 26 May 2020 15:35:51 -0700 Subject: [PATCH] Adding UNO to automated tests (#538) * Added UNO to automated tests * Longer wait for uno while resetting? * Increased wrong timeout * this fixes it locally --- tests/automated/2_health.py | 1 + tests/automated/8_gps.py | 2 +- tests/automated/helpers.py | 10 +++++++--- 3 files changed, 9 insertions(+), 4 deletions(-) diff --git a/tests/automated/2_health.py b/tests/automated/2_health.py index da5eaec9d995bac..23af65d5bd32e32 100644 --- a/tests/automated/2_health.py +++ b/tests/automated/2_health.py @@ -32,6 +32,7 @@ def test_orientation_detection(p): reset_pandas() p.reconnect() detected_harness_orientation = p.health()['car_harness_status'] + print(f"Detected orientation: {detected_harness_orientation}") if (i == 0 and detected_harness_orientation != 0) or detected_harness_orientation in seen_orientations: assert False seen_orientations.append(detected_harness_orientation) diff --git a/tests/automated/8_gps.py b/tests/automated/8_gps.py index fc387c996916b2d..76fdb238c517fd1 100644 --- a/tests/automated/8_gps.py +++ b/tests/automated/8_gps.py @@ -14,7 +14,7 @@ def test_gps_version(p): for i in range(2): # Reset GPS p.set_esp_power(0) - time.sleep(0.5) + time.sleep(2) p.set_esp_power(1) time.sleep(1) diff --git a/tests/automated/helpers.py b/tests/automated/helpers.py index 6b963e954f8f350..f4118464efc1937 100644 --- a/tests/automated/helpers.py +++ b/tests/automated/helpers.py @@ -13,7 +13,7 @@ SPEED_NORMAL = 500 SPEED_GMLAN = 33.3 BUS_SPEEDS = [(0, SPEED_NORMAL), (1, SPEED_NORMAL), (2, SPEED_NORMAL), (3, SPEED_GMLAN)] -TIMEOUT = 30 +TIMEOUT = 45 GEN2_HW_TYPES = [Panda.HW_TYPE_BLACK_PANDA, Panda.HW_TYPE_UNO] GPS_HW_TYPES = [Panda.HW_TYPE_GREY_PANDA, Panda.HW_TYPE_BLACK_PANDA, Panda.HW_TYPE_UNO] @@ -41,7 +41,8 @@ def init_panda_serials(): test_all_types = parameterized([ param(panda_type=Panda.HW_TYPE_WHITE_PANDA), param(panda_type=Panda.HW_TYPE_GREY_PANDA), - param(panda_type=Panda.HW_TYPE_BLACK_PANDA) + param(panda_type=Panda.HW_TYPE_BLACK_PANDA), + param(panda_type=Panda.HW_TYPE_UNO) ]) test_all_pandas = parameterized( list(map(lambda x: x[0], _panda_serials)) @@ -65,6 +66,9 @@ def init_panda_serials(): test_black = parameterized([ param(panda_type=Panda.HW_TYPE_BLACK_PANDA) ]) +test_uno = parameterized([ + param(panda_type=Panda.HW_TYPE_UNO) + ]) def connect_wifi(serial=None): p = Panda(serial=serial) @@ -112,7 +116,7 @@ def time_many_sends(p, bus, p_recv=None, msg_count=100, msg_id=None, two_pandas= def reset_pandas(): panda_jungle.set_panda_power(False) - time.sleep(2) + time.sleep(3) panda_jungle.set_panda_power(True) time.sleep(5)