Skip to content
Browse files

I think I prefer this style better.

  • Loading branch information
alex committed Jun 16, 2013
1 parent ccb7312 commit 56e7e40462317a11721d7fa7ad65aa372615578d
Showing with 21 additions and 20 deletions.
  1. +3 −3 tasks/
  2. +18 −17 tasks/
@@ -1,4 +1,4 @@
from invoke import task, run as run_
import invoke

from .base import BaseTest

@@ -13,7 +13,7 @@ def __init__(self, files, options, untranslated=False):

def mspec(self, args):
run_("../mspec/bin/mspec %s -t %s --config=topaz.mspec %s" % (args, self.exe, self.files), echo=True)"../mspec/bin/mspec %s -t %s --config=topaz.mspec %s" % (args, self.exe, self.files), echo=True)

def run(self):
self.mspec("run -G fails %s" % self.options)
@@ -30,7 +30,7 @@ def spectask(files="", options="", untranslated=False):
runner = Rubyspecs(files, options, untranslated=untranslated)
getattr(runner, taskname)()
spectask.__name__ = taskname
return task(spectask)
return invoke.task(spectask)

run = generate_spectask("run")
@@ -3,7 +3,7 @@
import struct
import sys

from invoke import task, run
import invoke

import requests

@@ -21,11 +21,11 @@ def __init__(self, func, deps=[], needs_rpython=True, needs_rubyspec=False,
self.create_build = create_build

def install_deps(self):
run("pip install {}".format(" ".join(self.deps)))"pip install {}".format(" ".join(self.deps)))

def download_rpython(self):
run("wget -O `pwd`/../pypy.tar.bz2 || wget -O `pwd`/../pypy.tar.bz2")
run("tar -xf `pwd`/../pypy.tar.bz2 -C `pwd`/../")"wget -O `pwd`/../pypy.tar.bz2 || wget -O `pwd`/../pypy.tar.bz2")"tar -xf `pwd`/../pypy.tar.bz2 -C `pwd`/../")
[path_name] = glob.glob("../pypy-pypy*")
path_name = os.path.abspath(path_name)
with open("rpython_marker", "w") as f:
@@ -52,7 +52,7 @@ def upload_build(self):
raise ValueError("Don't recognize platform: {!r}".format(sys.platform))
build_name = "topaz-{platform}-{sha1}.tar.bz2".format(platform=platform, sha1=os.environ["TRAVIS_COMMIT"])
run("python topaz/tools/ {}".format(build_name))"python topaz/tools/ {}".format(build_name))
with open(build_name, "rb") as f:
response ="", {
"build_secret": os.environ["BUILD_SECRET"],
@@ -63,7 +63,7 @@ def upload_build(self):

def install_requirements():
t = TEST_TYPES[os.environ["TEST_TYPE"]]
if t.deps:
@@ -75,52 +75,53 @@ def install_requirements():

def run_tests():
t = TEST_TYPES[os.environ["TEST_TYPE"]]

def tag_specs(files=""):
run("../mspec/bin/mspec tag -t {} -f spec --config=topaz.mspec {}".format("`pwd`/bin/topaz", files))"../mspec/bin/mspec tag -t {} -f spec --config=topaz.mspec {}".format("`pwd`/bin/topaz", files))

def untag_specs(files=""):
run("../mspec/bin/mspec tag --del fails -t {} -f spec --config=topaz.mspec {}".format("`pwd`/bin/topaz", files))"../mspec/bin/mspec tag --del fails -t {} -f spec --config=topaz.mspec {}".format("`pwd`/bin/topaz", files))

def upload_build():
t = TEST_TYPES[os.environ["TEST_TYPE"]]
if t.create_build:

def run_own_tests(env):
run("PYTHONPATH=$PYTHONPATH:{rpython_path} py.test".format(**env))"PYTHONPATH=$PYTHONPATH:{rpython_path} py.test".format(**env))

def run_rubyspec_untranslated(env):
run_specs("bin/", prefix="PYTHONPATH=$PYTHONPATH:{rpython_path} ".format(**env))

def run_translate_tests(env):
run("PYTHONPATH={rpython_path}:$PYTHONPATH python {rpython_path}/rpython/bin/rpython --batch -Ojit".format(**env))"PYTHONPATH={rpython_path}:$PYTHONPATH python {rpython_path}/rpython/bin/rpython --batch -Ojit".format(**env))
run("PYTHONPATH={rpython_path}:$PYTHONPATH py.test --topaz=bin/topaz tests/jit/".format(**env))"PYTHONPATH={rpython_path}:$PYTHONPATH py.test --topaz=bin/topaz tests/jit/".format(**env))

def run_specs(binary, prefix=""):
run("{prefix}../mspec/bin/mspec -G fails -t {binary} --format=dotted --config=topaz.mspec".format("{prefix}../mspec/bin/mspec -G fails -t {binary} --format=dotted --config=topaz.mspec".format(

def run_docs_tests(env):
run("sphinx-build -W -b html docs/ docs/_build/")"sphinx-build -W -b html docs/ docs/_build/")

"own": Test(run_own_tests, deps=["-r requirements.txt"]),

0 comments on commit 56e7e40

Please sign in to comment.
You can’t perform that action at this time.