Meta+Tests/LibGfx: Make check-jbig2-json.sh call compile.sh

That way, it picks up the recent speed-up in compile.sh.

To make this work, let compile.sh optionally take the path to
jbig2-from-json as first argument.

Takes the time to run Meta/check-jbig2-json.sh from 1.7s to 0.29s
on my system.
This commit is contained in:
Nico Weber
2025-11-25 18:43:08 -05:00
parent 7cd3e6e928
commit 33f1c58afd
2 changed files with 2 additions and 5 deletions

View File

@@ -33,10 +33,7 @@ if [ -z "${JBIG2_FROM_JSON_BINARY:-}" ] ; then
JBIG2_FROM_JSON_BINARY="Build/lagom/bin/jbig2-from-json"
fi
for f in "${json_files[@]}"; do
f_jb2=Tests/LibGfx/test-inputs/jbig2/$(basename "${f%.json}.jbig2")
"$JBIG2_FROM_JSON_BINARY" -o "$f_jb2" "$f"
done
Tests/LibGfx/test-inputs/jbig2/json/compile.sh "$JBIG2_FROM_JSON_BINARY"
# annex-h.jbig2 is fixed data from Annex H of the JBIG2 spec.
# It should never change, if it does, that's a bug.

View File

@@ -5,7 +5,7 @@ set -u
DIR="$(cd "$(dirname "$0")" && pwd)"
ROOT="$DIR/../../../../.."
LAGOM_BUILD="$ROOT/Build/lagom"
JBIG2_FROM_JSON="$LAGOM_BUILD/bin/jbig2-from-json"
JBIG2_FROM_JSON=${1:-"$LAGOM_BUILD/bin/jbig2-from-json"}
export DIR
export JBIG2_FROM_JSON