X-Git-Url: http://www.chiark.greenend.org.uk/ucgi/~ianmdlvl/git?a=blobdiff_plain;f=runner%2Fadt-run;h=7787e5761971fb566993e8e87bd40058ed5d01b4;hb=aa43f2a81adb120c1da99919c5b3523ea952d170;hp=e5a2c97ab861f9f515a24d5ffbb0f310c962d9be;hpb=ecf92957659e36c22064f74994e3a54d83e34a9b;p=autopkgtest.git diff --git a/runner/adt-run b/runner/adt-run index e5a2c97..7787e57 100755 --- a/runner/adt-run +++ b/runner/adt-run @@ -45,7 +45,7 @@ signal.signal(signal.SIGINT, signal.SIG_DFL) # undo stupid Python SIGINT thing tmpdir = None # pathstring on host testbed = None # Testbed errorcode = 0 # exit status that we are going to use -timeouts = { 'short':10, 'install':900, 'test':600, 'build':3000 } +timeouts = { 'short':100, 'install':3000, 'test':10000, 'build':100000 } binaries = None # Binaries (.debs we have registered) build_essential = ["build-essential"] @@ -408,7 +408,7 @@ class Action: return "" % (a.kind, a.what, `a.af`) def parse_args(): - global opts + global opts, timeouts global n_non_actions # argh, stupid python scoping rules usage = "%prog --- ..." parser = OptionParser(usage=usage) @@ -558,6 +558,13 @@ def parse_args(): help='write a summary report to SUMMARY,' ' emptying it beforehand') + for k in timeouts.keys(): + pa('','--timeout-'+k, type='int', dest='timeout_'+k, + metavar='T', help='set %s timeout to T') + pa('','--timeout-factor', type='float', dest='timeout_factor', + metavar='FACTOR', default=1.0, + help='multiply all default timeouts by FACTOR') + pa('','--user', type='string', dest='user', help='run tests as USER (needs root on testbed)') pa('','--gain-root', type='string', dest='gainroot', @@ -594,6 +601,11 @@ def parse_args(): if n_non_actions >= len(parser.largs): parser.error('nothing to do specified') + for k in timeouts.keys(): + t = getattr(opts,'timeout_'+k) + if t is None: t = timeouts[k] * opts.timeout_factor + timeouts[k] = int(t) + arghandling = initial_arghandling opts.actions = [] ix = 0 @@ -654,7 +666,7 @@ def setup_trace(): if opts.summary is not None: summary_stream = open(opts.summary, 'w', 0) - debug('options: '+`opts`, 1) + debug('options: '+`opts`+'; timeouts: '+`timeouts`, 1) def finalise_options(): global opts, tb, build_essential @@ -1303,6 +1315,7 @@ END def apt_configs(b): return { "Dir::Etc::sourcelist": b.dir.read(True)+'sources.list', + "Debug::pkgProblemResolver": "true", } def apt_pkg_gdebi_script(b, arg, middle):