use build timeout (wall clock time, default: 2h)
authorkrauss
Wed Dec 19 16:41:55 2012 +0100 (2012-12-19)
changeset 50599e129fcc720c1
parent 50598 b4d62535f5cd
child 50600 48c0c3bc40dd
child 50603 3e3c2af5e8a5
use build timeout (wall clock time, default: 2h)
Admin/mira.py
     1.1 --- a/Admin/mira.py	Wed Dec 19 16:18:46 2012 +0100
     1.2 +++ b/Admin/mira.py	Wed Dec 19 16:41:55 2012 +0100
     1.3 @@ -17,6 +17,9 @@
     1.4  
     1.5  # build and evaluation tools
     1.6  
     1.7 +DEFAULT_TIMEOUT = 2 * 60 * 60
     1.8 +SMLNJ_TIMEOUT = 72 * 60 * 60
     1.9 +
    1.10  def prepare_isabelle_repository(loc_isabelle, loc_dependency_heaps, more_settings=''):
    1.11  
    1.12      # patch settings
    1.13 @@ -91,8 +94,9 @@
    1.14  
    1.15  def isabelle_build(env, case, paths, dep_paths, playground, *cmdargs, **kwargs):
    1.16  
    1.17 -    more_settings=kwargs.get('more_settings', '')
    1.18 -    keep_results=kwargs.get('keep_results', True)
    1.19 +    more_settings = kwargs.get('more_settings', '')
    1.20 +    keep_results = kwargs.get('keep_results', True)
    1.21 +    timeout = kwargs.get('timeout', DEFAULT_TIMEOUT)
    1.22  
    1.23      isabelle_home = paths[0]
    1.24  
    1.25 @@ -118,8 +122,10 @@
    1.26      prepare_isabelle_repository(isabelle_home, None, more_settings=more_settings)
    1.27      os.chdir(isabelle_home)
    1.28  
    1.29 +    args = (['-o', 'timeout=%s' % timeout] if timeout is not None else []) + cmdargs
    1.30 +
    1.31      # invoke build tool
    1.32 -    (return_code, log) = env.run_process('%s/bin/isabelle' % isabelle_home, 'build', '-s', '-v', *cmdargs)
    1.33 +    (return_code, log) = env.run_process('%s/bin/isabelle' % isabelle_home, 'build', '-s', '-v', *args)
    1.34  
    1.35      # collect report
    1.36      return (return_code == 0, extract_isabelle_run_summary(log),
    1.37 @@ -326,11 +332,11 @@
    1.38  @configuration(repos = [Isabelle], deps = [(Pure, [0])])
    1.39  def SML_HOL(*args):
    1.40      """HOL image built with SML/NJ"""
    1.41 -    return isabelle_build(*(args + ("-b", "HOL")), more_settings=smlnj_settings)
    1.42 +    return isabelle_build(*(args + ("-b", "HOL")), more_settings=smlnj_settings, timeout=SMLNJ_TIMEOUT)
    1.43  
    1.44  @configuration(repos = [Isabelle], deps = [])
    1.45  def SML_makeall(*args):
    1.46      """SML/NJ build of all possible sessions"""
    1.47 -    return isabelle_build(*(args + ("-j", "3", "-a")), more_settings=smlnj_settings)
    1.48 +    return isabelle_build(*(args + ("-j", "3", "-a")), more_settings=smlnj_settings, timeout=SMLNJ_TIMEOUT)
    1.49  
    1.50