From: Neal Norwitz Date: Thu, 13 Apr 2006 07:15:30 +0000 (+0000) Subject: Backport 45338: X-Git-Tag: v2.4.4c1~265 X-Git-Url: http://git.ipfire.org/cgi-bin/gitweb.cgi?a=commitdiff_plain;h=5319074f47d9ac0b08b4441151e512e5a0cb9d0d;p=thirdparty%2FPython%2Fcpython.git Backport 45338: test_compile can be really long if we are using -u compiler. This may be causing the debian sparc buildbot to fail. Print a little message to let the user ^w buildbot know it's still thinking. We may want to adjust the time period which is currently 5 minutes. --- diff --git a/Lib/test/test_compiler.py b/Lib/test/test_compiler.py index 9976a47cf381..13b656034a10 100644 --- a/Lib/test/test_compiler.py +++ b/Lib/test/test_compiler.py @@ -1,9 +1,11 @@ import compiler -import os +import os, sys, time, unittest import test.test_support -import unittest from random import random +# How much time in seconds can pass before we print a 'Still working' message. +_PRINT_WORKING_MSG_INTERVAL = 5 * 60 + class CompilerTest(unittest.TestCase): def testCompileLibrary(self): @@ -12,11 +14,18 @@ class CompilerTest(unittest.TestCase): # that any of the code is correct, merely the compiler is able # to generate some kind of code for it. + next_time = time.time() + _PRINT_WORKING_MSG_INTERVAL libdir = os.path.dirname(unittest.__file__) testdir = os.path.dirname(test.test_support.__file__) for dir in [libdir, testdir]: for basename in os.listdir(dir): + # Print still working message since this test can be really slow + if next_time <= time.time(): + next_time = time.time() + _PRINT_WORKING_MSG_INTERVAL + print >>sys.__stdout__, \ + ' testCompileLibrary still working, be patient...' + if not basename.endswith(".py"): continue if not TEST_ALL and random() < 0.98: