blob: 6b788ec99d5b893f309fd64289ef18edefa8bc15 [file] [log] [blame]
# Copyright (c) 2011 The Chromium OS Authors. All rights reserved.
# Use of this source code is governed by a BSD-style license that can be
# found in the LICENSE file.
__author__ = ' (Eric Li)'
import optparse
import os
import sys
settings = "autotest_lib.frontend.settings"
os.environ["DJANGO_SETTINGS_MODULE"] = settings
import common
from autotest_lib.frontend.afe import models as afe_models
import base_poster
import job_poster
import build_poster
builds = {}
def post_job_and_build(url, job_id):
global builds
job = job_poster.load_job(job_id)
if job and job.owner == 'chromeos-test':
cros_build = builds.get((job.board,, None)
if not cros_build:
cros_build = build_poster.load_build(job.board,, 'http://goto/chromeos-images')
if cros_build:
poster = build_poster.BuildPoster(url, cros_build)
builds[(job.board,] = cros_build
poster = job_poster.JobPoster(url, job)
return -1
def main():
parser = optparse.OptionParser(usage='%prog [options]')
options, _ = parser.parse_args()
# 27000 ~ 29000
for afe_job in afe_models.Job.objects.filter(
import time
if __name__ == '__main__':