* Improve panda automated testing

 * begin testing both white and grey panda
 * Improve wifi reliability

* First commit for docker

* Fix usb devices not showing up on reconnect

* Add tests for two pandas, latency and throughput

* Add Jenkinsfile

* Allow flashing release on wifi

* Fix Jenkins stuck in DFU mode and docker container running

* Add pandaextra from xx to docker

* Need more time for ST to restart, sometimes

* Add xml output to tests

* Try making wifi more reliable

* Fix infinite loop in ping

* Check connected after flash

* Cleanup two panda tests

* Try fixing failing test with check after udp

* Try to fix with sleep

* Temporarily run just 5 and 6

* Cleanup

* Desperate times call for desperate measurse

* BUGFIX: power saving when rx only

* Fix failing when white panda is first after udp

* Test both Dev and EON build

* Jenkins test results for both builds

* Better test case naming
This commit is contained in:
Nigel Armstrong
2019-04-09 14:09:18 -07:00
committed by GitHub
parent f383eee968
commit 1d2f8f0abf
14 changed files with 515 additions and 77 deletions

View File

@@ -182,6 +182,7 @@ class Panda(object):
traceback.print_exc()
if wait == False or self._handle != None:
break
context = usb1.USBContext() #New context needed so new devices show up
assert(self._handle != None)
print("connected")
@@ -280,11 +281,14 @@ class Panda(object):
if reconnect:
self.reconnect()
def recover(self):
def recover(self, timeout=None):
self.reset(enter_bootloader=True)
t_start = time.time()
while len(PandaDFU.list()) == 0:
print("waiting for DFU...")
time.sleep(0.1)
if timeout is not None and (time.time() - t_start) > timeout:
return False
dfu = PandaDFU(PandaDFU.st_serial_to_dfu_serial(self._serial))
dfu.recover()
@@ -292,6 +296,7 @@ class Panda(object):
# reflash after recover
self.connect(True, True)
self.flash()
return True
@staticmethod
def flash_ota_st():
@@ -300,8 +305,9 @@ class Panda(object):
return ret==0
@staticmethod
def flash_ota_wifi():
ret = os.system("cd %s && make clean && make ota" % (os.path.join(BASEDIR, "boardesp")))
def flash_ota_wifi(release=False):
release_str = "RELEASE=1" if release else ""
ret = os.system("cd {} && make clean && {} make ota".format(os.path.join(BASEDIR, "boardesp"),release_str))
time.sleep(1)
return ret==0