Lines Matching refs:self
23 def __init__(self, *args, **kwargs): argument
24 super(HalTest, self).__init__(*args, **kwargs)
25 self.bootctl = bootctl.Bootctl(self.device)
27 def test_slots(self): argument
30 self.device.root()
31 self.device.wait()
32 num_slots = self.bootctl.get_number_slots()
35 suffix = self.bootctl.get_suffix(slot)
36 self.assertNotEqual(suffix, "(null)")
38 self.assertEqual(len(suffixes), num_slots)
40 def test_mark_successful(self): argument
47 self.device.root()
48 self.device.wait()
49 slot = self.bootctl.get_current_slot()
50 self.assertTrue(self.bootctl.set_active_boot_slot(slot))
51 self.assertFalse(self.bootctl.is_slot_marked_successful(slot))
52 self.assertTrue(self.bootctl.mark_boot_successful())
53 self.assertTrue(self.bootctl.is_slot_marked_successful(slot))
54 self.device.reboot()
55 self.device.wait()
56 self.device.root()
57 self.device.wait()
58 self.assertTrue(self.bootctl.is_slot_marked_successful(slot))
60 def test_switch_slots(self): argument
67 num_slots = self.bootctl.get_number_slots()
69 self.device.root()
70 self.device.wait()
71 slot = self.bootctl.get_current_slot()
73 self.assertTrue(self.bootctl.set_active_boot_slot(new_slot))
74 slot2 = self.bootctl.get_current_slot()
75 self.assertEqual(slot, slot2)
76 self.device.reboot()
77 self.device.wait()
78 self.device.root()
79 self.device.wait()
80 self.assertEqual(new_slot, self.bootctl.get_current_slot())
82 def test_unbootable(self): argument
89 num_slots = self.bootctl.get_number_slots()
91 self.device.root()
92 self.device.wait()
93 slot = self.bootctl.get_current_slot()
95 self.device.root()
96 self.device.wait()
97 self.assertTrue(self.bootctl.set_active_boot_slot(new_slot))
98 self.assertTrue(self.bootctl.is_slot_bootable(new_slot))
99 self.assertTrue(self.bootctl.set_slot_as_unbootable_slot(new_slot))
100 self.assertFalse(self.bootctl.is_slot_bootable(new_slot))
101 self.device.reboot()
102 self.device.wait()
103 self.device.root()
104 self.device.wait()
105 self.assertEqual(slot, self.bootctl.get_current_slot())
106 self.assertFalse(self.bootctl.is_slot_bootable(new_slot))
107 self.assertTrue(self.bootctl.set_active_boot_slot(new_slot))
108 self.assertTrue(self.bootctl.is_slot_bootable(new_slot))
109 self.device.reboot()
110 self.device.wait()
111 self.device.root()
112 self.device.wait()
113 self.assertEqual(new_slot, self.bootctl.get_current_slot());