From bc307c920c664908e3c666e2d216c8867275080c Mon Sep 17 00:00:00 2001 From: Roland Dobai Date: Mon, 27 Aug 2018 12:43:37 +0200 Subject: [PATCH] tiny-test-fw: Print more useful info when download.config doesn't exist --- tools/tiny-test-fw/IDF/IDFApp.py | 7 ++++++- 1 file changed, 6 insertions(+), 1 deletion(-) diff --git a/tools/tiny-test-fw/IDF/IDFApp.py b/tools/tiny-test-fw/IDF/IDFApp.py index 4bf667f64..b173aaf80 100644 --- a/tools/tiny-test-fw/IDF/IDFApp.py +++ b/tools/tiny-test-fw/IDF/IDFApp.py @@ -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