Esempio n. 1
0
    def testWindows(self, tec):
        guest = GenericGuest("Fake")
        guest.distro = self.windows
        guest.execguest = Mock(side_effect=self.allPass)

        self.assertRaises(xenrt.XRTError, guest.isGPUBeingUtilized,
                          self.gpuType)
Esempio n. 2
0
    def testEmptyGpuType(self, tec):
        guest = GenericGuest("Fake")
        guest.distro = self.ubuntu
        guest.execguest = Mock(side_effect=self.lspciGrepFail)

        self.assertFalse(guest.isGPUBeingUtilized(""))
Esempio n. 3
0
    def testInvalidLshwAlt(self, tec):
        guest = GenericGuest("Fake")
        guest.distro = self.ubuntu
        guest.execguest = Mock(side_effect=self.lshwFailAlt)

        self.assertFalse(guest.isGPUBeingUtilized(self.gpuType))
Esempio n. 4
0
    def testWindows(self, tec):
        guest = GenericGuest("Fake")
        guest.distro = self.windows
        guest.execguest = Mock(side_effect=self.allPass)

        self.assertRaises(xenrt.XRTError, guest.isGPUBeingUtilized, self.gpuType)
Esempio n. 5
0
    def testOEL(self, tec):
        guest = GenericGuest("Fake")
        guest.distro = self.oel
        guest.execguest = Mock(side_effect=self.allPass)

        self.assertTrue(guest.isGPUBeingUtilized(self.gpuType))
Esempio n. 6
0
    def testEmptyGpuType(self, tec):
        guest = GenericGuest("Fake")
        guest.distro = self.ubuntu
        guest.execguest = Mock(side_effect=self.lspciGrepFail)

        self.assertFalse(guest.isGPUBeingUtilized(""))
Esempio n. 7
0
    def testInvalidLshwAlt(self, tec):
        guest = GenericGuest("Fake")
        guest.distro = self.ubuntu
        guest.execguest = Mock(side_effect=self.lshwFailAlt)

        self.assertFalse(guest.isGPUBeingUtilized(self.gpuType))
Esempio n. 8
0
    def testOEL(self, tec):
        guest = GenericGuest("Fake")
        guest.distro = self.oel
        guest.execguest = Mock(side_effect=self.allPass)

        self.assertTrue(guest.isGPUBeingUtilized(self.gpuType))