[Python-3000] buildbots

Thomas Heller theller at ctypes.org
Thu Aug 30 08:21:37 CEST 2007


Thomas Heller schrieb:
> 
> I suggest to apply this patch, which sets an environment variable in the
> Tools\buildbot\test.bat script, detects the Windows debug build, and calls
> SetErrorMode(7) as David suggested:

If noone objects, I would like to apply this patch first, see if it avoids
the test_os.py test hanging, and afterwards fix the test_os test.

Thomas

> 
> Index: Lib/test/regrtest.py
> ===================================================================
> --- Lib/test/regrtest.py	(revision 57666)
> +++ Lib/test/regrtest.py	(working copy)
> @@ -208,6 +208,15 @@
>      flags on the command line.
>      """
>  
> +    if sys.platform == "win32":
> +        if "_d.pyd" in [s[0] for s in imp.get_suffixes()]:
> +            # running is a debug build.
> +            if os.environ.get("PYTEST_NONINTERACTIVE", ""):
> +                # If the PYTEST_NONINTERACTIVE environment variable is
> +                # set, we do not want any message boxes.
> +                import ctypes
> +                ctypes.windll.kernel32.SetErrorMode(7)
> +
>      test_support.record_original_stdout(sys.stdout)
>      try:
>          opts, args = getopt.getopt(sys.argv[1:], 'dhvgqxsS:rf:lu:t:TD:NLR:wM:',
> Index: Tools/buildbot/test.bat
> ===================================================================
> --- Tools/buildbot/test.bat	(revision 57666)
> +++ Tools/buildbot/test.bat	(working copy)
> @@ -1,3 +1,4 @@
>  @rem Used by the buildbot "test" step.
>  cd PCbuild
> +set PYTEST_NONINTERACTIVE=1
>  call rt.bat -d -q -uall -rw
> 



More information about the Python-3000 mailing list