Lines Matching defs:self

33     def _launch_virt_gpu(self, gpu_device):
35 self.set_machine('virt')
36 self.require_accelerator("tcg")
38 kernel_path = self.ASSET_VIRT_GPU_KERNEL.fetch()
39 image_path = self.uncompress(self.ASSET_VIRT_GPU_ROOTFS, format="zstd")
41 self.vm.set_console()
42 kernel_command_line = (self.KERNEL_COMMON_COMMAND_LINE +
45 self.vm.add_args("-accel", "tcg")
46 self.vm.add_args("-cpu", "cortex-a72")
47 self.vm.add_args("-machine", "virt,gic-version=max",
50 self.vm.add_args("-smp", "2", "-m", "2048")
51 self.vm.add_args("-device", gpu_device)
52 self.vm.add_args("-display", "egl-headless")
53 self.vm.add_args("-display", "dbus,gl=on")
55 self.vm.add_args("-device", "virtio-blk-device,drive=hd0")
56 self.vm.add_args("-blockdev",
60 self.vm.add_args("-snapshot")
63 self.vm.launch()
66 self.skipTest("No blob support for virtio-gpu")
68 self.skipTest("No venus support for virtio-gpu")
70 self.skipTest("Can't access host DRM render node")
72 self.skipTest("egl-headless support is not available")
74 self.skipTest("dbus display support is not available")
76 self.log.info("unhandled launch failure: %s", excp.output)
79 self.wait_for_console_pattern('buildroot login:')
80 ec_and_wait(self, 'root', '#')
82 def _run_virt_weston_test(self, cmd, fail = None):
88 ec_and_wait(self, 'export XDG_RUNTIME_DIR=/tmp', '#')
89 ec_and_wait(self, f"export PS1='{PS1}'", OK_CMD)
91 ec_and_wait(self, full_cmd, OK_CMD, fail)
94 def test_aarch64_virt_with_virgl_gpu(self):
96 self.require_device('virtio-gpu-gl-pci')
98 self._launch_virt_gpu("virtio-gpu-gl-pci")
105 self._run_virt_weston_test("glmark2-wayland --validate " + tests)
108 def test_aarch64_virt_with_virgl_blobs_gpu(self):
110 self.require_device('virtio-gpu-gl-pci')
112 self._launch_virt_gpu("virtio-gpu-gl-pci,hostmem=4G,blob=on")
113 self._run_virt_weston_test("glmark2-wayland -b:duration=1.0")
117 def test_aarch64_virt_with_vulkan_gpu(self):
119 self.require_device('virtio-gpu-gl-pci')
125 self.skipTest(f"Miss-configured host Vulkan: {excp.output}")
128 self.skipTest("Test skipped on NVIDIA proprietary driver")
130 self._launch_virt_gpu("virtio-gpu-gl-pci,hostmem=4G,blob=on,venus=on")
131 self._run_virt_weston_test("vkmark -b:duration=1.0",