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
0 | |
#!/usr/bin/env python
|
|
0 |
#!/usr/bin/env python3
|
1 | 1 |
|
2 | 2 |
from os.path import realpath, dirname, join
|
3 | 3 |
import sys
|
0 | 0 |
#!/bin/sh
|
1 | 1 |
|
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
|