Pārlūkot izejas kodu

Nicer make check output for our custom tests.

tags/v0.99.beta17
Sam Hocevar sam pirms 15 gadiem
vecāks
revīzija
2559f2d241
3 mainītis faili ar 27 papildinājumiem un 14 dzēšanām
  1. +7
    -3
      test/check-doxygen
  2. +13
    -7
      test/check-source
  3. +7
    -4
      test/check-win32

+ 7
- 3
test/check-doxygen Parādīt failu

@@ -3,12 +3,16 @@
#
# Check for Doxygen warnings
#
if warnings="$(grep -c Warning: ../doc/doxygen.log 2>/dev/null)"; then
echo "error: $warnings warnings in Doxygen generation:"
nfiles="$(grep -c "Parsing file" < ../doc/doxygen.log)"
if nfails="$(grep -c Warning: ../doc/doxygen.log 2>/dev/null)"; then
grep Warning: ../doc/doxygen.log | sed 's/\(.\{75\}\)...*/\1 .../'
fi

echo "$nfiles files, $nfails visible errors in documentation"

if test "$nfails" != "0"; then
exit 1
fi

echo "0 visible errors in documentation"
exit 0


+ 13
- 7
test/check-source Parādīt failu

@@ -3,30 +3,36 @@
#
# Check that we have no tabs or trailing spaces in the source code
#
failure=0
nfails=0
nfiles=0
nlines=0
for dir in caca kernel src cxx examples ruby tools; do
pushd ../$dir >/dev/null
for x in $(make -s echo-sources); do
case "$x" in
*.c|*.cpp|*.h|*.m) ;;
*) continue ;;
*.c|*.cpp|*.h|*.m)
nfiles=$(($nfiles + 1));
nlines=$(($nlines + `wc -l < "$x"`)) ;;
*)
continue ;;
esac
if grep '[[:space:]]$' "$x" >/dev/null 2>&1; then
echo "error: $dir/$x contains trailing spaces"
failure=1
nfails=$(($nfails + 1))
fi
if grep ' ' "$x" >/dev/null 2>&1; then
echo "error: $dir/$x contains tabs"
failure=1
nfails=$(($nfails + 1))
fi
done
popd >/dev/null
done

if test "$failure" != "0"; then
echo "$nfiles files, $nlines lines, $nfails errors in source code"

if test "$nfails" != "0"; then
exit 1
fi

echo "0 errors in source code"
exit 0


+ 7
- 4
test/check-win32 Parādīt failu

@@ -9,19 +9,22 @@ ret=0
config_h_in=$(dirname "$0")/../config.h.in
win32_config_h=$(dirname "$0")/../win32/config.h

failure=0
nfails=0
ntokens=0
for key in $(sed -ne 's/.*#undef *\([A-Za-z0-9_]*\).*/\1/p' "$config_h_in");
do
ntokens=$(($ntokens + 1))
if ! grep '[ef] \<'"$key"'\>' "$win32_config_h" >/dev/null 2>&1; then
echo "error: $key missing from win32/config.h"
failure=1
nfails=$(($nfails + 1))
fi
done

if test "$failure" != "0"; then
echo "$ntokens tokens, $nfails errors in Win32 config.h"

if test "$nfails" != "0"; then
exit 1
fi

echo "0 errors in Win32 config.h"
exit 0


Notiek ielāde…
Atcelt
Saglabāt