]> granicus.if.org Git - esp-idf/commitdiff
tiny-test-fw: Print more useful info when download.config doesn't exist
authorRoland Dobai <dobai.roland@gmail.com>
Mon, 27 Aug 2018 10:43:37 +0000 (12:43 +0200)
committerRoland Dobai <dobai.roland@gmail.com>
Mon, 27 Aug 2018 10:47:08 +0000 (12:47 +0200)
tools/tiny-test-fw/IDF/IDFApp.py

index 4bf667f64bf55711ee869cf9acac3a8e4ffe42cf..b173aaf80f84abbe2da24e847ce0df317f713edf 100644 (file)
@@ -32,7 +32,12 @@ class IDFApp(App.BaseApp):
         self.idf_path = self.get_sdk_path()
         self.binary_path = self.get_binary_path(app_path)
         assert os.path.exists(self.binary_path)
-        assert self.IDF_DOWNLOAD_CONFIG_FILE in os.listdir(self.binary_path)
+        try:
+            assert self.IDF_DOWNLOAD_CONFIG_FILE in os.listdir(self.binary_path)
+        except AssertionError as e:
+            e.args += ("{} doesn't exist. Try to run 'make print_flash_cmd | tail -n 1 > {}/{}' for resolving the issue"
+                       "".format(self.IDF_DOWNLOAD_CONFIG_FILE, self.binary_path, self.IDF_DOWNLOAD_CONFIG_FILE),)
+            raise
         self.esptool, self.partition_tool = self.get_tools()
 
     @classmethod