mtype=$7
template=$8
distro=$9
+limit=${10}
+
+if [ -z "$limit" ]
+then
+ limitline=''
+else
+ limitline="--limit $limit"
+fi
if [ -z "$kernel" ]; then
echo "usage: $0 <suite> <ceph branch> <kernel branch> [email] [flavor] [teuthology-branch] [machinetype] [template] [distro]"
--collections $suite \
--email $email \
--timeout 36000 \
+ $limitline \
--name $name \
--worker $tube
(os.path.join(args.base, collection), collection)
for collection in args.collections
]
-
+
+ count = 1
num_jobs = 0
for collection, collection_name in sorted(collections):
log.debug('Collection %s in %s' % (collection_name, collection))
arch = get_arch(args.config)
machine_type = get_machine_type(args.config)
for description, config in configs:
+ if args.limit > 0:
+ if count > args.limit:
+ log.info('Stopped after {limit} jobs due to --limit={limit}'.format(
+ limit=args.limit))
+
+ break
raw_yaml = '\n'.join([file(a, 'r').read() for a in config])
parsed_yaml = yaml.load(raw_yaml)
subprocess.check_call(
args=arg,
)
+ count += 1
if num_jobs:
arg = copy.deepcopy(base_arg)