the original run, the resulting one will only
inherit the suite value. Any others must be
passed as normal while scheduling with this
- feature.
+ feature. For random tests involving facet whose
+ path ends with '$' operator, you might want to
+ use --seed argument to repeat them.
-R, --rerun-statuses <statuses>
A comma-separated list of statuses to be used
with --rerun. Supported statuses are: 'dead',
'fail', 'pass', 'queued', 'running', 'waiting'
[default: fail,dead]
+ --seed SEED An random number mostly useful when used along
+ with --rerun argument. This number can be found
+ in the output of teuthology-suite command.
""".format(
default_machine_type=config.default_machine_type,
import logging
import os
+import random
import time
import teuthology
return
conf.filter_in.extend(rerun_filters['descriptions'])
conf.suite = normalize_suite_name(rerun_filters['suite'])
+ if conf.seed is None:
+ conf.seed = random.randint(0, 9999)
+ log.info('Using random seed=%s', conf.seed)
run = Run(conf)
name = run.name
import logging
import os
+import random
from . import matrix
log = logging.getLogger(__name__)
-def build_matrix(path, subset=None):
+def build_matrix(path, subset=None, seed=None):
"""
Return a list of items descibed by path such that if the list of
items is chunked into mincyclicity pieces, each piece is still a
:param path: The path to search for yaml fragments
:param subset: (index, outof)
+ :param seed: The seed for repeatable random test
"""
if subset:
log.info(
'Subset=%s/%s' %
(str(subset[0]), str(subset[1]))
)
+ random.seed(seed)
mat, first, matlimit = _get_matrix(path, subset)
return generate_combinations(path, mat, first, matlimit)
log.debug('Suite %s in %s' % (suite_name, suite_path))
configs = [
(combine_path(suite_name, item[0]), item[1]) for item in
- build_matrix(suite_path, subset=self.args.subset)
+ build_matrix(suite_path, subset=self.args.subset, seed=self.args.seed)
]
log.info('Suite %s in %s generated %d jobs (not yet filtered)' % (
suite_name, suite_path, len(configs)))