예제 #1
0
 def test_ignore_older_revision_build(self):
     with temp_dir() as root:
         path_1234 = make_candidate_dir(root, '1234-artifacts', 'mybranch',
                                        '1234')
         make_candidate_dir(root, '1233', 'mybranch', '1233')
         self.assertEqual(find_latest_branch_candidates(root),
                          [(path_1234, 1234)])
예제 #2
0
파일: test_utility.py 프로젝트: mjs/juju
 def test_ignore_older_revision_build(self):
     with temp_dir() as root:
         path_1234 = make_candidate_dir(
             root, '1234-artifacts', 'mybranch', '1234')
         make_candidate_dir(root, '1233', 'mybranch', '1233')
         self.assertEqual(find_latest_branch_candidates(root), [
             (path_1234, 1234)])
예제 #3
0
 def test_include_older_revision_build_different_branch(self):
     with temp_dir() as root:
         path_1234 = make_candidate_dir(root, '1234-artifacts',
                                        'branch_foo', '1234')
         path_1233 = make_candidate_dir(root, '1233-artifacts',
                                        'branch_bar', '1233')
         self.assertItemsEqual(find_latest_branch_candidates(root),
                               [(path_1233, 1233), (path_1234, 1234)])
예제 #4
0
파일: test_utility.py 프로젝트: mjs/juju
 def test_include_older_revision_build_different_branch(self):
     with temp_dir() as root:
         path_1234 = make_candidate_dir(
             root, '1234-artifacts', 'branch_foo', '1234')
         path_1233 = make_candidate_dir(
             root, '1233-artifacts', 'branch_bar', '1233')
         self.assertItemsEqual(
             find_latest_branch_candidates(root), [
                 (path_1233, 1233), (path_1234, 1234)])
def main(argv=None):
    args, credentials = parse_args(argv)
    suite = args.suite
    if suite == []:
        suite = [FULL]
    candidates = find_latest_branch_candidates(args.root_dir)[:3]
    jobs = args.jobs
    if jobs is None:
        jobs = ['industrial-test', 'industrial-test-aws',
                'industrial-test-joyent']
    for job in jobs:
        build_job(credentials, args.root_dir, job, candidates, suite)
예제 #6
0
 def test_find_latest_branch_candidates_old_buildvars(self):
     with temp_dir() as root:
         a_week_ago = time() - timedelta(days=7, seconds=1).total_seconds()
         make_candidate_dir(root, 'master-artifacts', modified=a_week_ago)
         self.assertEqual(find_latest_branch_candidates(root), [])
예제 #7
0
 def test_find_latest_branch_candidates(self):
     with temp_dir() as root:
         master_path = make_candidate_dir(root, 'master-artifacts')
         self.assertEqual(find_latest_branch_candidates(root),
                          [(master_path, 1234)])
예제 #8
0
파일: test_utility.py 프로젝트: mjs/juju
 def test_find_latest_branch_candidates_old_buildvars(self):
     with temp_dir() as root:
         a_week_ago = time() - timedelta(days=7, seconds=1).total_seconds()
         make_candidate_dir(root, 'master-artifacts', modified=a_week_ago)
         self.assertEqual(find_latest_branch_candidates(root), [])
예제 #9
0
파일: test_utility.py 프로젝트: mjs/juju
 def test_find_latest_branch_candidates(self):
     with temp_dir() as root:
         master_path = make_candidate_dir(root, 'master-artifacts')
         self.assertEqual(find_latest_branch_candidates(root),
                          [(master_path, 1234)])