~nskaggs/juju-ci-tools/add-assess-terms

« back to all changes in this revision

Viewing changes to schedule_reliability_tests.py

  • Committer: Aaron Bentley
  • Date: 2015-02-24 15:54:24 UTC
  • mto: This revision was merged to the branch mainline in revision 873.
  • Revision ID: aaron.bentley@canonical.com-20150224155424-o5fdsuvm28g3df66
Accept multiple --suite options.

Show diffs side-by-side

added added

removed removed

Lines of Context:
22
22
    parser = ArgumentParser()
23
23
    parser.add_argument(
24
24
        'root_dir', help='Directory containing releases and candidates dir')
25
 
    parser.add_argument('--suite', help='Test suite to run', default=FULL,
26
 
                        choices=suites.keys())
 
25
    parser.add_argument('--suite', help='Test suite to run', default=[],
 
26
                        choices=suites.keys(), action='append')
27
27
    parser.add_argument('jobs', nargs='*', metavar='job',
28
28
                        help='Jobs to schedule builds for.')
29
29
    add_credential_args(parser)
35
35
 
36
36
 
37
37
def build_job(credentials, root, job_name, candidates, suite):
38
 
    parameters = {'suite': suite, 'attempts': '10'}
 
38
    parameters = {'suite': ','.join(suite), 'attempts': '10'}
39
39
    jenkins = Jenkins('http://localhost:8080', credentials.user,
40
40
                      credentials.password)
41
41
    for candidate in candidates:
47
47
 
48
48
def main():
49
49
    args, credentials = parse_args()
 
50
    suite = args.suite
 
51
    if suite == []:
 
52
        suite = [FULL]
50
53
    candidates = list(find_candidates(args.root_dir))
51
54
    jobs = args.jobs
52
55
    if jobs is None:
53
56
        jobs = ['industrial-test', 'industrial-test-aws',
54
57
                'industrial-test-joyent']
55
58
    for job in jobs:
56
 
        build_job(credentials, args.root_dir, job, candidates, args.suite)
 
59
        build_job(credentials, args.root_dir, job, candidates, suite)
57
60
 
58
61
 
59
62
if __name__ == '__main__':