4 # Thorsten "mirabilos" Glaser <tg@mirbsd.org>
6 # Provided that these terms and disclaimer and all copyright notices
7 # are retained or reproduced in an accompanying document, permission
8 # is granted to deal in this work without restriction, including un-
9 # limited rights to use, publicly perform, distribute, sell, modify,
10 # merge, give away, or sublicence.
12 # This work is provided "AS IS" and WITHOUT WARRANTY of any kind, to
13 # the utmost extent permitted by applicable law, neither express nor
14 # implied; without malicious intent or gross negligence. In no event
15 # may a licensor, author or contributor be held liable for indirect,
16 # direct, other damage, loss, or other issues arising in any way out
17 # of dealing in the work, even if advised of the possibility of such
18 # damage or existence of a defect, except proven that it results out
19 # of said person's immediate fault when using the work as intended.
28 test -s uclibcng-testrunner.
in || die uclibcng-testrunner.
in not found
32 while read expected_ret tst_src_name binary_name subdir cmd
; do
33 printf '.... %s\r' "$binary_name"
34 (cd $subdir && eval "$cmd" >$binary_name.out
2>&1) </dev
/null
36 test $ret = "$expected_ret" ||
{
37 echo "FAIL $binary_name got $ret expected $expected_ret"
38 nfail
=`expr $nfail + 1`
39 sed 's/^/ /' <$subdir/$binary_name.out
42 for x
in $binary_name.out
$test_src_name.out
-; do
43 if test x
"$x" = x
"-"; then
44 echo "PASS $binary_name"
45 npass
=`expr $npass + 1`
48 test -e "$subdir/$x.good" ||
continue
49 if d
=`diff -u "$subdir/$binary_name.out" "$subdir/$x.good"`; then
50 echo "PASS $binary_name"
51 npass
=`expr $npass + 1`
53 echo "FAIL $binary_name expected output differs"
54 nfail
=`expr $nfail + 1`
55 echo "$d" |
sed 's/^/ /'
59 done <uclibcng-testrunner.
in
60 echo Total failed
: $nfail
61 echo Total passed
: $npass