From 4e5df436590d3ea5696bd80ce7acfba130a04185 Mon Sep 17 00:00:00 2001 From: Simon Ser Date: Mon, 29 Aug 2022 14:16:36 +0200 Subject: [PATCH] test: rename EDID files with .edid filename extension This makes it easier to perform an operation on all EDID files at once, e.g. "test/edid-decode-diff.sh test/data/*.edid" to update all diffs at once. Signed-off-by: Simon Ser --- test/data/{dell-2408wfp-dp => dell-2408wfp-dp.edid} | Bin test/data/{hp-5dq99aa-hdmi => hp-5dq99aa-hdmi.edid} | Bin ...nasonic-mei96a2-dp => panasonic-mei96a2-dp.edid} | Bin ...samsung-s27a950d-dp => samsung-s27a950d-dp.edid} | Bin test/data/{sun-gh19ps-dvi => sun-gh19ps-dvi.edid} | Bin test/edid-decode-check.sh | 5 +++-- test/edid-decode-diff.sh | 5 +++-- test/meson.build | 2 +- 8 files changed, 7 insertions(+), 5 deletions(-) rename test/data/{dell-2408wfp-dp => dell-2408wfp-dp.edid} (100%) rename test/data/{hp-5dq99aa-hdmi => hp-5dq99aa-hdmi.edid} (100%) rename test/data/{panasonic-mei96a2-dp => panasonic-mei96a2-dp.edid} (100%) rename test/data/{samsung-s27a950d-dp => samsung-s27a950d-dp.edid} (100%) rename test/data/{sun-gh19ps-dvi => sun-gh19ps-dvi.edid} (100%) diff --git a/test/data/dell-2408wfp-dp b/test/data/dell-2408wfp-dp.edid similarity index 100% rename from test/data/dell-2408wfp-dp rename to test/data/dell-2408wfp-dp.edid diff --git a/test/data/hp-5dq99aa-hdmi b/test/data/hp-5dq99aa-hdmi.edid similarity index 100% rename from test/data/hp-5dq99aa-hdmi rename to test/data/hp-5dq99aa-hdmi.edid diff --git a/test/data/panasonic-mei96a2-dp b/test/data/panasonic-mei96a2-dp.edid similarity index 100% rename from test/data/panasonic-mei96a2-dp rename to test/data/panasonic-mei96a2-dp.edid diff --git a/test/data/samsung-s27a950d-dp b/test/data/samsung-s27a950d-dp.edid similarity index 100% rename from test/data/samsung-s27a950d-dp rename to test/data/samsung-s27a950d-dp.edid diff --git a/test/data/sun-gh19ps-dvi b/test/data/sun-gh19ps-dvi.edid similarity index 100% rename from test/data/sun-gh19ps-dvi rename to test/data/sun-gh19ps-dvi.edid diff --git a/test/edid-decode-check.sh b/test/edid-decode-check.sh index c8c8df3..ab4c4f6 100755 --- a/test/edid-decode-check.sh +++ b/test/edid-decode-check.sh @@ -7,11 +7,12 @@ cleanup() { trap cleanup EXIT edid="$1" +diff="${edid%.edid}.diff" "$REF_EDID_DECODE" --skip-hex-dump --check --skip-sha <"$edid" >"$workdir/ref" || [ $? = 254 ] "$DI_EDID_DECODE" <"$edid" >"$workdir/di" || [ $? = 254 ] -if [ -f "$edid.diff" ]; then - patch "$workdir/ref" "$edid.diff" +if [ -f "$diff" ]; then + patch "$workdir/ref" "$diff" fi diff -u "$workdir/ref" "$workdir/di" diff --git a/test/edid-decode-diff.sh b/test/edid-decode-diff.sh index 607220a..e30a084 100755 --- a/test/edid-decode-diff.sh +++ b/test/edid-decode-diff.sh @@ -10,11 +10,12 @@ cleanup() { trap cleanup EXIT for edid in "$@"; do + diff="${edid%.edid}.diff" "$REF_EDID_DECODE" --skip-hex-dump --check --skip-sha <"$edid" >"$workdir/ref" || [ $? = 254 ] "$DI_EDID_DECODE" <"$edid" >"$workdir/di" || [ $? = 254 ] if ! diff -u --label ref "$workdir/ref" --label di "$workdir/di" >"$workdir/diff"; then - cp "$workdir/diff" "$edid.diff" + cp "$workdir/diff" "$diff" else - rm -f "$edid.diff" + rm -f "$diff" fi done diff --git a/test/meson.build b/test/meson.build index 299e6b5..0d70ca6 100644 --- a/test/meson.build +++ b/test/meson.build @@ -18,7 +18,7 @@ foreach tc : test_cases test( tc, test_harness, - args: [files('data/' + tc)], + args: [files('data/' + tc + '.edid')], env: [ 'REF_EDID_DECODE=' + ref_edid_decode.full_path(), 'DI_EDID_DECODE=' + di_edid_decode.full_path(),