pypy-effect-analysis / pypy / tool / release / test /

import py
from pypy.tool.autopath import pypydir
from pypy.tool.release.package import package
from pypy.module.sys.version import  CPYTHON_VERSION
import tarfile, os

def test_dir_structure(test='test'):
    # make sure we have sort of pypy-c
    pypy_c = py.path.local(pypydir).join('translator', 'goal', 'pypy-c')
    if not pypy_c.check():
        os.system("echo faked_pypy_c> %s" % (pypy_c,))
        fake_pypy_c = True
        fake_pypy_c = False
        builddir = package(py.path.local(pypydir).dirpath(), test)
        prefix = builddir.join(test)
        cpyver = '%d.%d.%d' % CPYTHON_VERSION[:3]
        assert prefix.join('lib-python', cpyver, 'test').check()
        assert prefix.join('bin', 'pypy').check()
        assert prefix.join('lib_pypy', '').check()
        assert not prefix.join('lib_pypy', 'py').check()
        assert not prefix.join('lib_pypy', 'ctypes_configure').check()
        assert prefix.join('LICENSE').check()
        assert prefix.join('README').check()
        th ='%s.tar.bz2' % test)))
        assert th.getmember('%s/lib_pypy/' % test)

        # the headers file could be not there, because they are copied into
        # trunk/include only during translation
        includedir = py.path.local(pypydir).dirpath().join('include')
        def check_include(name):
            if includedir.join(name).check(file=True):
                assert th.getmember('%s/include/%s' % (test, name))
        if fake_pypy_c:

def test_with_tarfile_module():
    from pypy.tool.release import package
    prev = package.USE_TARFILE_MODULE
        package.USE_TARFILE_MODULE = True
        package.USE_TARFILE_MODULE = prev
Tip: Filter by directory path e.g. /media app.js to search for public/media/app.js.
Tip: Use camelCasing e.g. ProjME to search for
Tip: Filter by extension type e.g. /repo .js to search for all .js files in the /repo directory.
Tip: Separate your search with spaces e.g. /ssh pom.xml to search for src/ssh/pom.xml.
Tip: Use ↑ and ↓ arrow keys to navigate and return to view the file.
Tip: You can also navigate files with Ctrl+j (next) and Ctrl+k (previous) and view the file with Ctrl+o.
Tip: You can also navigate files with Alt+j (next) and Alt+k (previous) and view the file with Alt+o.