mirror of
https://gitlab.freedesktop.org/emersion/libdisplay-info.git
synced 2024-12-25 21:59:08 +01:00
a8e78208a5
Add two small shell utilities to generate and compare diffs between edid-decode and di-edid-decode. Store the diffs in-tree and add tests to ensure they don't regress. Run the tests in CI with a pinned installation of edid-decode. One EDID blob is added to the test collection: dell-2408wfp-dp. It's extracted [1] from the edid-decode repository. [1]: https://git.linuxtv.org/edid-decode.git/tree/data/dell-2408wfp-dp Signed-off-by: Simon Ser <contact@emersion.fr> Closes: https://gitlab.freedesktop.org/emersion/libdisplay-info/-/issues/5
17 lines
295 B
Bash
Executable file
17 lines
295 B
Bash
Executable file
#!/bin/sh -eu
|
|
|
|
workdir="$(mktemp -d)"
|
|
cleanup() {
|
|
rm -rf "$workdir"
|
|
}
|
|
trap cleanup EXIT
|
|
|
|
edid="$1"
|
|
"$REF_EDID_DECODE" -s <"$edid" >"$workdir/ref"
|
|
"$DI_EDID_DECODE" <"$edid" >"$workdir/di"
|
|
|
|
if [ -f "$edid.diff" ]; then
|
|
patch "$workdir/ref" "$edid.diff"
|
|
fi
|
|
|
|
diff -u "$workdir/ref" "$workdir/di"
|