예제 #1
0
파일: gencli.py 프로젝트: TheDunn/flex-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._exec_helper(ilasm, [tmpfile]+self.entrypoint.ilasm_flags(),
                          '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.

        self.outfile = self.entrypoint.output_filename(tmpfile)
        if getoption('verify'):
            peverify = SDK.peverify()
            self._exec_helper(peverify, [outfile], 'peverify failed to verify (%s):\n%s\n%s')
        return self.outfile
예제 #2
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