Adding UNO to automated tests (#538)

* Added UNO to automated tests

* Longer wait for uno while resetting?

* Increased wrong timeout

* this fixes it locally
master
robbederks 2020-05-26 15:35:51 -07:00 committed by GitHub
parent a5802cdd15
commit b48c74c2e9
No known key found for this signature in database
GPG Key ID: 4AEE18F83AFDEB23
3 changed files with 9 additions and 4 deletions

View File

@ -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)

View File

@ -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)

View File

@ -13,7 +13,7 @@ from .wifi_helpers import _connect_wifi
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 @@ 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 @@ test_grey = parameterized([
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)