| from autotest_lib.site_utils.graphite import stats | |
| def cleanup(machine): | |
| timer = None | |
| try: | |
| host = hosts.create_host(machine, initialize=False, auto_monitor=False) | |
| timer = stats.Timer('cleanup_time.%s' % host._get_board_from_afe()) | |
| timer.start() | |
| log_dir = os.path.join(job.resultdir, machine) | |
| os.makedirs(log_dir) | |
| host.get_file('/var/log/', log_dir, preserve_symlinks=True) | |
| host.cleanup() | |
| finally: | |
| if timer: | |
| timer.stop() | |
| job.parallel_simple(cleanup, machines, log=False) |