annotate tests/test-xprintf-posix.sh @ 40221:8c1a17df67e0

tests: Prepare for using valgrind. tests/*.sh: Invoke all test programs through ${CHECKER}. tests/*/*.sh: Likewise.
author Bruno Haible <bruno@clisp.org>
date Sun, 10 Mar 2019 11:32:11 +0100
parents b6ae7b58fba1
children
Ignore whitespace changes - Everywhere: Within whitespace: At end of lines:
rev   line source
9428
733dbb7b0c0a Tests for module 'xprintf-posix'.
Bruno Haible <bruno@clisp.org>
parents:
diff changeset
1 #!/bin/sh
733dbb7b0c0a Tests for module 'xprintf-posix'.
Bruno Haible <bruno@clisp.org>
parents:
diff changeset
2
733dbb7b0c0a Tests for module 'xprintf-posix'.
Bruno Haible <bruno@clisp.org>
parents:
diff changeset
3 tmpfiles=""
733dbb7b0c0a Tests for module 'xprintf-posix'.
Bruno Haible <bruno@clisp.org>
parents:
diff changeset
4 trap 'rm -fr $tmpfiles' 1 2 3 15
733dbb7b0c0a Tests for module 'xprintf-posix'.
Bruno Haible <bruno@clisp.org>
parents:
diff changeset
5
733dbb7b0c0a Tests for module 'xprintf-posix'.
Bruno Haible <bruno@clisp.org>
parents:
diff changeset
6 tmpfiles="$tmpfiles t-xprintf-posix.tmp t-xprintf-posix.out"
40221
8c1a17df67e0 tests: Prepare for using valgrind.
Bruno Haible <bruno@clisp.org>
parents: 9874
diff changeset
7 ${CHECKER} ./test-xprintf-posix${EXEEXT} > t-xprintf-posix.tmp || exit 1
9874
b6ae7b58fba1 Avoid possible error with non-ASCII bytes in UTF-8 locales.
Bruno Haible <bruno@clisp.org>
parents: 9428
diff changeset
8 LC_ALL=C tr -d '\r' < t-xprintf-posix.tmp > t-xprintf-posix.out || exit 1
9428
733dbb7b0c0a Tests for module 'xprintf-posix'.
Bruno Haible <bruno@clisp.org>
parents:
diff changeset
9
733dbb7b0c0a Tests for module 'xprintf-posix'.
Bruno Haible <bruno@clisp.org>
parents:
diff changeset
10 : ${DIFF=diff}
733dbb7b0c0a Tests for module 'xprintf-posix'.
Bruno Haible <bruno@clisp.org>
parents:
diff changeset
11 ${DIFF} "${srcdir}/test-printf-posix.output" t-xprintf-posix.out
733dbb7b0c0a Tests for module 'xprintf-posix'.
Bruno Haible <bruno@clisp.org>
parents:
diff changeset
12 test $? = 0 || { rm -fr $tmpfiles; exit 1; }
733dbb7b0c0a Tests for module 'xprintf-posix'.
Bruno Haible <bruno@clisp.org>
parents:
diff changeset
13
733dbb7b0c0a Tests for module 'xprintf-posix'.
Bruno Haible <bruno@clisp.org>
parents:
diff changeset
14 tmpfiles="$tmpfiles t-xfprintf-posix.tmp t-xfprintf-posix.out"
40221
8c1a17df67e0 tests: Prepare for using valgrind.
Bruno Haible <bruno@clisp.org>
parents: 9874
diff changeset
15 ${CHECKER} ./test-xfprintf-posix${EXEEXT} > t-xfprintf-posix.tmp || exit 1
9874
b6ae7b58fba1 Avoid possible error with non-ASCII bytes in UTF-8 locales.
Bruno Haible <bruno@clisp.org>
parents: 9428
diff changeset
16 LC_ALL=C tr -d '\r' < t-xfprintf-posix.tmp > t-xfprintf-posix.out || exit 1
9428
733dbb7b0c0a Tests for module 'xprintf-posix'.
Bruno Haible <bruno@clisp.org>
parents:
diff changeset
17
733dbb7b0c0a Tests for module 'xprintf-posix'.
Bruno Haible <bruno@clisp.org>
parents:
diff changeset
18 : ${DIFF=diff}
733dbb7b0c0a Tests for module 'xprintf-posix'.
Bruno Haible <bruno@clisp.org>
parents:
diff changeset
19 ${DIFF} "${srcdir}/test-printf-posix.output" t-xfprintf-posix.out
733dbb7b0c0a Tests for module 'xprintf-posix'.
Bruno Haible <bruno@clisp.org>
parents:
diff changeset
20 test $? = 0 || { rm -fr $tmpfiles; exit 1; }
733dbb7b0c0a Tests for module 'xprintf-posix'.
Bruno Haible <bruno@clisp.org>
parents:
diff changeset
21
733dbb7b0c0a Tests for module 'xprintf-posix'.
Bruno Haible <bruno@clisp.org>
parents:
diff changeset
22 rm -fr $tmpfiles
733dbb7b0c0a Tests for module 'xprintf-posix'.
Bruno Haible <bruno@clisp.org>
parents:
diff changeset
23
733dbb7b0c0a Tests for module 'xprintf-posix'.
Bruno Haible <bruno@clisp.org>
parents:
diff changeset
24 exit 0