You can not select more than 25 topics Topics must start with a letter or number, can include dashes ('-') and can be up to 35 characters long.

47 lines
1.1 KiB

#!/bin/sh
dir=`dirname "$0"`
set -ex
if test -d text-rendering-tests; then
cd text-rendering-tests
git pull
cd ..
else
git clone https://github.com/unicode-org/text-rendering-tests
fi
test -d fonts && git rm -rf fonts
test -d fonts && (echo "fonts/ dir not empty; investigate."; false)
cp -a text-rendering-tests/fonts .
git add fonts
rmdir tests || true
test -d tests && git rm -rf tests || true
test -d tests && (echo "tests/ dir not empty; investigate."; false)
mkdir tests
echo "TESTS = \\" > Makefile.sources
DISABLED="DISBALED_TESTS = \\"
for x in text-rendering-tests/testcases/*.html; do
test "x$x" = xtext-rendering-tests/testcases/index.html && continue
out=tests/`basename "$x" .html`.tests
"$dir"/extract-tests.py < "$x" > "$out"
if grep -q "^$out$" DISABLED; then
DISABLED="$DISABLED
$out \\"
else
echo " $out \\" >> Makefile.sources
fi
done
git add tests
echo ' $(NULL)' >> Makefile.sources
echo >> Makefile.sources
echo "$DISABLED" >> Makefile.sources
echo ' $(NULL)' >> Makefile.sources
git add Makefile.sources
git commit -e -m "[test/text-rendering-tests] Update from upstream"