2013-10-08 21:59:17 +00:00
|
|
|
import argparse
|
|
|
|
|
2013-10-11 17:09:40 +00:00
|
|
|
import teuthology.misc
|
2013-10-09 20:13:01 +00:00
|
|
|
import teuthology.schedule
|
|
|
|
|
|
|
|
|
|
|
|
def main():
|
|
|
|
teuthology.schedule.main(parse_args())
|
2013-10-08 21:59:17 +00:00
|
|
|
|
|
|
|
|
|
|
|
def parse_args():
|
|
|
|
parser = argparse.ArgumentParser(
|
|
|
|
description='Schedule ceph integration tests')
|
|
|
|
parser.add_argument(
|
|
|
|
'config',
|
|
|
|
metavar='CONFFILE',
|
|
|
|
nargs='*',
|
2013-10-11 17:09:40 +00:00
|
|
|
type=teuthology.misc.config_file,
|
|
|
|
action=teuthology.misc.MergeConfig,
|
2013-10-08 21:59:17 +00:00
|
|
|
default={},
|
|
|
|
help='config file to read',
|
|
|
|
)
|
|
|
|
parser.add_argument(
|
|
|
|
'--name',
|
|
|
|
help='name of suite run the job is part of',
|
|
|
|
)
|
|
|
|
parser.add_argument(
|
|
|
|
'--last-in-suite',
|
|
|
|
action='store_true',
|
|
|
|
default=False,
|
|
|
|
help='mark the last job in a suite so suite post-processing can be ' +
|
|
|
|
'run',
|
|
|
|
)
|
|
|
|
parser.add_argument(
|
|
|
|
'--email',
|
|
|
|
help='where to send the results of a suite (only applies to the ' +
|
|
|
|
'last job in a suite)',
|
|
|
|
)
|
|
|
|
parser.add_argument(
|
|
|
|
'--timeout',
|
|
|
|
help='how many seconds to wait for jobs to finish before emailing ' +
|
|
|
|
'results (only applies to the last job in a suite',
|
|
|
|
type=int,
|
|
|
|
)
|
|
|
|
parser.add_argument(
|
|
|
|
'--description',
|
|
|
|
help='job description',
|
|
|
|
)
|
|
|
|
parser.add_argument(
|
|
|
|
'--owner',
|
|
|
|
help='job owner',
|
|
|
|
)
|
|
|
|
parser.add_argument(
|
|
|
|
'-n', '--num',
|
|
|
|
default=1,
|
|
|
|
type=int,
|
|
|
|
help='number of times to run/queue the job'
|
|
|
|
)
|
|
|
|
parser.add_argument(
|
|
|
|
'-p', '--priority',
|
|
|
|
default=1000,
|
|
|
|
type=int,
|
|
|
|
help='beanstalk priority (lower is sooner)'
|
|
|
|
)
|
|
|
|
parser.add_argument(
|
|
|
|
'-v', '--verbose',
|
|
|
|
action='store_true',
|
|
|
|
default=False,
|
|
|
|
help='be more verbose',
|
|
|
|
)
|
|
|
|
parser.add_argument(
|
|
|
|
'-w', '--worker',
|
|
|
|
default='plana',
|
|
|
|
help='which worker to use (type of machine)',
|
|
|
|
)
|
|
|
|
|
2013-10-09 20:13:01 +00:00
|
|
|
args = parser.parse_args()
|
2013-10-08 21:59:17 +00:00
|
|
|
|
|
|
|
if not args.last_in_suite:
|
|
|
|
msg = '--email is only applicable to the last job in a suite'
|
|
|
|
assert not args.email, msg
|
|
|
|
msg = '--timeout is only applicable to the last job in a suite'
|
|
|
|
assert not args.timeout, msg
|
|
|
|
|
2013-10-09 20:13:01 +00:00
|
|
|
return args
|