[Python-Dev] Windows buildbot trick

Thomas Heller theller at ctypes.org
Fri Jul 18 09:14:35 CEST 2008


The most annoying thing on the windows buildbots is when Python crashes hard
(with a general protection fault or stack overflow, for example).
Usually the system pops up a dialog in this case which allows to
attach a debugger to the process.  This dialog will stay open until
the maintainer manually closes it, and will prevent the next builds.

On my boxes I have inserted these two lines into the PythonXY/Scripts/buildbot
script, right at the top:

  import win32api; win32api.SetErrorMode(7)
  print "SetErrorMode(7) called."

These lines prevent the dialog box to be displayed for critical errors.

For example, on Windows AMD64 the test_cpickle test in the trunk currently fails with
a stack overflow; instead of hanging with the mentioned dialog box open the test now terminates:

http://www.python.org/dev/buildbot/trunk/amd64%20XP%20trunk/builds/40/step-test/0

-- 
Thanks,
Thomas



More information about the Python-Dev mailing list