2009-12-25 04:47:01 +08:00
|
|
|
import os, sys, subprocess, urllib
|
|
|
|
|
|
|
|
BUILDNAME=os.environ.get('BUILD_NUMBER', "1")
|
|
|
|
|
|
|
|
def call(*args):
|
|
|
|
ret = subprocess.call(list(args))
|
|
|
|
assert ret == 0
|
|
|
|
|
|
|
|
def bincall(*args):
|
|
|
|
args = list(args)
|
|
|
|
args[0] = os.path.join(BIN, args[0])
|
|
|
|
call(*args)
|
|
|
|
|
2009-12-25 07:24:58 +08:00
|
|
|
call("virtualenv", os.path.abspath(BUILDNAME), '--no-site-packages')
|
2009-12-25 07:31:51 +08:00
|
|
|
BIN=os.path.abspath(os.path.join(BUILDNAME, 'bin'))
|
|
|
|
if not os.path.exists(BIN):
|
|
|
|
BIN=os.path.abspath(os.path.join(BUILDNAME, 'Scripts'))
|
|
|
|
assert os.path.exists(BIN)
|
2010-07-27 03:15:15 +08:00
|
|
|
|
2009-12-25 07:31:51 +08:00
|
|
|
PYTHON=os.path.join(BIN, 'python')
|
2009-12-25 04:47:01 +08:00
|
|
|
bincall("python", "setup.py", "develop", "-q")
|
2010-07-27 03:15:15 +08:00
|
|
|
bincall("pip", "install", "-r", "testing/pip-reqs1.txt",
|
2009-12-25 04:47:01 +08:00
|
|
|
"-q", "--download-cache=download")
|
2010-07-27 03:15:15 +08:00
|
|
|
bincall("py.test", "--ignore", BUILDNAME,
|
|
|
|
"--xml=junit.xml",
|
2009-12-25 07:24:58 +08:00
|
|
|
"--report=skipped", "--runslowtest", *sys.argv[1:])
|