myjob.complete(1) else: sys.exit(1) except Exception, e: # NOTE: job._run_step_fn and job.step_engine will turn things into # a JobError for us. If we get here, its likely an autotest bug. msg = str(e) + '\n' + traceback.format_exc() logging.critical("JOB ERROR (autotest bug?): " + msg) if myjob: myjob._decrement_group_level() myjob.record('END ABORT', None, None, msg) assert(myjob.group_level == 0) myjob.complete(1) else: sys.exit(1) # If we get here, then we assume the job is complete and good. myjob._decrement_group_level() myjob.record('END GOOD', None, None) assert(myjob.group_level == 0) myjob.complete(0) site_job = utils.import_site_class( __file__, "autotest_lib.client.bin.site_job", "site_job", base_job) class job(site_job): pass
def map_drive_name(self, part_name): return part_name def check_mount_point(self, part_name, mount_point): """ @param part_name: A partition name such as 'sda3' or similar. @param mount_point: A mount point such as '/usr/local' or an empty string if no mount point is known. @returns The expected mount point for part_name or a false value (None or '') if the client should not mount this partition. """ return mount_point def use_partition(self, part_name): """ @param part_name: A partition name such as 'sda3' or similar. @returns bool, should we use this partition for testing? """ return True SiteFsdevManager = utils.import_site_class( __file__, "autotest_lib.client.bin.site_fsdev", "SiteFsdevManager", BaseFsdevManager ) # Wrap whatever SiteFsdevManager class we've found above in a class class FsdevManager(SiteFsdevManager): pass
myjob.complete(1) else: sys.exit(1) except Exception, e: # NOTE: job._run_step_fn and job.step_engine will turn things into # a JobError for us. If we get here, its likely an autotest bug. msg = str(e) + '\n' + traceback.format_exc() logging.critical("JOB ERROR (autotest bug?): " + msg) if myjob: myjob.record('END ABORT', None, None, msg) assert myjob._record_indent == 0 myjob.complete(1) else: sys.exit(1) # If we get here, then we assume the job is complete and good. myjob.record('END GOOD', None, None) assert myjob._record_indent == 0 myjob.complete(0) site_job = utils.import_site_class(__file__, "autotest_lib.client.bin.site_job", "site_job", base_client_job) class job(site_job): pass
return part_name def check_mount_point(self, part_name, mount_point): """ @param part_name: A partition name such as 'sda3' or similar. @param mount_point: A mount point such as '/usr/local' or an empty string if no mount point is known. @returns The expected mount point for part_name or a false value (None or '') if the client should not mount this partition. """ return mount_point def use_partition(self, part_name): """ @param part_name: A partition name such as 'sda3' or similar. @returns bool, should we use this partition for testing? """ return True SiteFsdevManager = utils.import_site_class( __file__, "autotest_lib.client.bin.site_fsdev", "SiteFsdevManager", BaseFsdevManager) # Wrap whatever SiteFsdevManager class we've found above in a class class FsdevManager(SiteFsdevManager): pass