예제 #1
0
 def run(self, args, env):
     arglist = SDK.runtime() + [self.exe_name] + map(str, args)
     env = env.copy()
     env['LANG'] = 'C'
     mono = subprocess.Popen(arglist, stdout=subprocess.PIPE,
                             stderr=subprocess.PIPE, env=env)
     stdout, stderr = mono.communicate()
     retval = mono.wait()
     return stdout, stderr, retval
예제 #2
0
 def run(self, args, env):
     arglist = SDK.runtime() + [self.exe_name] + map(str, args)
     env = env.copy()
     env['LANG'] = 'C'
     mono = subprocess.Popen(arglist,
                             stdout=subprocess.PIPE,
                             stderr=subprocess.PIPE,
                             env=env)
     stdout, stderr = mono.communicate()
     retval = mono.wait()
     return stdout, stderr, retval
예제 #3
0
파일: query.py 프로젝트: sota/pypy-old
def load_and_cache_assembly(name, outfile):
    tmpfile = udir.join(name)
    arglist = SDK.runtime() + [Query.get(), name, str(tmpfile)]
    retcode = subprocess.call(arglist)
    assert retcode == 0
    mydict = {}
    execfile(str(tmpfile), mydict)
    types = mydict['types']
    f = outfile.open('wb')
    pickle.dump(types, f, pickle.HIGHEST_PROTOCOL)
    f.close()
    return types
예제 #4
0
파일: gencli.py 프로젝트: sota/pypy
    def build_exe(self):        
        if getoption('source'):
            return None

        pypy_dll = get_pypy_dll() # get or recompile pypy.dll
        shutil.copy(pypy_dll, self.tmpdir.strpath)

        ilasm = SDK.ilasm()
        tmpfile = self.tmpfile.strpath
        self.outfile = self.entrypoint.output_filename(tmpfile)
        argv = [tmpfile,'/output:' + self.outfile] + self.entrypoint.ilasm_flags()
        self._exec_helper(ilasm, argv,
                          'ilasm failed to assemble (%s):\n%s\n%s',
                          timeout = 900)
        # Mono's ilasm occasionally deadlocks.  We set a timer to avoid
        # blocking automated test runs forever.


        if getoption('verify'):
            peverify = SDK.peverify()
            self._exec_helper(peverify, [outfile], 'peverify failed to verify (%s):\n%s\n%s')
        return self.outfile
예제 #5
0
    def build_exe(self):
        if getoption('source'):
            return None

        pypy_dll = get_pypy_dll()  # get or recompile pypy.dll
        shutil.copy(pypy_dll, self.tmpdir.strpath)

        ilasm = SDK.ilasm()
        tmpfile = self.tmpfile.strpath
        self.outfile = self.entrypoint.output_filename(tmpfile)
        argv = [tmpfile, '/output:' + self.outfile
                ] + self.entrypoint.ilasm_flags()
        self._exec_helper(ilasm,
                          argv,
                          'ilasm failed to assemble (%s):\n%s\n%s',
                          timeout=900)
        # Mono's ilasm occasionally deadlocks.  We set a timer to avoid
        # blocking automated test runs forever.

        if getoption('verify'):
            peverify = SDK.peverify()
            self._exec_helper(peverify, [outfile],
                              'peverify failed to verify (%s):\n%s\n%s')
        return self.outfile
예제 #6
0
    def run(self, *args):
        if self._exe is None:
            py.test.skip("Compilation disabled")

        if getoption('norun'):
            py.test.skip("Execution disabled")

        arglist = SDK.runtime() + [self._exe] + map(str, args)
        env = os.environ.copy()
        env['LANG'] = 'C'
        mono = subprocess.Popen(arglist, stdout=subprocess.PIPE,
                                stderr=subprocess.PIPE, env=env)
        stdout, stderr = mono.communicate()
        retval = mono.wait()
        return stdout, stderr, retval
예제 #7
0
파일: rte.py 프로젝트: sota/pypy-old
 def get_COMPILER(cls):
     return SDK.ilasm()
예제 #8
0
파일: rte.py 프로젝트: sota/pypy-old
 def get_COMPILER(cls):
     return SDK.csc()
예제 #9
0
파일: rte.py 프로젝트: sota/pypy
 def get_COMPILER(cls):
     return SDK.ilasm()
예제 #10
0
파일: rte.py 프로젝트: sota/pypy
 def get_COMPILER(cls):
     return SDK.csc()