diff problem.py @ 82:06356af50bf9

Finished testcases reorganization and CPU time limit implementation We now have: * Win32-specific code in the win32 module (including bug fixes), * UNIX-specific and generic code in the unix module, * a much cleaner testcases module, * wait4-based resource limits working on Python 3 (this is a bug fix), * no warning/error reported on non-Win32 when -x is not passed but standard input does not come from a terminal, * the maxtime configuration variable replaced with two new variables named maxcputime and maxwalltime, * CPU time reported if it can be determined unless an error occurs sooner than it is determined (e. g. if the wall-clock time limit is exceeded), * memory limits enforced even if Upreckon's forking already breaks them, * CPU time limits and private virtual memory limits honoured on Win32, * CPU time limits honoured on UNIX(-like) platforms supporting wait4 or getrusage, * address space limits honoured on UNIX(-like) platforms supporting setrlimit with RLIMIT_AS/RLIMIT_VMEM, * resident set size limits honoured on UNIX(-like) platforms supporting wait4.
author Oleg Oshmyan <chortos@inbox.lv>
date Wed, 23 Feb 2011 23:35:27 +0000
parents 69eadc60f4e2
children 37c4ad87583c
line wrap: on
line diff
--- a/problem.py	Wed Feb 16 15:30:57 2011 +0000
+++ b/problem.py	Wed Feb 23 23:35:27 2011 +0000
@@ -141,8 +141,10 @@
 					granted = case(lambda: (say('%7.3f%s s, ' % (case.time_stopped - case.time_started, case.time_limit_string), end=''), sys.stdout.flush()))
 				except testcases.CanceledByUser:
 					verdict = 'canceled by the user'
-				except testcases.TimeLimitExceeded:
-					verdict = 'time limit exceeded'
+				except testcases.WallTimeLimitExceeded:
+					verdict = 'wall-clock time limit exceeded'
+				except testcases.CPUTimeLimitExceeded:
+					verdict = 'CPU time limit exceeded'
 				except testcases.MemoryLimitExceeded:
 					verdict = 'memory limit exceeded'
 				except testcases.WrongAnswer: