Error out if run from the wrong directory

Signed-off-by: Gilles Peskine <Gilles.Peskine@arm.com>
This commit is contained in:
Gilles Peskine 2020-04-27 10:39:20 +02:00
parent 9fdc657cbf
commit 1b01559fea

View file

@ -43,6 +43,8 @@ def run_all_demos(quiet=False):
Return True if all demos passed and False if a demo fails.
"""
all_demos = glob.glob('programs/*/*_demo.sh')
if not all_demos:
raise Exception('No demos found. run_demos needs to operate from the Mbed TLS toplevel directory.')
return run_demos(all_demos, quiet=quiet)
def main():