tests/run-tests: Be sure to close Pyboard object on completion.

So underlying device was properly closed too.
This commit is contained in:
Paul Sokolovsky 2017-04-02 20:47:44 +03:00
parent 9b3f423c14
commit 5b2db4bb51
1 changed files with 4 additions and 1 deletions

View File

@ -456,7 +456,10 @@ def main():
# clear search path to make sure tests use only builtin modules
os.environ['MICROPYPATH'] = ''
if not run_tests(pyb, tests, args):
res = run_tests(pyb, tests, args)
if pyb:
pyb.close()
if not res:
sys.exit(1)
if __name__ == "__main__":