Ejemplo n.º 1
0
from _buildbot_util import check_call

usage = """%prog [options]"""
parser = OptionParser(usage)
parser.add_option('--virtualenv',type='string',default='virtualenv',
                  help='string to invoke virtualenv')
parser.add_option('--easy-install-nose',action='store_true',default=False,
                  help='run "easy_install nose" in the virtualenv')
(options, args) = parser.parse_args()
if len(args)!=0:
    parser.print_help()
    sys.exit(0)

TARGET='PYmpl'

if os.path.exists(TARGET):
    shutil.rmtree(TARGET)

if 1:
    build_path = 'build'
    if os.path.exists(build_path):
        shutil.rmtree(build_path)

check_call('%s %s'%(options.virtualenv,TARGET))
TARGET_py = os.path.join(TARGET,'bin','python')
TARGET_easy_install = os.path.join(TARGET,'bin','easy_install')

if options.easy_install_nose:
    check_call('%s nose'%TARGET_easy_install)
check_call('%s setup.py install'%TARGET_py)
Ejemplo n.º 2
0
"""This script will install matplotlib to a virtual environment to
faciltate testing."""
import shutil, os, sys
from subprocess import Popen, PIPE, STDOUT
from _buildbot_util import check_call
TARGET=os.path.abspath('PYmpl')
if not os.path.exists(TARGET):
    raise RuntimeError('the virtualenv target directory was not found')
TARGET_py = os.path.join(TARGET,'bin','python')
check_call('%s -c "import shutil,matplotlib; x=matplotlib.get_configdir(); shutil.rmtree(x)"'%TARGET_py)
check_call('%s run-mpl-test.py --verbose --all --keep-failed'%TARGET_py,
           cwd='test')
Ejemplo n.º 3
0
"""This script will test matplotlib in a virtual environment"""
import os, glob
from _buildbot_util import check_call
TARGET=os.path.abspath('PYmpl')
if not os.path.exists(TARGET):
    raise RuntimeError('the virtualenv target directory was not found')
TARGET_py = os.path.join(TARGET,'bin','python')
check_call('%s -c "import shutil,matplotlib; x=matplotlib.get_configdir(); shutil.rmtree(x)"'%TARGET_py)
previous_test_images = glob.glob('failed-diff-*.png')
for fname in previous_test_images:
    os.unlink(fname)
check_call('%s -c "import sys, matplotlib; success = matplotlib.test(verbosity=2); sys.exit(not success)"'%TARGET_py)
Ejemplo n.º 4
0
parser.add_option('--virtualenv',
                  type='string',
                  default='virtualenv',
                  help='string to invoke virtualenv')
parser.add_option('--easy-install-nose',
                  action='store_true',
                  default=False,
                  help='run "easy_install nose" in the virtualenv')
(options, args) = parser.parse_args()
if len(args) != 0:
    parser.print_help()
    sys.exit(0)

TARGET = 'PYmpl'

if os.path.exists(TARGET):
    shutil.rmtree(TARGET)

if 1:
    build_path = 'build'
    if os.path.exists(build_path):
        shutil.rmtree(build_path)

check_call('%s %s' % (options.virtualenv, TARGET))
TARGET_py = os.path.join(TARGET, 'bin', 'python')
TARGET_easy_install = os.path.join(TARGET, 'bin', 'easy_install')

if options.easy_install_nose:
    check_call('%s nose' % TARGET_easy_install)
check_call('%s setup.py install' % TARGET_py)
Ejemplo n.º 5
0
"""This script will test matplotlib in a virtual environment"""
from __future__ import print_function
import os, glob

from _buildbot_util import check_call

TARGET=os.path.abspath('PYmpl')

if not os.path.exists(TARGET):
    raise RuntimeError('the virtualenv target directory was not found')

TARGET_py = os.path.join(TARGET,'bin','python')
check_call('%s -c "import shutil,matplotlib; x=matplotlib.get_configdir(); shutil.rmtree(x)"'%TARGET_py)

previous_test_images = glob.glob('failed-diff-*.png')
for fname in previous_test_images:
    os.unlink(fname)

check_call('%s -c "import sys, matplotlib; success = matplotlib.test(verbosity=2); sys.exit(not success)"'%TARGET_py)