mirror of
https://git.intern.spaceteamaachen.de/ALPAKA/Tasty.git
synced 2025-06-10 18:45:59 +00:00
Added check for correct building
This commit is contained in:
parent
9dc48e1271
commit
84b7ce4a1a
11
run.py
11
run.py
@ -28,8 +28,17 @@ for case in os.listdir(path):
|
||||
with open('Tasty/include/sta/tasty/config.hpp', 'w') as f:
|
||||
f.write(cfg_template.format(number))
|
||||
|
||||
print(colored(f'Building case { number }...', 'blue'))
|
||||
|
||||
# Build the new project and upload it to the STM32.
|
||||
subprocess.call(f'Tasty/flash.bat {case}', stdout=sys.stdout)
|
||||
out = subprocess.run([r'Tasty\flash.bat', case])
|
||||
|
||||
# Check if the bash script was successfully executed.
|
||||
if out.returncode != 0:
|
||||
print('Building\t' + colored('[FAILED]', 'red'))
|
||||
continue
|
||||
else:
|
||||
print('Building\t' + colored('[PASSED]', 'red'))
|
||||
|
||||
print(colored(f'Running case { number }...', 'blue'))
|
||||
|
||||
|
Loading…
x
Reference in New Issue
Block a user