comparison tests/test-select-in.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 700012efeb01
children
comparison
equal deleted inserted replaced
40220:2796695e9216 40221:8c1a17df67e0
10 tmpfiles="$tmpfiles t-select-in.tmp" 10 tmpfiles="$tmpfiles t-select-in.tmp"
11 11
12 # Regular files. 12 # Regular files.
13 13
14 rm -f t-select-in.tmp 14 rm -f t-select-in.tmp
15 ./test-select-fd${EXEEXT} r 0 t-select-in.tmp < ./test-select-fd${EXEEXT} 15 ${CHECKER} ./test-select-fd${EXEEXT} r 0 t-select-in.tmp < ./test-select-fd${EXEEXT}
16 test `cat t-select-in.tmp` = "1" || exit 1 16 test `cat t-select-in.tmp` = "1" || exit 1
17 17
18 # Pipes. 18 # Pipes.
19 19
20 rm -f t-select-in.tmp 20 rm -f t-select-in.tmp
21 { sleep 1; echo abc; } | \ 21 { sleep 1; echo abc; } | \
22 { ./test-select-fd${EXEEXT} r 0 t-select-in.tmp; cat > /dev/null; } 22 { ${CHECKER} ./test-select-fd${EXEEXT} r 0 t-select-in.tmp; cat > /dev/null; }
23 test `cat t-select-in.tmp` = "0" || exit 1 23 test `cat t-select-in.tmp` = "0" || exit 1
24 24
25 rm -f t-select-in.tmp 25 rm -f t-select-in.tmp
26 echo abc | { sleep 1; ./test-select-fd${EXEEXT} r 0 t-select-in.tmp; } 26 echo abc | { sleep 1; ${CHECKER} ./test-select-fd${EXEEXT} r 0 t-select-in.tmp; }
27 test `cat t-select-in.tmp` = "1" || exit 1 27 test `cat t-select-in.tmp` = "1" || exit 1
28 28
29 # Special files. 29 # Special files.
30 # This part of the test is known to fail on Solaris 2.6 and older. 30 # This part of the test is known to fail on Solaris 2.6 and older.
31 31
32 rm -f t-select-in.tmp 32 rm -f t-select-in.tmp
33 ./test-select-fd${EXEEXT} r 0 t-select-in.tmp < /dev/null 33 ${CHECKER} ./test-select-fd${EXEEXT} r 0 t-select-in.tmp < /dev/null
34 test `cat t-select-in.tmp` = "1" || exit 1 34 test `cat t-select-in.tmp` = "1" || exit 1
35 35
36 rm -fr $tmpfiles 36 rm -fr $tmpfiles
37 37
38 exit 0 38 exit 0