Skip to content

Commit ab66af9

Browse files
committed
add installation test task
1 parent dcd20d0 commit ab66af9

File tree

2 files changed

+28
-2
lines changed

2 files changed

+28
-2
lines changed

pavement.py

Lines changed: 12 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -20,7 +20,11 @@
2020
import paver.setuputils
2121
paver.setuputils.install_distutils_tasks()
2222
import paver.doctools
23-
import docpaver
23+
try:
24+
import docpaver
25+
except:
26+
import warnings
27+
warnings.warn('docpaver was not found, will not be able to produce documentation')
2428

2529
# What project are we building?
2630
PROJECT = 'virtualenvwrapper'
@@ -176,7 +180,13 @@ def sdist(options):
176180
"""Create a source distribution.
177181
"""
178182
pass
179-
183+
184+
@task
185+
@needs(['sdist'])
186+
def test_install(options):
187+
sh('./tests/test_install.sh "%s" "%s"' % (options.sdist.dist_dir, VERSION))
188+
return
189+
180190
@task
181191
def test():
182192
sh('bash ./tests/test.sh')

tests/test_install.sh

Lines changed: 16 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,16 @@
1+
#!/bin/sh
2+
#
3+
# Test installation of virtualenvwrapper in a new virtualenv.
4+
#
5+
6+
test_dir=$(dirname $0)
7+
dist_dir="$1"
8+
version="$2"
9+
10+
export WORKON_HOME="${TMPDIR:-/tmp}/WORKON_HOME"
11+
mkvirtualenv "installtest"
12+
easy_install "$dist_dir/virtualenvwrapper-$version.tar.gz"
13+
RC=$?
14+
15+
rm -rf "$WORKON_HOME"
16+
exit $RC

0 commit comments

Comments
 (0)