def testDomUGrubConf(self): data = grub_installer.getGrubConf('TEST_IMAGE', dom0 = False, xen = True) self.failIf(not re.search('xvda', data), "wrong boot device for domU") self.failIf(not re.search('timeout=0', data), "timeout should be 0 on domU")
def testClockGrubConf(self): data = grub_installer.getGrubConf('TEST_IMAGE', clock = "clock=pit") self.failIf(not re.search('clock=pit', data), "clock setting did not appear")
def testDom0GrubConf(self): data = grub_installer.getGrubConf('TEST_IMAGE', dom0 = True, xen = True) self.failIf(not re.search('kernel /boot/xen.gz', data), "wrong kernel command line for dom0") self.failIf(not re.search('module /boot/initrd', data), "bad initrd string for dom0")
def testBasicGrubConf(self): data = grub_installer.getGrubConf('TEST_IMAGE') self.failIf(not re.search('title TEST_IMAGE \(template\)', data), "title string didn't show up in grub") self.failIf(not re.search('initrd /boot/initrd', data), "bad initrd string for non-dom0")