瀏覽代碼

ci: Don't swallow exception details from flashing process

If flashing fails, throw an exception that includes some information about the failure.
Angus Gratton 5 年之前
父節點
當前提交
88d0d1fa02
共有 1 個文件被更改,包括 4 次插入3 次删除
  1. 4 3
      tools/ci/python_packages/ttfw_idf/IDFDUT.py

+ 4 - 3
tools/ci/python_packages/ttfw_idf/IDFDUT.py

@@ -263,14 +263,15 @@ class IDFDUT(DUT.SerialDUT):
         :param: erase_nvs: whether erase NVS partition during flash
         :return: None
         """
+        last_error = None
         for baud_rate in [921600, 115200]:
             try:
                 self._try_flash(erase_nvs, baud_rate)
                 break
-            except RuntimeError:
-                continue
+            except RuntimeError as e:
+                last_error = e
         else:
-            raise IDFToolError()
+            raise last_error
 
     @_uses_esptool
     def reset(self, esp):