Thanks to visit codestin.com
Credit goes to github.com

Skip to content

Commit f17a304

Browse files
committed
add buildbot scripts
svn path=/trunk/matplotlib/; revision=7535
1 parent 78ba993 commit f17a304

3 files changed

Lines changed: 50 additions & 0 deletions

File tree

test/_buildbot_install.py

Lines changed: 15 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,15 @@
1+
"""This script will install matplotlib to a virtual environment to
2+
faciltate testing."""
3+
import shutil, os, sys
4+
from subprocess import Popen, PIPE, STDOUT
5+
6+
from _buildbot_util import check_call
7+
8+
TARGET='PYmpl'
9+
10+
if os.path.exists(TARGET):
11+
shutil.rmtree(TARGET)
12+
13+
check_call('virtualenv %s'%(TARGET,))
14+
TARGET_py = os.path.join(TARGET,'bin','python')
15+
check_call('%s setup.py install'%TARGET_py)

test/_buildbot_test.py

Lines changed: 15 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,15 @@
1+
"""This script will install matplotlib to a virtual environment to
2+
faciltate testing."""
3+
import shutil, os, sys
4+
from subprocess import Popen, PIPE, STDOUT
5+
6+
from _buildbot_util import check_call
7+
8+
TARGET=os.path.abspath('PYmpl')
9+
10+
if not os.path.exists(TARGET):
11+
raise RuntimeError('the virtualenv target directory was not found')
12+
13+
TARGET_py = os.path.join(TARGET,'bin','python')
14+
check_call('%s run-mpl-test.py --all'%TARGET_py,
15+
cwd='test')

test/_buildbot_util.py

Lines changed: 20 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,20 @@
1+
"""Module to help _buildbot_*.py scripts."""
2+
3+
import shutil, os, sys
4+
from subprocess import Popen, PIPE, STDOUT
5+
6+
def check_call(args,**kwargs):
7+
# print
8+
# print args
9+
# print '**kwargs'
10+
# print kwargs
11+
# print
12+
13+
# This use of Popen is copied from matplotlib.texmanager (Use of
14+
# close_fds seems a bit mysterious.)
15+
16+
p = Popen(args, shell=True,
17+
close_fds=(sys.platform!='win32'),**kwargs)
18+
p.wait()
19+
if p.returncode!=0:
20+
raise RuntimeError('returncode is %s'%p.returncode)

0 commit comments

Comments
 (0)