STINNER Victor <victor.stin...@haypocalc.com> added the comment: > Since this buildbot is set up in an environment where it is > "running headless", that is to say the tests are run under > a username that is not logged in to the window server, we should > not be trying to run GUI tests there, in particular Tkinter tests.
If I run test_ttk_guionly in SSH, the process abort. gdb trace: ----------------------- ... kCGErrorRangeCheck : Window Server communications from outside of session allowed for root and console user only INIT_Processeses(), could not establish the default connection to the WindowServer. Program received signal SIGABRT, Aborted. 0x9003d66c in kill () (gdb) where #0 0x9003d66c in kill () #1 0x9010e8cf in raise () #2 0x9010d422 in abort () #3 0x917d7dad in RegisterProcess () #4 0x917d7b55 in INIT_Processes () #5 0x918080b6 in ProcessManagerLazyInitialization () #6 0x917d7aa6 in GetCurrentProcess () #7 0x92dd5ef9 in GetSystemUIMode () #8 0x92dd5e86 in IsMenuBarVisible () #9 0x92e2af35 in GetAvailableWindowPositioningBounds () #10 0x0b0a7a31 in TkMacOSXDisplayChanged () #11 0x0b0a7bee in TkpOpenDisplay () #12 0x0b02ace6 in CreateTopLevelWindow () #13 0x0b02b0dd in TkCreateMainWindow () #14 0x0b035115 in CreateFrame () #15 0x0b035544 in TkCreateFrame () #16 0x0b02c564 in Initialize () #17 0x010d2789 in Tcl_AppInit (interp=0x12c6010) at /Users/vstinner/cpython/Modules/tkappinit.c:106 #18 0x010cc000 in Tkapp_New (screenName=0x0, className=0x10d2e8c "Tk", interactive=0, wantobjects=0, wantTk=1, sync=0, use=0x0) at /Users/vstinner/cpython/Modules/_tkinter.c:724 #19 0x010d1dcd in Tkinter_Create (self=0x1275838, args=0x517038) at /Users/vstinner/cpython/Modules/_tkinter.c:2938 #20 0x00060241 in PyCFunction_Call (func=0x106c338, arg=0x517038, kw=0x0) at Objects/methodobject.c:81 #21 0x0008de54 in call_function (pp_stack=0xbffff164, oparg=0) at Python/ceval.c:3957 #22 0x00087f81 in PyEval_EvalFrameEx (f=0x1255d28, throwflag=0) at Python/ceval.c:2663 #23 0x0008bf7d in PyEval_EvalCodeEx (_co=0x7a7df8, globals=0x705428, locals=0x705428, args=0x0, argcount=0, kws=0x0, kwcount=0, defs=0x0, defcount=0, kwdefs=0x0, closure=0x0) at Python/ceval.c:3393 #24 0x00079362 in PyEval_EvalCode (co=0x7a7df8, globals=0x705428, locals=0x705428) at Python/ceval.c:767 #25 0x000e1a9f in run_mod (mod=0x18bdba0, filename=0x1caac8 "<string>", globals=0x705428, locals=0x705428, flags=0xbffffa34, arena=0x1101470) at Python/pythonrun.c:1793 #26 0x000e17a4 in PyRun_StringFlags (str=0x125f520 "import _tkinter; c=_tkinter.create(); print(\"a\")\n", start=257, globals=0x705428, locals=0x705428, flags=0xbffffa34) at Python/pythonrun.c:1727 #27 0x000dfe61 in PyRun_SimpleStringFlags (command=0x125f520 "import _tkinter; c=_tkinter.create(); print(\"a\")\n", flags=0xbffffa34) at Python/pythonrun.c:1300 #28 0x0000714c in run_command (command=0x11010e0, cf=0xbffffa34) at Modules/main.c:260 #29 0x00007f4a in Py_Main (argc=3, argv=0x514028) at Modules/main.c:634 #30 0x000024d3 in main (argc=3, argv=0xbffffb6c) at ./Modules/python.c:59 ----------------------- The best would be to fix _tkinter to catch Tk error, but I agree, in a first time we may just try to detect that we cannot create GUI objects. For example, test if the DISPLAY environment variable is present. "PPC Tiger 3.x": test_ttk_guionly crashs sometimes, the variable is not set. "AMD64 Leopard 3.x": test_tcl, test_tk, test_ttk_guionly and test_ttk_textonly are skipped; the variable is set (e.g. DISPLAY=/tmp/launch-lDC93s/:0). "AMD64 Snow Leopard 2 3.x": test_ttk_guionly pass, DISPLAY var is set (e.g. DISPLAY=/tmp/launch-cuyZPv/org.x:0). Attached requires_tkinter.patch file adds the check for test_tk and test_ttk_guionly. ---------- _______________________________________ Python tracker <rep...@bugs.python.org> <http://bugs.python.org/issue8716> _______________________________________ _______________________________________________ Python-bugs-list mailing list Unsubscribe: http://mail.python.org/mailman/options/python-bugs-list/archive%40mail-archive.com