Skip to content
Snippets Groups Projects
Commit a6c05a8b authored by Severin Landwein's avatar Severin Landwein
Browse files

.

parent 1194dac5
No related branches found
No related tags found
No related merge requests found
Pipeline #159725 failed
......@@ -4,6 +4,7 @@ before_script:
- chmod +x ./setup-build-env.sh
- ./setup-build-env.sh
- cp -r ../* /root/Arduino/libraries
- apt-get install python3
stages:
- build
......@@ -18,6 +19,7 @@ test1:
stage: test
script:
- arduino-cli compile --fqbn arduino:avr:uno examples/unittest/
#- arduino-cli upload --fqbn arduino:avr:uno -p /dev/ttyUSB0 examples/unittest
- arduino-cli upload --fqbn arduino:avr:uno -p /dev/ttyUSB0 examples/unittest
#- arduino-cli monitor -p /dev/ttyUSB0
- python3 examples/unittest/compile_test.py
- sleep 60m
\ No newline at end of file
#! /usr/bin/env python3
import subprocess
import json
import argparse
import sys
import logging
def main():
command = 'arduino-cli monitor -p /dev/ttyUSB0'
process = subprocess.run(command.split, stdout=subprocess.PIPE)
if process.returncode:
log.error(process.stdout.decode('utf-8'))
sys.exit(process.returncode)
else:
log.error('Board not installed: {}'.format(board))
sys.exit(-1)
if __name__ == '__main__':
main()
\ No newline at end of file
0% Loading or .
You are about to add 0 people to the discussion. Proceed with caution.
Please register or to comment