summaryrefslogtreecommitdiff
path: root/tools/teamcity-runtests.sh
diff options
context:
space:
mode:
authorJeff Quast <contact@jeffquast.com>2014-11-23 18:43:49 -0800
committerJeff Quast <contact@jeffquast.com>2014-11-23 18:43:49 -0800
commitdf45962a8fc3437c40c86dd6e39dcd700d1bd53f (patch)
tree4d0075771c1943e29d97ef1eafc080500d51f976 /tools/teamcity-runtests.sh
parent43f5010d702630a899dc27389fa56238c88875ca (diff)
downloadpexpect-git-df45962a8fc3437c40c86dd6e39dcd700d1bd53f.tar.gz
Fixes and error detection for runtests.sh
Diffstat (limited to 'tools/teamcity-runtests.sh')
-rwxr-xr-xtools/teamcity-runtests.sh17
1 files changed, 10 insertions, 7 deletions
diff --git a/tools/teamcity-runtests.sh b/tools/teamcity-runtests.sh
index ff89c9d..e39f15f 100755
--- a/tools/teamcity-runtests.sh
+++ b/tools/teamcity-runtests.sh
@@ -5,21 +5,24 @@
set -e
set -o pipefail
-function usage() {
- echo "$0 (2.6|2.7|3.3|3.4)"
-}
if [ -z $1 ]; then
- usage
+ echo "$0 (2.6|2.7|3.3|3.4)"
exit 1
fi
pyversion=$1
here=$(cd `dirname $0`; pwd)
osrel=$(uname -s)
+venv=teamcity-pexpect
+venv_wrapper=$(which virtualenvwrapper.sh)
+
+if [ -z $venv_wrapper ]; then
+ echo "virtualenvwrapper.sh not found in PATH."
+fi
-. `which virtualenvwrapper.sh`
-rmvirtualenv teamcity-pexpect || true
-mkvirtualenv -p `which python${pyversion}` teamcity-pexpect
+. ${venv_wrapper}
+rmvirtualenv ${venv} || true
+mkvirtualenv -p `which python${pyversion}` ${venv} || true
# install ptyprocess
cd $here/../../ptyprocess