Commits

Armin Rigo committed 83885c4

Try to make the test pass on Win32

  • Participants
  • Parent commits 181f993

Comments (0)

Files changed (2)

File pypy/module/pypyjit/test_pypy_c/test_00_model.py

     def setup_method(self, meth):
         self.filepath = self.tmpdir.join(meth.im_func.func_name + '.py')
 
-    def run(self, func_or_src, args=[], import_site=False, **jitopts):
+    def run(self, func_or_src, args=[], import_site=False,
+            discard_stdout_before_last_line=False, **jitopts):
         jitopts.setdefault('threshold', 200)
         src = py.code.Source(func_or_src)
         if isinstance(func_or_src, types.FunctionType):
             stderr = ''
         assert not stderr
         #
+        if discard_stdout_before_last_line:
+            stdout = stdout.splitlines(True)[-1]
+        #
         # parse the JIT log
         rawlog = logparser.parse_log_file(str(logfile))
         rawtraces = logparser.extract_category(rawlog, 'jit-log-opt-')

File pypy/module/pypyjit/test_pypy_c/test_ffi.py

                 n += 1
             return n
 
-        log = self.run(main, [], import_site=True)
+        log = self.run(main, [], import_site=True,
+                       discard_stdout_before_last_line=True)  # <- for Win32
         assert log.result == 10000
         loop, = log.loops_by_id('cfficall')
         assert loop.match_by_id('cfficall', """