aboutsummaryrefslogtreecommitdiff
blob: 48ed757f473e2a645ac339db8a8fcebb30fff0c1 (plain)
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
#!/bin/sh
cd "${0%/*}" || exit

TESTPY="${PWD}/run_tests.py"
first=Y

conf="${PWD}/R-overlay.conf"
tconf="${conf}.tests"

[ -e "${tconf}" ] || { ln -vs -- "${conf}" "${tconf}" && first=; } || exit

for PYTHON in python2 python3; do
   if which ${PYTHON} 1>/dev/null 2>/dev/null; then
      [ -n "${first}" ] && first= || echo
      echo "*** Running ${TESTPY##*/} with PYTHON=${PYTHON} ***"
      echo
      PYTHONPATH="${PWD}" ${PYTHON} "${TESTPY}"
   else
      echo "PYTHON=${PYTHON} not found." 1>&2
   fi
done