git @ Cat's Eye Technologies ellsync / master
Merge pull request #5 from catseye/develop-0.5-2022.09xx Test under Python 2, or 3, or both, depending on what's available. Chris Pressey authored 1 year, 7 days ago GitHub committed 1 year, 7 days ago
2 changed file(s) with 25 addition(s) and 3 deletion(s). Raw diff Collapse all Expand all
0 #!/usr/bin/env python
0 #!/usr/bin/env python3
11
22 from os.path import realpath, dirname, join
33 import sys
00 #!/bin/sh
11
2 PYTHONPATH=src python2 src/ellsync/tests.py || exit 1
3 PYTHONPATH=src python3 src/ellsync/tests.py || exit 1
2 if [ "x$PYTHON" != "x" ]; then
3 if command -v "$PYTHON" > /dev/null 2>&1; then
4 PYTHONPATH=src $PYTHON src/ellsync/tests.py || exit 1
5 else
6 echo "$PYTHON not found on executable search path. Aborting."
7 exit 1
8 fi
9 else
10 MISSING=""
11 if command -v python2 > /dev/null 2>&1; then
12 PYTHONPATH=src python2 src/ellsync/tests.py || exit 1
13 else
14 MISSING="${MISSING}2"
15 fi
16 if command -v python3 > /dev/null 2>&1; then
17 PYTHONPATH=src python3 src/ellsync/tests.py || exit 1
18 else
19 MISSING="${MISSING}3"
20 fi
21 if [ "x${MISSING}" = "x23" ]; then
22 echo "Neither python2 nor python3 found on executable search path. Aborting."
23 exit 1
24 fi
25 fi