Imported Upstream version 2.6.4
[platform/upstream/harfbuzz.git] / test / shaping / data / text-rendering-tests / update.sh
1 #!/bin/sh
2
3 dir=`dirname "$0"`
4
5 set -ex
6 if test -d text-rendering-tests; then
7         cd text-rendering-tests
8         git pull
9         cd ..
10 else
11         git clone https://github.com/unicode-org/text-rendering-tests
12 fi
13
14 test -d fonts && git rm -rf fonts
15 test -d fonts && (echo "fonts/ dir not empty; investigate."; false)
16 cp -a text-rendering-tests/fonts .
17 git add fonts
18
19 rmdir tests || true
20 test -d tests && git rm -rf tests || true
21 test -d tests && (echo "tests/ dir not empty; investigate."; false)
22 mkdir tests
23
24 echo "TESTS = \\" > Makefile.sources
25
26 DISABLED="DISBALED_TESTS = \\"
27 for x in text-rendering-tests/testcases/*.html; do
28         test "x$x" = xtext-rendering-tests/testcases/index.html && continue
29         out=tests/`basename "$x" .html`.tests
30         "$dir"/extract-tests.py < "$x" > "$out"
31         if grep -q "^$out$" DISABLED; then
32                 DISABLED="$DISABLED
33         $out \\"
34         else
35                 echo "  $out \\" >> Makefile.sources
36         fi
37 done
38 git add tests
39
40 echo '  $(NULL)' >> Makefile.sources
41 echo >> Makefile.sources
42 echo "$DISABLED" >> Makefile.sources
43 echo '  $(NULL)' >> Makefile.sources
44 git add Makefile.sources
45
46 git commit -e -m "[test/text-rendering-tests] Update from upstream"