meson.build 6.44 KB
Newer Older
1 2 3 4 5 6 7 8 9 10 11 12 13 14 15 16 17 18 19 20 21 22 23 24 25 26 27 28 29 30 31 32 33 34 35 36 37 38 39 40 41 42 43 44 45 46 47 48 49 50 51 52 53 54 55 56 57 58 59 60 61 62 63 64 65 66 67 68 69 70 71 72 73 74 75 76 77 78 79 80 81 82 83 84 85 86 87 88 89 90 91 92 93 94 95 96 97 98 99 100 101 102 103 104 105 106 107 108 109 110 111 112 113 114 115 116 117 118 119 120 121 122 123 124 125 126 127 128 129 130 131 132 133 134 135 136 137 138 139 140 141 142 143 144 145 146 147 148 149 150 151
test_progs = [
	'core_auth',
	'core_get_client_auth',
	'core_getclient',
	'core_getstats',
	'core_getversion',
	'core_prop_blob',
	'core_setmaster_vs_auth',
	'debugfs_test',
	'drm_import_export',
	'drm_mm',
	'drm_read',
	'drm_vma_limiter',
	'drm_vma_limiter_cached',
	'drm_vma_limiter_cpu',
	'drm_vma_limiter_gtt',
	'drv_getparams_basic',
	'drv_hangman',
	'drv_missed_irq',
	'drv_module_reload',
	'drv_selftest',
	'drv_suspend',
	'gem_bad_reloc',
	'gem_basic',
	'gem_busy',
	'gem_caching',
	'gem_close',
	'gem_close_race',
	'gem_concurrent_blit',
	'gem_cpu_reloc',
	'gem_create',
	'gem_cs_prefetch',
	'gem_cs_tlb',
	'gem_ctx_bad_destroy',
	'gem_ctx_bad_exec',
	'gem_ctx_create',
	'gem_ctx_exec',
	'gem_ctx_param',
	'gem_ctx_switch',
	'gem_ctx_thrash',
	'gem_double_irq_loop',
	'gem_eio',
	'gem_evict_alignment',
	'gem_evict_everything',
	'gem_exec_alignment',
	'gem_exec_async',
	'gem_exec_await',
	'gem_exec_bad_domains',
	'gem_exec_basic',
	'gem_exec_big',
	'gem_exec_blt',
	'gem_exec_capture',
	'gem_exec_create',
	'gem_exec_faulting_reloc',
	'gem_exec_fence',
	'gem_exec_flush',
	'gem_exec_gttfill',
	'gem_exec_latency',
	'gem_exec_lut_handle',
	'gem_exec_nop',
	'gem_exec_parallel',
	'gem_exec_params',
	'gem_exec_parse',
	'gem_exec_reloc',
	'gem_exec_reuse',
	'gem_exec_schedule',
	'gem_exec_store',
	'gem_exec_suspend',
	'gem_exec_whisper',
	'gem_fd_exhaustion',
	'gem_fence_thrash',
	'gem_fence_upload',
	'gem_fenced_exec_thrash',
	'gem_flink_basic',
	'gem_flink_race',
	'gem_gpgpu_fill',
	'gem_gtt_cpu_tlb',
	'gem_gtt_hog',
	'gem_gtt_speed',
	'gem_largeobject',
	'gem_linear_blits',
	'gem_lut_handle',
	'gem_madvise',
	'gem_media_fill',
	'gem_mmap',
	'gem_mmap_gtt',
	'gem_mmap_offset_exhaustion',
	'gem_mmap_wc',
	'gem_mocs_settings',
	'gem_partial_pwrite_pread',
	'gem_persistent_relocs',
	'gem_pin',
	'gem_pipe_control_store_loop',
	'gem_ppgtt',
	'gem_pread',
	'gem_pread_after_blit',
	'gem_pwrite',
	'gem_pwrite_pread',
	'gem_pwrite_snooped',
	'gem_read_read_speed',
	'gem_readwrite',
	'gem_reg_read',
	'gem_reloc_overflow',
	'gem_reloc_vs_gpu',
	'gem_render_copy',
	'gem_render_copy_redux',
	'gem_render_linear_blits',
	'gem_render_tiled_blits',
	'gem_request_retire',
	'gem_reset_stats',
	'gem_ring_sync_copy',
	'gem_ring_sync_loop',
	'gem_ringfill',
	'gem_seqno_wrap',
	'gem_set_tiling_vs_blt',
	'gem_set_tiling_vs_gtt',
	'gem_set_tiling_vs_pwrite',
	'gem_shrink',
	'gem_softpin',
	'gem_spin_batch',
	'gem_stolen',
	'gem_storedw_batches_loop',
	'gem_storedw_loop',
	'gem_streaming_writes',
	'gem_sync',
	'gem_threaded_access_tiled',
	'gem_tiled_blits',
	'gem_tiled_fence_blits',
	'gem_tiled_partial_pwrite_pread',
	'gem_tiled_pread_basic',
	'gem_tiled_pread_pwrite',
	'gem_tiled_swapping',
	'gem_tiled_wb',
	'gem_tiled_wc',
	'gem_tiling_max_stride',
	'gem_unfence_active_buffers',
	'gem_unref_active_buffers',
	'gem_userptr_blits',
	'gem_wait',
	'gem_workarounds',
	'gem_write_read_ring_switch',
	'gen3_mixed_blits',
	'gen3_render_linear_blits',
	'gen3_render_mixed_blits',
	'gen3_render_tiledx_blits',
	'gen3_render_tiledy_blits',
	'gen7_forcewake_mt',
	'gvt_basic',
	'kms_3d',
	'kms_addfb_basic',
	'kms_atomic',
152
	'kms_atomic_interruptible',
153 154 155 156
	'kms_atomic_transition',
	'kms_busy',
	'kms_ccs',
	'kms_chv_cursor_fail',
157
	'kms_color',
158 159 160 161 162 163 164 165 166 167 168 169 170 171 172 173 174 175 176 177 178 179 180 181 182 183 184 185 186 187 188 189 190 191 192 193 194 195
	'kms_concurrent',
	'kms_crtc_background_color',
	'kms_cursor_crc',
	'kms_cursor_legacy',
	'kms_draw_crc',
	'kms_fbcon_fbt',
	'kms_fence_pin_leak',
	'kms_flip',
	'kms_flip_event_leak',
	'kms_flip_tiling',
	'kms_force_connector_basic',
	'kms_frontbuffer_tracking',
	'kms_hdmi_inject',
	'kms_invalid_dotclock',
	'kms_legacy_colorkey',
	'kms_mmap_write_crc',
	'kms_mmio_vs_cs_flip',
	'kms_panel_fitting',
	'kms_pipe_b_c_ivb',
	'kms_pipe_crc_basic',
	'kms_plane',
	'kms_plane_lowres',
	'kms_plane_multiple',
	'kms_plane_scaling',
	'kms_properties',
	'kms_psr_sink_crc',
	'kms_pwrite_crc',
	'kms_render',
	'kms_rmfb',
	'kms_rotation_crc',
	'kms_setmode',
	'kms_sink_crc_basic',
	'kms_sysfs_edid_timing',
	'kms_tv_load_detect',
	'kms_universal_plane',
	'kms_vblank',
	'meta_test',
	'perf',
196
	'perf_pmu',
197 198 199 200 201 202 203 204 205 206 207 208 209 210 211
	'pm_backlight',
	'pm_lpsp',
	'pm_rc6_residency',
	'pm_rpm',
	'pm_rps',
	'pm_sseu',
	'prime_busy',
	'prime_mmap',
	'prime_mmap_coherency',
	'prime_mmap_kms',
	'prime_self_import',
	'prime_udl',
	'prime_vgem',
	'sw_sync',
	'syncobj_basic',
212
	'syncobj_wait',
213 214
	'template',
	'tools_test',
215 216
	'vc4_create_bo',
	'vc4_dmabuf_poll',
217
	'vc4_label_bo',
218
	'vc4_lookup_fail',
219
	'vc4_tiling',
220 221
	'vc4_wait_bo',
	'vc4_wait_seqno',
222 223 224 225 226
	'vgem_basic',
	'vgem_slow',
]

test_deps = [ igt_deps ]
227 228 229 230 231 232 233 234 235 236 237

if libdrm_amdgpu.found()
	# FIXME meson/ninja really doesn't like build targets with paths in them
	test_progs += [
		'amdgpu/amd_basic',
		'amdgpu/amd_cs_nop',
		'amdgpu/amd_prime',
	]
	test_deps += libdrm_amdgpu
endif

238 239 240 241 242 243 244 245 246
if libdrm_nouveau.found()
	test_progs += [
		'prime_nv_api',
		'prime_nv_pcopy',
		'prime_nv_test',
	]
	test_deps += libdrm_nouveau
endif

247
if chamelium.found()
248
	test_progs += [
249
		'kms_chamelium',
250
	]
251
	test_deps += chamelium
252 253
endif

254
if alsa.found() and gsl.found()
255 256 257 258 259 260
	test_progs += [
		'audio',
	]
	test_deps += alsa
endif

261 262
libexecdir = join_paths(get_option('prefix'), get_option('libexecdir'), 'intel-gpu-tools')

263
foreach prog : test_progs
264 265 266 267
	link = []
	if prog == 'perf_pmu'
		link += lib_igt_perf
	endif
268
	executable(prog, prog + '.c',
269 270
		   dependencies : test_deps,
		   install_dir : libexecdir,
271
		   link_with : link,
272
		   install : true)
273 274 275
endforeach

executable('testdisplay', ['testdisplay.c', 'testdisplay_hotplug.c'],
276 277 278
	   dependencies : test_deps,
	   install_dir : libexecdir,
	   install : true)
279 280
test_progs += 'testdisplay'

Ville Syrjälä's avatar
Ville Syrjälä committed
281 282 283 284 285 286 287 288
pkgdatadir = join_paths(get_option('prefix'), get_option('datadir'), 'intel-gpu-tools')

gen_testlist = find_program('generate_testlist.sh')
custom_target('testlist',
	      output : 'test-list.txt',
	      command : [ gen_testlist, '@OUTPUT@', test_progs ],
	      install : true,
	      install_dir : pkgdatadir)
289 290 291 292 293 294 295 296 297 298 299 300 301 302 303 304 305 306 307 308 309 310 311

test_script = find_program('igt_command_line.sh')
foreach prog : test_progs
	test('testcase check: ' + prog, test_script,
			args : prog)
endforeach

executable('gem_stress', 'gem_stress.c', dependencies : igt_deps)

# IMPORTANT: These tests here are all disabled because the result in sometime
# unrecoverable gpu hangs. Don't put real testcases here.
hang_progs = [
	'gem_bad_batch',
	'gem_hang',
	'gem_bad_blit',
	'gem_bad_address',
	'gem_non_secure_batch',
]
foreach prog : hang_progs
	executable(prog, prog + '.c',
			dependencies : igt_deps,
			install : false)
endforeach
312 313 314 315 316 317 318

image_files = [
  '1080p-left.png',
  '1080p-right.png',
  'pass.png',
]
install_data(sources : image_files, install_dir : pkgdatadir)