2022-03-28 11:17:07 +02:00
|
|
|
ref_edid_decode = find_program('edid-decode', native: true, required: false)
|
|
|
|
if not ref_edid_decode.found()
|
|
|
|
test('edid-decode-not-found', find_program('false'))
|
|
|
|
subdir_done()
|
|
|
|
endif
|
|
|
|
|
|
|
|
test_harness = find_program('./edid-decode-check.sh', native: true)
|
|
|
|
|
2022-10-14 10:03:35 +02:00
|
|
|
di_edid_print = executable(
|
|
|
|
'di-edid-print',
|
|
|
|
'di-edid-print.c',
|
|
|
|
dependencies: di_dep,
|
|
|
|
install: false,
|
|
|
|
)
|
|
|
|
|
|
|
|
print_harness = find_program('./edid-print-check.sh', native: true)
|
|
|
|
|
2022-03-28 11:17:07 +02:00
|
|
|
test_cases = [
|
2022-09-15 16:25:45 +02:00
|
|
|
'acer-p1276',
|
2022-08-31 12:13:52 +02:00
|
|
|
'apple-xdr-dp',
|
2022-10-13 12:25:22 +02:00
|
|
|
'custom-uncommon-cta-vesa',
|
2022-03-28 11:17:07 +02:00
|
|
|
'dell-2408wfp-dp',
|
2022-09-06 09:44:33 +02:00
|
|
|
'goldstar-ite6604-hdmi',
|
2022-05-20 11:44:04 +02:00
|
|
|
'hp-5dq99aa-hdmi',
|
2022-09-06 09:22:56 +02:00
|
|
|
'msi-mag321curv-dp',
|
2022-06-06 17:39:06 +02:00
|
|
|
'panasonic-mei96a2-dp',
|
2022-06-17 11:15:51 +02:00
|
|
|
'samsung-s27a950d-dp',
|
2022-06-22 09:03:55 +02:00
|
|
|
'sun-gh19ps-dvi',
|
2022-08-30 12:34:23 +02:00
|
|
|
'viewsonic-vp2768-dp',
|
2022-09-28 02:46:42 +02:00
|
|
|
'cvt',
|
2022-03-28 11:17:07 +02:00
|
|
|
]
|
|
|
|
|
2022-11-17 22:10:08 +01:00
|
|
|
test_env = [
|
|
|
|
'REF_EDID_DECODE=' + ref_edid_decode.full_path(),
|
|
|
|
'DI_EDID_DECODE=' + di_edid_decode.full_path(),
|
|
|
|
'DI_EDID_PRINT=' + di_edid_print.full_path(),
|
|
|
|
]
|
|
|
|
|
2022-03-28 11:17:07 +02:00
|
|
|
foreach tc : test_cases
|
|
|
|
test(
|
2022-10-14 10:03:35 +02:00
|
|
|
'decode-' + tc,
|
2022-03-28 11:17:07 +02:00
|
|
|
test_harness,
|
2022-08-29 14:16:36 +02:00
|
|
|
args: [files('data/' + tc + '.edid')],
|
2022-11-17 22:10:08 +01:00
|
|
|
env: test_env,
|
2022-03-28 11:17:07 +02:00
|
|
|
depends: [di_edid_decode],
|
|
|
|
)
|
2022-10-14 10:03:35 +02:00
|
|
|
test(
|
|
|
|
'print-' + tc,
|
|
|
|
print_harness,
|
|
|
|
args: [files('data/' + tc + '.edid')],
|
2022-11-17 22:10:08 +01:00
|
|
|
env: test_env,
|
2022-10-14 10:03:35 +02:00
|
|
|
depends: [di_edid_print],
|
|
|
|
)
|
2022-03-28 11:17:07 +02:00
|
|
|
endforeach
|
2022-11-17 22:10:08 +01:00
|
|
|
|
|
|
|
test_gen = find_program('./edid-decode-diff.sh', native: true)
|
|
|
|
|
|
|
|
gen_targets = []
|
|
|
|
foreach tc : test_cases
|
|
|
|
gen_targets += files('data/' + tc + '.edid')
|
|
|
|
endforeach
|
|
|
|
|
|
|
|
run_target(
|
|
|
|
'gen-test-data',
|
|
|
|
command: [test_gen] + gen_targets,
|
|
|
|
depends: [di_edid_decode, di_edid_print],
|
|
|
|
env: test_env,
|
|
|
|
)
|