micropython-ulab/build-cp.sh
Jeff Epler e6113135cc Take our own version of run-tests
This is modified to better suit our needs, and because micropython
changes in the meantime were troublesome.

Expected outputs can be generated:
./run-tests -d tests --write-exp

Remove any incorrect .exp files before running as they won't be updated
otherwise.
2020-11-18 15:07:42 -06:00

20 lines
848 B
Bash
Executable file

#!/bin/sh
set -e
nproc=$(python -c 'import multiprocessing; print(multiprocessing.cpu_count())')
HERE="$(dirname -- "$(readlink -f -- "${0}")" )"
[ -e circuitpython/py/py.mk ] || (git clone --depth 100 --branch 6.0.x https://github.com/adafruit/circuitpython && cd circuitpython && git submodule update --init)
rm -rf circuitpython/extmod/ulab; ln -s "$HERE" circuitpython/extmod/ulab
make -C circuitpython/mpy-cross -j$nproc
make -C circuitpython/ports/unix -j$nproc deplibs
make -C circuitpython/ports/unix -j$nproc
if ! env MICROPY_MICROPYTHON=circuitpython/ports/unix/micropython ./run-tests -d tests; then
for exp in *.exp; do
testbase=$(basename $exp .exp);
echo -e "\nFAILURE $testbase";
diff -u $testbase.exp $testbase.out;
done
exit 1
fi
(cd circuitpython && sphinx-build -E -W -b html . _build/html)