summaryrefslogtreecommitdiff
path: root/runtests.sh
diff options
context:
space:
mode:
authorVincent Bernat <vincent@bernat.im>2018-07-31 08:41:55 +0200
committerIlya Etingof <etingof@gmail.com>2018-07-31 08:41:55 +0200
commit2048a9230312caa51486b42b590956f72a6d3f8f (patch)
tree512c9ddb2adc7149347cb4998ea09a0ed9f8d226 /runtests.sh
parent3e8fd37ee1f6b736ed4ac8a3351e120e976667ae (diff)
downloadpysnmp-git-2048a9230312caa51486b42b590956f72a6d3f8f.tar.gz
Ensure tests run through tox are using the expected Python executable (#175)
Otherwise, they are likely to use the system python.
Diffstat (limited to 'runtests.sh')
-rwxr-xr-xruntests.sh6
1 files changed, 4 insertions, 2 deletions
diff --git a/runtests.sh b/runtests.sh
index a435da6e..9143a769 100755
--- a/runtests.sh
+++ b/runtests.sh
@@ -2,6 +2,8 @@
set -e
+PYTHON=${1:-python}
+
for x in examples/hlapi/asyncore/sync/manager/cmdgen/*.py \
examples/hlapi/asyncore/sync/agent/ntforg/*.py \
examples/hlapi/asyncore/manager/cmdgen/*.py \
@@ -19,7 +21,7 @@ do
continue
;;
*)
- python "${x}" | tail -50
+ $PYTHON "${x}" | tail -50
;;
esac
-done \ No newline at end of file
+done