log.debug('Config is: %s', job.body)
job_config = yaml.safe_load(job.body)
safe_archive = safepath.munge(job_config['name'])
+ teuthology_branch=job_config.get('config').get('teuthology_branch', 'master')
+ teuth_path = os.path.join(os.getenv("HOME"), 'teuthology-' + teuthology_branch, 'virtualenv', 'bin')
+ if not os.path.isdir(teuth_path):
+ raise Exception('Teuthology branch ' + teuthology_branch + ' not found at ' + teuth_path)
if job_config.get('last_in_suite', False):
log.debug('Generating coverage for %s', job_config['name'])
args = [
- os.path.join(os.path.dirname(sys.argv[0]), 'teuthology-results'),
+ os.path.join(teuth_path, 'teuthology-results'),
'--timeout',
str(job_config.get('results_timeout', 21600)),
'--email',
safepath.makedirs(ctx.archive_dir, safe_archive)
archive_path = os.path.join(ctx.archive_dir, safe_archive, str(job.jid))
log.info('Running job %d', job.jid)
- run_job(job_config, archive_path)
+ run_job(job_config, archive_path, teuth_path)
job.delete()
-def run_job(job_config, archive_path):
+def run_job(job_config, archive_path, teuth_path):
arg = [
- os.path.join(os.path.dirname(sys.argv[0]), 'teuthology'),
+ os.path.join(teuth_path, 'teuthology'),
]
if job_config['verbose']:
help='be more verbose',
)
parser.add_argument(
- '-b', '--branch',
- default='master',
- help='which branch of teuthology to use',
+ '-w', '--worker',
+ default='plana',
+ help='which worker to use (type of machine)',
)
parser.add_argument(
'-s', '--show',
import teuthology.queue
beanstalk = teuthology.queue.connect(ctx)
- tube = 'teuthology'
- if ctx.branch != 'master':
- tube += '-' + ctx.branch
+ tube=ctx.worker
beanstalk.use(tube)
if ctx.show:
help='number of times to run/queue each job'
)
parser.add_argument(
- '-b', '--branch',
- default='master',
- help='which branch of teuthology to use',
+ '-w', '--worker',
+ default='plana',
+ help='which worker to use (type of machine)',
)
parser.add_argument(
'config',
os.path.join(os.path.dirname(sys.argv[0]), 'teuthology-schedule'),
'--name', args.name,
'--num', str(args.num),
- '--branch', args.branch,
+ '--worker', args.worker,
]
if args.verbose:
base_arg.append('-v')