Chromium Code Reviews
chromiumcodereview-hr@appspot.gserviceaccount.com (chromiumcodereview-hr) | Please choose your nickname with Settings | Help | Chromium Project | Gerrit Changes | Sign out
(140)

Side by Side Diff: scheduler/monitor_db.py

Issue 6181003: Add support for an --image flag to atest. (Closed) Base URL: ssh://git@gitrw.chromium.org:9222/autotest.git@master
Patch Set: More code review fixes. Created 9 years, 11 months ago
Use n/p to move between diff chunks; N/P to move between comments. Draft comments are only viewable by you.
Jump to:
View unified diff | Download patch | Annotate | Revision Log
OLDNEW
1 #!/usr/bin/python -u 1 #!/usr/bin/python -u
2 2
3 """ 3 """
4 Autotest scheduler 4 Autotest scheduler
5 """ 5 """
6 6
7 7
8 import common 8 import common
9 import datetime, errno, optparse, os, pwd, Queue, re, shutil, signal 9 import datetime, errno, optparse, os, pwd, Queue, re, shutil, signal
10 import smtplib, socket, stat, subprocess, sys, tempfile, time, traceback, urllib 10 import smtplib, socket, stat, subprocess, sys, tempfile, time, traceback, urllib
(...skipping 233 matching lines...) Expand 10 before | Expand all | Expand 10 after
244 object was supplied, this will be used to lookup the Job object. 244 object was supplied, this will be used to lookup the Job object.
245 """ 245 """
246 autoserv_argv = [_autoserv_path, '-p', 246 autoserv_argv = [_autoserv_path, '-p',
247 '-r', drone_manager.WORKING_DIRECTORY] 247 '-r', drone_manager.WORKING_DIRECTORY]
248 if machines: 248 if machines:
249 autoserv_argv += ['-m', machines] 249 autoserv_argv += ['-m', machines]
250 if job or queue_entry: 250 if job or queue_entry:
251 if not job: 251 if not job:
252 job = queue_entry.job 252 job = queue_entry.job
253 autoserv_argv += ['-u', job.owner, '-l', job.name] 253 autoserv_argv += ['-u', job.owner, '-l', job.name]
254 if job.is_image_update_job():
255 autoserv_argv += ['--image', job.update_image_path]
254 if verbose: 256 if verbose:
255 autoserv_argv.append('--verbose') 257 autoserv_argv.append('--verbose')
256 return autoserv_argv + extra_args 258 return autoserv_argv + extra_args
257 259
258 260
259 class SchedulerError(Exception): 261 class SchedulerError(Exception):
260 """Raised by HostScheduler when an inconsistent state occurs.""" 262 """Raised by HostScheduler when an inconsistent state occurs."""
261 263
262 264
263 class HostScheduler(metahost_scheduler.HostSchedulingUtility): 265 class HostScheduler(metahost_scheduler.HostSchedulingUtility):
(...skipping 2334 matching lines...) Expand 10 before | Expand all | Expand 10 after
2598 paired_process = self._paired_with_monitor().get_process() 2600 paired_process = self._paired_with_monitor().get_process()
2599 _drone_manager.write_lines_to_file( 2601 _drone_manager.write_lines_to_file(
2600 failed_file, ['Archiving failed with exit code %s' 2602 failed_file, ['Archiving failed with exit code %s'
2601 % self.monitor.exit_code()], 2603 % self.monitor.exit_code()],
2602 paired_with_process=paired_process) 2604 paired_with_process=paired_process)
2603 self._set_all_statuses(self._final_status()) 2605 self._set_all_statuses(self._final_status())
2604 2606
2605 2607
2606 if __name__ == '__main__': 2608 if __name__ == '__main__':
2607 main() 2609 main()
OLDNEW

Powered by Google App Engine
This is Rietveld 408576698