git @ Cat's Eye Technologies Dieter / 40cbab3
Run tests under Python 2, or 3, or both, depending on availability. Chris Pressey 1 year, 28 days ago
1 changed file(s) with 23 addition(s) and 5 deletion(s). Raw diff Collapse all Expand all
00 #!/bin/sh
11
2 for FILE in eg/*.dtr; do
3 echo $FILE
4 python2 src/dieter.py $FILE || exit 1
5 python3 src/dieter.py $FILE || exit 1
6 done
2 MISSING=""
3
4 if command -v python2 > /dev/null 2>&1; then
5 for FILE in eg/*.dtr; do
6 echo "python2 src/dieter.py $FILE"
7 python2 src/dieter.py $FILE || exit 1
8 done
9 else
10 MISSING="${MISSING}2"
11 fi
12 if command -v python3 > /dev/null 2>&1; then
13 for FILE in eg/*.dtr; do
14 echo "python3 src/dieter.py $FILE"
15 python3 src/dieter.py $FILE || exit 1
16 done
17 else
18 MISSING="${MISSING}3"
19 fi
20
21 if [ "x${MISSING}" = "x23" ]; then
22 echo "Neither python2 nor python3 found on executable search path. Aborting."
23 exit 1
24 fi