Exemplo n.º 1
0
Arquivo: test.py Projeto: mattorb/Ale
    def execute(self, args=None):
        prevCwd = os.getcwd()
        noseroot = join(join(join(alePath('recipes_installed'), 'test'), 'pkgs'), 'nose-0.11.0')
        coverageroot = join(join(join(alePath('recipes_installed'), 'test'), 'pkgs'), 'coverage-3.2b3')

        command = join(join(noseroot, 'bin/'), 'nosetests')

        args = [] if not args else args
        args += [
            '--nologcapture',
            '-m',
            'test',
            '-e',
            'lib.*',
            '-e',
            ".*\.ale.*",
            ]

        fullcommandwithargs = [command] + args
        relcommandwithargs = [relpath(command)] + args

        logging.info('Executing %s' % relcommandwithargs)

        pythonpath = ':'.join([noseroot] + getGaeLibs())

        p = Popen(fullcommandwithargs, env={'PYTHONPATH': pythonpath, 'PATH': os.environ['PATH']})  # todo: just yield a generator or get all .py files
        sts = os.waitpid(p.pid, 0)[1]

        return sts
Exemplo n.º 2
0
    def execute(self, args=None):
        modipydroot = join(join(join(alePath('recipes_installed'), 'pyautotest'), 'pkgs'), 'ishikawa-modipyd-1516eeb')

        arg = '.' if not args else args[0]

        command = join(modipydroot, 'bin/pyautotest')
        logging.info('Executing %s %s' % (relpath(command), arg))
        print 'Modify a source file to trigger any dependent tests to re-execute'

        commandwithargs = [command, arg] if arg else [command]

        pythonpath = ':'.join([modipydroot] + ['.'] + ['lib'] + getGaeLibs())

        p = Popen(commandwithargs, env={'PATH':os.environ['PATH'], 'PYTHONPATH': pythonpath})  # todo: just yield a generator or get all .py files
        sts = os.waitpid(p.pid, 0)[1]

        return sts
Exemplo n.º 3
0
Arquivo: shell.py Projeto: mattorb/Ale
    def execute(self, args=None):
        ipythonroot = join(join(join(alePath('recipes_installed'), 'shell'), 'pkgs'), 'ipython-0.10')

        command = join(ipythonroot, 'ipython.py')
        logging.info('%s' % command)

        logging.info('Executing %s %s' % (relpath(command), args))

        commandwithargs = [command] + args if args else [command]
        
        commandwithargs += ['-ipythondir', join(ipythonroot, 'UserConfig')]
        commandwithargs += ['-color_info']

        pythonpath = ':'.join(['.'] + ['lib'] + getGaeLibs())

        p = Popen(commandwithargs, env={'PATH':os.environ['PATH'], 'PYTHONPATH': pythonpath, 'HOME': os.environ['HOME']})
        sts = os.waitpid(p.pid, 0)[1]

        return sts