mirror of
https://github.com/freebsd/freebsd-src
synced 2024-09-06 09:10:28 +00:00
fb3ef04d20
git-subtree-dir: contrib/unifdef git-subtree-mainline:3b7ffacdee
git-subtree-split:0da4488583
39 lines
578 B
Bash
Executable file
39 lines
578 B
Bash
Executable file
#!/bin/sh
|
|
|
|
export PATH="$(pwd):${PATH}"
|
|
${1:+cd} ${1:-:}
|
|
for cmd in *.sh
|
|
do
|
|
printf .
|
|
t=${cmd%.sh}
|
|
|
|
sh ./${cmd} >${t}.out 2>${t}.err
|
|
echo $? >${t}.rc
|
|
|
|
# strip carriage returns from error output
|
|
# in case we are trying to run on MinGW
|
|
tr -d '
|
|
' >${t}.xerr <${t}.err
|
|
mv ${t}.xerr ${t}.err
|
|
|
|
ok=true
|
|
for e in out err rc
|
|
do
|
|
exp=${t}.exp${e}
|
|
got=${t}.${e}
|
|
if ! cmp -s ${exp} ${got}
|
|
then
|
|
echo
|
|
echo FAILED: ${got}: $(cat ${cmd})
|
|
diff -u ${exp} ${got}
|
|
ok=false
|
|
fi
|
|
done
|
|
|
|
if ${ok}
|
|
then rm -f ${t}.out ${t}.err ${t}.rc
|
|
else rc=1
|
|
fi
|
|
done
|
|
echo
|
|
exit ${rc}
|