If ident=False in the kernel.boot methods, we still need to add a
step to the job to finish up the reboot logging. So I changed
kernel_check_ident to end_reboot_and_verify, and added a basic
end_reboot method that just does the reboot end logging without
doing a reboot.verify check.
Risk: Medium
Visibility: ident=False should now work
Signed-off-by: John Admanski <jadmanski@google.com>
git-svn-id: http://test.kernel.org/svn/autotest/trunk@2196 592f7852-d20e-0410-864c-8624ca9c26a4
diff --git a/client/bin/kernel.py b/client/bin/kernel.py
index 77f4ddc..cc1cc05 100755
--- a/client/bin/kernel.py
+++ b/client/bin/kernel.py
@@ -482,19 +482,22 @@
return release + '::' + version
- def boot(self, args='', ident=1):
+ def boot(self, args='', ident=True):
""" install and boot this kernel, do not care how
just make it happen.
"""
# If we can check the kernel identity do so.
+ expected_ident = self.get_kernel_build_ident()
if ident:
when = int(time.time())
- ident = self.get_kernel_build_ident()
args += " IDENT=%d" % (when)
-
- self.job.next_step_prepend(["job.kernel_check_ident", when, ident,
- self.subdir, self.applied_patches])
+ self.job.next_step_prepend(["job.end_reboot_and_verify", when,
+ expected_ident, self.subdir,
+ self.applied_patches])
+ else:
+ self.job.next_step_prepend(["job.end_reboot", self.subdir,
+ expected_ident, self.applied_patches])
# Check if the kernel has been installed, if not install
# as the default tag and boot that.
@@ -683,7 +686,7 @@
args = args, root = root)
- def boot(self, args='', ident=1):
+ def boot(self, args='', ident=True):
""" install and boot this kernel
"""
@@ -693,15 +696,17 @@
self.install()
# If we can check the kernel identity do so.
+ expected_ident = '-'.join([self.version,
+ self.rpm_name.split('-')[1],
+ self.release])
if ident:
when = int(time.time())
- ident = '-'.join([self.version,
- self.rpm_name.split('-')[1],
- self.release])
args += " IDENT=%d" % (when)
-
- self.job.next_step_prepend(["job.kernel_check_ident",
- when, ident, None, 'rpm'])
+ self.job.next_step_prepend(["job.end_reboot_and_verify",
+ when, expected_ident, None, 'rpm'])
+ else:
+ self.job.next_step_prepend(["job.end_reboot", None,
+ expected_ident, []])
# Boot the selected tag.
self.add_to_bootloader(args=args, tag=self.installed_as)