From 9719e414f1800bb7c32578b2314f70316c00a708 Mon Sep 17 00:00:00 2001 From: Jerome Flesch Date: Thu, 25 Jan 2018 15:52:48 +0100 Subject: [PATCH] add script run_tests to run the tests quickly in a virtualenv Signed-off-by: Jerome Flesch --- run_tests.sh | 22 ++++++++++++++++++++++ 1 file changed, 22 insertions(+) create mode 100755 run_tests.sh diff --git a/run_tests.sh b/run_tests.sh new file mode 100755 index 0000000..dbeec3b --- /dev/null +++ b/run_tests.sh @@ -0,0 +1,22 @@ +#!/bin/sh + +ret=0 + + +for pyver in python3 ; do + echo "# Testing with ${pyver}" + rm -rf venv-${pyver} + virtualenv -p ${pyver} --system-site-packages venv-${pyver} + . venv-${pyver}/bin/activate + if ! ${pyver} ./setup.py install ; then + echo "Install failed" + exit 1 + fi + + if ! ${pyver} ./setup.py nosetests ; then + echo "Tests failed" + ret=1 + fi +done + +exit ${ret}