scripts: runners: check for required programs

Add self.require() checks before running commands. Increase test
coverage, including for this feature, while we are here.

Signed-off-by: Marti Bolivar <marti.bolivar@nordicsemi.no>
This commit is contained in:
Marti Bolivar 2019-06-02 16:18:39 -06:00 committed by Carles Cufí
commit c24e044c6e
18 changed files with 309 additions and 20 deletions

View file

@ -78,6 +78,7 @@ class Esp32BinaryRunner(ZephyrBinaryRunner):
partition_table_bin=args.esp_flash_partition_table)
def do_run(self, command, **kwargs):
self.require(self.espidf)
bin_name = path.splitext(self.elf)[0] + path.extsep + 'bin'
cmd_convert = [self.espidf, '--chip', 'esp32', 'elf2image', self.elf]
cmd_flash = [self.espidf, '--chip', 'esp32', '--port', self.device,