From: Cefn Hoile Date: Sun, 18 Feb 2018 20:18:26 +0000 (+0000) Subject: Ampy-based selective integration-test upload routine for Huzzah running CircuitPython X-Git-Tag: 0.1.0~4^2~116 X-Git-Url: https://git.ayoreis.com/Adafruit_Blinka-hackapet.git/commitdiff_plain/b0f0c9f207a4743a838e891e63107a3243b2d1bb Ampy-based selective integration-test upload routine for Huzzah running CircuitPython --- diff --git a/python/upload_feather_huzzah_circuitpython_put.sh b/python/upload_feather_huzzah_circuitpython_put.sh new file mode 100755 index 0000000..5a4b91a --- /dev/null +++ b/python/upload_feather_huzzah_circuitpython_put.sh @@ -0,0 +1,26 @@ +#!/bin/sh +PORT=/dev/ttyUSB0 + +# create only relevant directories on the board +find testing -type d | \ + grep -v -E "(.(git|idea|vscode)|__pycache__)" | \ + grep -v -E '^testing/implementation/micropython*' | \ + xargs -n1 -I {} sh -c "echo Creating directory {} ...; ampy --port ${PORT} mkdir {}" + +# put top-level modules in place +for NAME in agnostic unittest +do + echo "Copying ${NAME}.py ..." + ampy --port ${PORT} put ${NAME}.py ${NAME}.py +done + +# recursively sync module folders excluding packages +# already provided by circuitpython, and excluding +# testing packages targeting micropython +for NAME in testing +do + find ${NAME} -name '*.py'| \ + grep -v -E '^testing/implementation/micropython*' | \ + grep -v -E '^testing/mcp.py' | \ + xargs -n1 -I {} sh -c "echo Copying {} ...; ampy --port ${PORT} put {} {}" +done