コード例 #1
0
	def test_00314_allocate_all_GPUs_with_server_and_virtual_server(self):
		allGPUs = getResources(vsapi.GPU())
		self.assertTrue(len(allGPUs)>0)
		resList = []
		for gpu in allGPUs:
			resList.append([gpu, vsapi.Server(), vsapi.Server(serverType=vsapi.VIRTUAL_SERVER)])
		self.allocObj = doAllocate(resList)
コード例 #2
0
	def test_00313_allocate_all_GPUs_with_server(self):
		allGPUs = getResources(vsapi.GPU())
		self.assertTrue(len(allGPUs)>0)
		resList = []
		for gpu in allGPUs:
			resList.append([ gpu, vsapi.Server() ])
		self.allocObj = doAllocate(resList)
コード例 #3
0
 def test_success_00001_1_gpu_1scanout(self):
     srv = vsapi.Server(0)
     scr = vsapi.Screen(0)
     gpu = vsapi.GPU(2)  # Quadro NVS 420
     gpu.setScanout(3, 'HP LP2065')  # Configure scanout 3
     scr.setGPU(gpu)
     srv.addScreen(scr)
     self.genValidConfigFile(srv)
コード例 #4
0
 def test_success_00000_1_gpu_vfb(self):
     srv = vsapi.Server(0)
     scr = vsapi.Screen(0)
     gpu = vsapi.GPU(0)
     scr.setFBProperty('resolution', [1024, 768])
     scr.setGPU(gpu)
     srv.addScreen(scr)
     self.genValidConfigFile(srv)
コード例 #5
0
 def test_success_00006_1_gpu_2scanout_1x2_vert_overlap(self):
     srv = vsapi.Server(0)
     scr = vsapi.Screen(0)
     gpu = vsapi.GPU(0)
     gpu.setScanout(0, 'HP LP2065')
     gpu.setScanout(1, 'HP LP2065', outputX=0, outputY=1190)
     scr.setGPU(gpu)
     srv.addScreen(scr)
     self.genValidConfigFile(srv)
コード例 #6
0
 def test_success_00005_1_gpu_2scanout_2x1_horiz_overalap(self):
     srv = vsapi.Server(0)
     scr = vsapi.Screen(0)
     gpu = vsapi.GPU(0)
     gpu.setScanout(0, 'HP LP2065')
     gpu.setScanout(1, 'HP LP2065', outputX=1590, outputY=0)
     scr.setGPU(gpu)
     srv.addScreen(scr)
     self.genValidConfigFile(srv)
コード例 #7
0
 def test_success_00002_1_gpu_2scanout(self):
     srv = vsapi.Server(0)
     scr = vsapi.Screen(0)
     gpu = vsapi.GPU(0)
     gpu.setScanout(0, 'HP LP2065')
     gpu.setScanout(1, 'HP LP2065')
     scr.setGPU(gpu)
     srv.addScreen(scr)
     self.genValidConfigFile(srv)
コード例 #8
0
 def test_success_00002_1_gpu_2scanout_nvs420_dp(self):
     srv = vsapi.Server(0)
     scr = vsapi.Screen(0)
     gpu = vsapi.GPU(2)  # NVS 420
     gpu.setScanout(2, 'HP LP2065')
     gpu.setScanout(3, 'HP LP2065')
     scr.setGPU(gpu)
     srv.addScreen(scr)
     self.genValidConfigFile(srv)
コード例 #9
0
	def test_00315_allocate_all_shared_GPUs_with_virtual_server(self):
		g = vsapi.GPU()
		g.setShared(True)
		allSharedGPUs = getResources(g)
		self.assertTrue(len(allSharedGPUs)>0)
		resList = []
		for gpu in allSharedGPUs:
			for i in range(gpu.getShareLimit()):
				resList.append([g, vsapi.Server(serverType=vsapi.VIRTUAL_SERVER)])
		self.allocObj = doAllocate(resList)
コード例 #10
0
	def test_00317_allocate_all_tvnc_shared_sessions_fixed_gpus(self):
		g = vsapi.GPU()
		g.setShared(True)
		allSharedGPUs = getResources(g)
		self.assertTrue(len(allSharedGPUs)>0)
		allocs = []
		for gpu in allSharedGPUs:
			gpu.setShared(True)
			for i in range(gpu.getShareLimit()):
				allocObj = doAllocate([ [ gpu, vsapi.Server(serverType=vsapi.VIRTUAL_SERVER)] ])
				allocs.append(allocObj)

		failed = False
		try:
			allocObj = doAllocate([ [ g, vsapi.Server(serverType=vsapi.VIRTUAL_SERVER) ] ])
			allocs.append(allocObj)
			failed = True
		except vsapi.VizError, e:
			pass
コード例 #11
0
	def test_00312_allocate_all_GPUs_each_separate_with_server(self):
		allGPUs = getResources(vsapi.GPU())
		self.assertTrue(len(allGPUs)>0)
		allocs = []
		for gpu in allGPUs:
			# allocate each GPU with additional server on the same node
			# this is what apps will use
			allocObj = doAllocate([ [gpu, vsapi.Server() ]])
			allocs.append(allocObj)
		for ob in allocs:
			doDeallocate(ob)
コード例 #12
0
    def test_success_00018_2_gpu_sli(self):
        srv = vsapi.Server(0)
        scr = vsapi.Screen(0)
        gpu0 = vsapi.GPU(0)
        gpu0.setScanout(0, 'HP LP2065')
        gpu1 = vsapi.GPU(1)
        scr.setGPUs([gpu0, gpu1])
        sli = vsapi.SLI(0)
        scr.setGPUCombiner(sli)
        srv.addScreen(scr)

        self.genValidConfigFile(srv)
コード例 #13
0
    def test_success_00022_2_gpu_sli_mosaic_2x1(self):
        srv = vsapi.Server(0)
        scr = vsapi.Screen(0)
        gpu0 = vsapi.GPU(0)
        gpu0.setScanout(0, 'HP LP2065')
        gpu1 = vsapi.GPU(1)
        gpu1.setScanout(0, 'HP LP2065', outputX=1600, outputY=0)
        scr.setGPUs([gpu0, gpu1])
        sli = vsapi.SLI(0)
        sli.setMode("mosaic")
        scr.setGPUCombiner(sli)
        srv.addScreen(scr)

        self.genValidConfigFile(srv)
コード例 #14
0
	def test_00315_allocate_all_shared_GPUs_with_dof3_reference_and_virtual_server(self):
		g = vsapi.GPU()
		g.setShared(True)
		allSharedGPUs = getResources(g)
		self.assertTrue(len(allSharedGPUs)>0)
		resList = []
		for gpu in allSharedGPUs:
			gpu.setShared(True)
			for i in range(gpu.getShareLimit()):
				# the difference between this test and the previous one is that 
				# it asks for a particular shared GPU. The tests in the VizStack
				# framework check DOF=0 resources, and these must not report errors
				resList.append([gpu, vsapi.Server(serverType=vsapi.VIRTUAL_SERVER)])
		self.allocObj = doAllocate(resList)
コード例 #15
0
    def test_success_00008_2_gpu_vfb(self):
        srv = vsapi.Server(0)

        scr0 = vsapi.Screen(0)
        gpu0 = vsapi.GPU(0)
        scr0.setFBProperty('resolution', [1024, 768])
        scr0.setGPU(gpu0)
        srv.addScreen(scr0)

        scr1 = vsapi.Screen(1)
        gpu1 = vsapi.GPU(1)
        scr1.setFBProperty('resolution', [1024, 768])
        scr1.setGPU(gpu1)
        srv.addScreen(scr1)

        self.genValidConfigFile(srv)
コード例 #16
0
    def test_success_00009_2_gpu_single_scanout(self):
        srv = vsapi.Server(0)

        scr0 = vsapi.Screen(0)
        gpu0 = vsapi.GPU(0)
        gpu0.setScanout(0, 'HP LP2065')
        scr0.setGPU(gpu0)
        srv.addScreen(scr0)

        scr1 = vsapi.Screen(1)
        gpu1 = vsapi.GPU(1)
        gpu1.setScanout(0, 'HP LP2065')
        scr1.setGPU(gpu1)
        srv.addScreen(scr1)

        self.genValidConfigFile(srv)
コード例 #17
0
 def test_failure_00001_1_gpu_1scanout(self):
     srv = vsapi.Server(0)
     scr = vsapi.Screen(0)
     gpu = vsapi.GPU(0)
     gpu.setScanout(
         3, 'HP LP2065'
     )  # Configure scanout. This would fail since the 5800 does not have the third scanout
     scr.setGPU(gpu)
     srv.addScreen(scr)
     try:
         print 'Trying to setup invalid port index 3 for scanout'
         self.genValidConfigFile(srv)
         self.fail("Succeeded to setup scanout 3 - this should have failed")
     except:
         # If we come here, there is failure -which is right
         print "Failed to generate config- the correct result right"
コード例 #18
0
	def test_00319_allocate_all_rgs_sessions(self):
		s = vsapi.Server(0)
		allRGSServers = getResources(s)
		self.assertTrue(len(allRGSServers)>0)
		allocs = []
		for srv in allRGSServers:
			allocObj = doAllocate([ [ s, vsapi.GPU(0) ] ])
			allocs.append(allocObj)

		failed = False
		try:
			allocObj = doAllocate([ [ s, vsapi.GPU(0) ] ])
			allocs.append(allocObj)
			failed = True
		except vsapi.VizError, e:
			pass
コード例 #19
0
    def test_success_00007_1_gpu_two_vfb(self):
        # One server, one GPU, but two virtual screens
        # on the same GPU
        srv = vsapi.Server(0)
        gpu = vsapi.GPU(0)

        scr0 = vsapi.Screen(0)
        scr0.setFBProperty('resolution', [1024, 768])
        scr0.setGPU(gpu)
        srv.addScreen(scr0)

        scr1 = vsapi.Screen(1)
        scr1.setFBProperty('resolution', [1024, 768])
        scr1.setGPU(gpu)
        srv.addScreen(scr1)

        self.genValidConfigFile(srv)
コード例 #20
0
 def test_failure_00002_1_gpu_1scanout(self):
     srv = vsapi.Server(0)
     scr = vsapi.Screen(0)
     gpu = vsapi.GPU(0)
     # configure 3 scanouts - this should also fail
     gpu.setScanout(0, 'HP LP2065')
     gpu.setScanout(1, 'HP LP2065')
     gpu.setScanout(2, 'HP LP2065')
     scr.setGPU(gpu)
     srv.addScreen(scr)
     try:
         print 'Trying to setup three scanouts on the GPU'
         self.genValidConfigFile(srv)
         self.fail(
             "Succeeded to setup three scanouts - this should have failed")
     except:
         # If we come here, there is failure -which is right
         print "Failed to generate config - the correct result right"
コード例 #21
0
    def test_success_00011_2_gpu_single_scanout_1x2(self):
        srv = vsapi.Server(0)

        scr0 = vsapi.Screen(0)
        gpu0 = vsapi.GPU(0)
        gpu0.setScanout(0, 'HP LP2065')
        scr0.setGPU(gpu0)
        scr0.setFBProperty('position', [0, 0])
        srv.addScreen(scr0)

        scr1 = vsapi.Screen(1)
        gpu1 = vsapi.GPU(1)
        gpu1.setScanout(0, 'HP LP2065')
        scr1.setFBProperty('position', [0, 1200])
        scr1.setGPU(gpu1)
        srv.addScreen(scr1)

        self.genValidConfigFile(srv)
コード例 #22
0
    def test_success_00012_2_gpu_single_scanout_2x1_xinerama(self):
        srv = vsapi.Server(0)

        scr0 = vsapi.Screen(0)
        gpu0 = vsapi.GPU(0)
        gpu0.setScanout(0, 'HP LP2065')
        scr0.setGPU(gpu0)
        scr0.setFBProperty('position', [0, 0])
        srv.addScreen(scr0)

        scr1 = vsapi.Screen(1)
        gpu1 = vsapi.GPU(1)
        gpu1.setScanout(0, 'HP LP2065')
        scr1.setFBProperty('position', [1600, 0])
        scr1.setGPU(gpu1)
        srv.addScreen(scr1)

        srv.combineScreens(True)
        self.genValidConfigFile(srv)
コード例 #23
0
    def test_success_00015_2_gpu_3x1_xinerama(self):
        srv = vsapi.Server(0)

        # 2 screens on first GPU, 1 on the second GPU
        # all placed in a horizontal layout
        scr0 = vsapi.Screen(0)
        gpu0 = vsapi.GPU(0)
        gpu0.setScanout(0, 'HP LP2065')
        gpu0.setScanout(1, 'HP LP2065', outputX=1600, outputY=0)
        scr0.setGPU(gpu0)
        scr0.setFBProperty('position', [0, 0])
        srv.addScreen(scr0)

        scr1 = vsapi.Screen(1)
        gpu1 = vsapi.GPU(1)
        gpu1.setScanout(0, 'HP LP2065')
        scr1.setFBProperty('position', [1600 * 2, 0])
        scr1.setGPU(gpu1)
        srv.addScreen(scr1)

        srv.combineScreens(True)
        self.genValidConfigFile(srv)
コード例 #24
0
    def test_success_00016_2_gpu_2x2_xinerama(self):
        srv = vsapi.Server(0)

        # 2 screens on first GPU, 2 on the second GPU
        # placed one below the other
        scr0 = vsapi.Screen(0)
        gpu0 = vsapi.GPU(0)
        gpu0.setScanout(0, 'HP LP2065')
        gpu0.setScanout(1, 'HP LP2065', outputX=1600, outputY=0)
        scr0.setGPU(gpu0)
        scr0.setFBProperty('position', [0, 0])
        srv.addScreen(scr0)

        scr1 = vsapi.Screen(1)
        gpu1 = vsapi.GPU(1)
        gpu1.setScanout(0, 'HP LP2065')
        gpu1.setScanout(1, 'HP LP2065', outputX=1600, outputY=0)
        scr1.setFBProperty('position', [0, 1200])
        scr1.setGPU(gpu1)
        srv.addScreen(scr1)

        srv.combineScreens(True)
        self.genValidConfigFile(srv)
コード例 #25
0
	def test_00101_allocate_Virtual_Server(self):
		self.allocObj = doAllocate([vsapi.Server(serverType=vsapi.VIRTUAL_SERVER)])
コード例 #26
0
	def test_00101_allocate_Server(self):
		self.allocObj = doAllocate([vsapi.Server(0)])
コード例 #27
0
	def test_00202_allocate_shared_GPU_virtual_Server(self):
		g = vsapi.GPU()
		g.setShared(True)
		self.allocObj = doAllocate([ [g, vsapi.Server(serverType=vsapi.VIRTUAL_SERVER)] ])
コード例 #28
0
	def test_00311_allocate_all_resources(self):
		allRes = getResources(vsapi.GPU())+getResources(vsapi.Server())+getResources(vsapi.Keyboard())+getResources(vsapi.Mouse())+getResources(vsapi.SLI())
		self.assertTrue(len(allRes)>0)
		self.allocObj = doAllocate(allRes)
コード例 #29
0
#gpu1.setScanout(1, "LP2065", outputX=1600)

# Create an X screen, and assign the first GPU
# to drive this screen
scr0 = vsapi.Screen(0)
scr0.setFBProperty('position',[0,0])
scr0.setGPU(gpu0)

# Create another X screen, and assign the second GPU
# to drive this screen
scr1 = vsapi.Screen(1)
scr1.setFBProperty('position',[0,1200]) # Screen 1 below screen 0
scr1.setGPU(gpu1)

# Create a server, and all screens to it
srv = vsapi.Server()
srv.addScreen(scr0)
srv.addScreen(scr1)
#Uncomment the following line to enable Xinerama
#srv.combineScreens(True)

# Get the XML corresponding to this server configuration
configXML = srv.serializeToXML()

# Populate XML into a temporary file
(fd, tempFile) = tempfile.mkstemp()
os.write(fd, configXML)
os.close(fd)

# Invoke configuration file generator with this input
# This will print out the X configuration file
コード例 #30
0
	def test_00201_allocate_Server_GPU(self):
		self.allocObj = doAllocate([ [vsapi.Server(), vsapi.GPU()] ])