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

Side by Side Diff: client/bin/job.py

Issue 4823005: Merge remote branch 'cros/upstream' into tempbranch (Closed) Base URL: http://git.chromium.org/git/autotest.git@master
Patch Set: patch Created 10 years, 1 month 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
« no previous file with comments | « client/bin/cpuset.py ('k') | client/bin/kernel.py » ('j') | no next file with comments »
Toggle Intra-line Diffs ('i') | Expand Comments ('e') | Collapse Comments ('c') | Show Comments Hide Comments ('s')
OLDNEW
1 """The main job wrapper 1 """The main job wrapper
2 2
3 This is the core infrastructure. 3 This is the core infrastructure.
4 4
5 Copyright Andy Whitcroft, Martin J. Bligh 2006 5 Copyright Andy Whitcroft, Martin J. Bligh 2006
6 """ 6 """
7 7
8 import copy, os, platform, re, shutil, sys, time, traceback, types, glob 8 import copy, os, platform, re, shutil, sys, time, traceback, types, glob
9 import logging, getpass, errno, weakref 9 import logging, getpass, errno, weakref
10 import cPickle as pickle 10 import cPickle as pickle
(...skipping 645 matching lines...) Expand 10 before | Expand all | Expand 10 after
656 @param subdir: The subdir to use in the job.record call. 656 @param subdir: The subdir to use in the job.record call.
657 @param running_id: An optional running_id to include in the reboot 657 @param running_id: An optional running_id to include in the reboot
658 failure log message 658 failure log message
659 659
660 @raise JobError: Raised if the current configuration does not match the 660 @raise JobError: Raised if the current configuration does not match the
661 pre-reboot configuration. 661 pre-reboot configuration.
662 """ 662 """
663 # check to see if any partitions have changed 663 # check to see if any partitions have changed
664 partition_list = partition_lib.get_partition_list(self, 664 partition_list = partition_lib.get_partition_list(self,
665 exclude_swap=False) 665 exclude_swap=False)
666 mount_info = set((p.device, p.get_mountpoint()) for p in partition_list) 666 mount_info = partition_lib.get_mount_info(partition_list)
667
667 old_mount_info = self._state.get('client', 'mount_info') 668 old_mount_info = self._state.get('client', 'mount_info')
668 if mount_info != old_mount_info: 669 if mount_info != old_mount_info:
669 new_entries = mount_info - old_mount_info 670 new_entries = mount_info - old_mount_info
670 old_entries = old_mount_info - mount_info 671 old_entries = old_mount_info - mount_info
671 description = ("mounted partitions are different after reboot " 672 description = ("mounted partitions are different after reboot "
672 "(old entries: %s, new entries: %s)" % 673 "(old entries: %s, new entries: %s)" %
673 (old_entries, new_entries)) 674 (old_entries, new_entries))
674 self._record_reboot_failure(subdir, "reboot.verify_config", 675 self._record_reboot_failure(subdir, "reboot.verify_config",
675 description, running_id=running_id) 676 description, running_id=running_id)
676 raise error.JobError("Reboot failed: %s" % description) 677 raise error.JobError("Reboot failed: %s" % description)
(...skipping 98 matching lines...) Expand 10 before | Expand all | Expand 10 after
775 776
776 777
777 def disable_external_logging(self): 778 def disable_external_logging(self):
778 pass 779 pass
779 780
780 781
781 def reboot_setup(self): 782 def reboot_setup(self):
782 # save the partition list and mount points, as well as the cpu count 783 # save the partition list and mount points, as well as the cpu count
783 partition_list = partition_lib.get_partition_list(self, 784 partition_list = partition_lib.get_partition_list(self,
784 exclude_swap=False) 785 exclude_swap=False)
785 mount_info = set((p.device, p.get_mountpoint()) for p in partition_list) 786 mount_info = partition_lib.get_mount_info(partition_list)
786 self._state.set('client', 'mount_info', mount_info) 787 self._state.set('client', 'mount_info', mount_info)
787 self._state.set('client', 'cpu_count', utils.count_cpus()) 788 self._state.set('client', 'cpu_count', utils.count_cpus())
788 789
789 790
790 def reboot(self, tag=LAST_BOOT_TAG): 791 def reboot(self, tag=LAST_BOOT_TAG):
791 if tag == LAST_BOOT_TAG: 792 if tag == LAST_BOOT_TAG:
792 tag = self.last_boot_tag 793 tag = self.last_boot_tag
793 else: 794 else:
794 self.last_boot_tag = tag 795 self.last_boot_tag = tag
795 796
(...skipping 414 matching lines...) Expand 10 before | Expand all | Expand 10 after
1210 assert myjob._record_indent == 0 1211 assert myjob._record_indent == 0
1211 1212
1212 myjob.complete(0) 1213 myjob.complete(0)
1213 1214
1214 1215
1215 site_job = utils.import_site_class( 1216 site_job = utils.import_site_class(
1216 __file__, "autotest_lib.client.bin.site_job", "site_job", base_client_job) 1217 __file__, "autotest_lib.client.bin.site_job", "site_job", base_client_job)
1217 1218
1218 class job(site_job): 1219 class job(site_job):
1219 pass 1220 pass
OLDNEW
« no previous file with comments | « client/bin/cpuset.py ('k') | client/bin/kernel.py » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698