aboutsummaryrefslogtreecommitdiff
path: root/circuitpython/extmod/ulab/test-common.sh
blob: d4e4d1e7cbc8a26856a630b860563d57e81f83d2 (plain)
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
#!/bin/sh
set -e
dims="$1"
micropython="$2"
for level1 in $(printf "%dd " $(seq 1 ${dims}))
do
    for level2 in numpy scipy utils complex; do
        rm -f *.exp
	if ! env MICROPY_MICROPYTHON="$micropython" ./run-tests -d tests/"$level1"/"$level2"; then
            for exp in *.exp; do
                testbase=$(basename $exp .exp);
                echo -e "\nFAILURE $testbase";
                diff -u $testbase.exp $testbase.out;
            done
            exit 1
	fi
    done
done