Mercurial > gnulib
comparison tests/test-select-out.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 | 97fca29bb224 |
children |
comparison
equal
deleted
inserted
replaced
40220:2796695e9216 | 40221:8c1a17df67e0 |
---|---|
7 tmpfiles="$tmpfiles t-select-out.out t-select-out.tmp" | 7 tmpfiles="$tmpfiles t-select-out.out t-select-out.tmp" |
8 | 8 |
9 # Regular files. | 9 # Regular files. |
10 | 10 |
11 rm -f t-select-out.tmp | 11 rm -f t-select-out.tmp |
12 ./test-select-fd${EXEEXT} w 1 t-select-out.tmp > t-select-out.out | 12 ${CHECKER} ./test-select-fd${EXEEXT} w 1 t-select-out.tmp > t-select-out.out |
13 test `cat t-select-out.tmp` = "1" || exit 1 | 13 test `cat t-select-out.tmp` = "1" || exit 1 |
14 | 14 |
15 # Pipes. | 15 # Pipes. |
16 | 16 |
17 if false; then # This test fails on some platforms. | 17 if false; then # This test fails on some platforms. |
18 rm -f t-select-out.tmp | 18 rm -f t-select-out.tmp |
19 ( { echo abc; ./test-select-fd${EXEEXT} w 1 t-select-out.tmp; } | { sleep 1; cat; } ) > /dev/null | 19 ( { echo abc; ${CHECKER} ./test-select-fd${EXEEXT} w 1 t-select-out.tmp; } | { sleep 1; cat; } ) > /dev/null |
20 test `cat t-select-out.tmp` = "0" || exit 1 | 20 test `cat t-select-out.tmp` = "0" || exit 1 |
21 fi | 21 fi |
22 | 22 |
23 rm -f t-select-out.tmp | 23 rm -f t-select-out.tmp |
24 ( { sleep 1; echo abc; ./test-select-fd${EXEEXT} w 1 t-select-out.tmp; } | cat) > /dev/null | 24 ( { sleep 1; echo abc; ${CHECKER} ./test-select-fd${EXEEXT} w 1 t-select-out.tmp; } | cat) > /dev/null |
25 test `cat t-select-out.tmp` = "1" || exit 1 | 25 test `cat t-select-out.tmp` = "1" || exit 1 |
26 | 26 |
27 # Special files. | 27 # Special files. |
28 | 28 |
29 rm -f t-select-out.tmp | 29 rm -f t-select-out.tmp |
30 ./test-select-fd${EXEEXT} w 1 t-select-out.tmp > /dev/null | 30 ${CHECKER} ./test-select-fd${EXEEXT} w 1 t-select-out.tmp > /dev/null |
31 test `cat t-select-out.tmp` = "1" || exit 1 | 31 test `cat t-select-out.tmp` = "1" || exit 1 |
32 | 32 |
33 rm -fr $tmpfiles | 33 rm -fr $tmpfiles |
34 | 34 |
35 exit 0 | 35 exit 0 |