Mercurial > ~astiob > upreckon > hgweb
comparison config.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 | ee8a99dcaaed |
children | 37c4ad87583c |
comparison
equal
deleted
inserted
replaced
81:24752db487c5 | 82:06356af50bf9 |
---|---|
24 | 24 |
25 __all__ = 'load_problem', 'load_global', 'globalconf' | 25 __all__ = 'load_problem', 'load_global', 'globalconf' |
26 | 26 |
27 defaults_problem = {'kind': 'batch', | 27 defaults_problem = {'kind': 'batch', |
28 'usegroups': False, | 28 'usegroups': False, |
29 'maxtime': None, | 29 'maxcputime': None, |
30 'maxwalltime': None, | |
30 'maxmemory': None, | 31 'maxmemory': None, |
31 'dummies': {}, | 32 'dummies': {}, |
32 'testsexcluded': (), | 33 'testsexcluded': (), |
33 'padtests': 0, | 34 'padtests': 0, |
34 'paddummies': 0, | 35 'paddummies': 0, |
153 newmap[k] = oldmap[key] | 154 newmap[k] = oldmap[key] |
154 except TypeError: | 155 except TypeError: |
155 newmap[key] = oldmap[key] | 156 newmap[key] = oldmap[key] |
156 setattr(module, name, newmap) | 157 setattr(module, name, newmap) |
157 if options.no_maxtime: | 158 if options.no_maxtime: |
158 module.maxtime = 0 | 159 module.maxcputime = module.maxwalltime = 0 |
159 sys.dont_write_bytecode = dwb | 160 sys.dont_write_bytecode = dwb |
160 for name in patterns: | 161 for name in patterns: |
161 if hasattr(module, name): | 162 if hasattr(module, name): |
162 setattr(module, name, getattr(module, name).replace('%', problem_name)) | 163 setattr(module, name, getattr(module, name).replace('%', problem_name)) |
163 return module | 164 return module |