Run tests w/Python 2, or 3, or both, depending on what's available.
Chris Pressey
3 years ago
0 | 0 | #!/bin/sh |
1 | 1 | |
2 | APPLIANCES='tests/appliances/yolk.py2.md tests/appliances/yolk.py3.md' | |
2 | APPLIANCES="" | |
3 | if command -v python2 > /dev/null 2>&1; then | |
4 | APPLIANCES="$APPLIANCES tests/appliances/yolk.py2.md" | |
5 | fi | |
6 | if command -v python3 > /dev/null 2>&1; then | |
7 | APPLIANCES="$APPLIANCES tests/appliances/yolk.py3.md" | |
8 | fi | |
3 | 9 | if [ -x ./bin/yolk-c ]; then |
4 | 10 | # Testing the RPython-built executable is still disabled, but at least |
5 | 11 | # we now know a little more about why it only passes 14 of the 45 tests. |
22 | 28 | echo 'pass' >/dev/null |
23 | 29 | fi |
24 | 30 | |
31 | if [ "x$APPLIANCES" = "x" ]; then | |
32 | echo "No suitable Python versions or Yolk implementations found." | |
33 | exit 1 | |
34 | fi | |
35 | ||
25 | 36 | falderal $APPLIANCES README.md $* |