Changeset 4332


Ignore:
Timestamp:
Feb 8, 2010, 1:40:21 AM (8 years ago)
Author:
Sam Hocevar
Message:

Nicer make check output for our custom tests.

Location:
libcaca/trunk/test
Files:
3 edited

Legend:

Unmodified
Added
Removed
  • libcaca/trunk/test/check-doxygen

    r4320 r4332  
    44# Check for Doxygen warnings
    55#
    6 if warnings="$(grep -c Warning: ../doc/doxygen.log 2>/dev/null)"; then
    7   echo "error: $warnings warnings in Doxygen generation:"
     6nfiles="$(grep -c "Parsing file" < ../doc/doxygen.log)"
     7if nfails="$(grep -c Warning: ../doc/doxygen.log 2>/dev/null)"; then
    88  grep Warning: ../doc/doxygen.log | sed 's/\(.\{75\}\)...*/\1 .../'
     9fi
     10
     11echo "$nfiles files, $nfails visible errors in documentation"
     12
     13if test "$nfails" != "0"; then
    914  exit 1
    1015fi
    1116
    12 echo "0 visible errors in documentation"
    1317exit 0
    1418
  • libcaca/trunk/test/check-source

    r4320 r4332  
    44# Check that we have no tabs or trailing spaces in the source code
    55#
    6 failure=0
     6nfails=0
     7nfiles=0
     8nlines=0
    79for dir in caca kernel src cxx examples ruby tools; do
    810  pushd ../$dir >/dev/null
    911  for x in $(make -s echo-sources); do
    1012    case "$x" in
    11      *.c|*.cpp|*.h|*.m) ;;
    12      *) continue ;;
     13      *.c|*.cpp|*.h|*.m)
     14        nfiles=$(($nfiles + 1));
     15        nlines=$(($nlines + `wc -l < "$x"`)) ;;
     16      *)
     17        continue ;;
    1318    esac
    1419    if grep '[[:space:]]$' "$x" >/dev/null 2>&1; then
    1520      echo "error: $dir/$x contains trailing spaces"
    16       failure=1
     21      nfails=$(($nfails + 1))
    1722    fi
    1823    if grep '   ' "$x" >/dev/null 2>&1; then
    1924      echo "error: $dir/$x contains tabs"
    20       failure=1
     25      nfails=$(($nfails + 1))
    2126    fi
    2227  done
     
    2429done
    2530
    26 if test "$failure" != "0"; then
     31echo "$nfiles files, $nlines lines, $nfails errors in source code"
     32
     33if test "$nfails" != "0"; then
    2734  exit 1
    2835fi
    2936
    30 echo "0 errors in source code"
    3137exit 0
    3238
  • libcaca/trunk/test/check-win32

    r4320 r4332  
    1010win32_config_h=$(dirname "$0")/../win32/config.h
    1111
    12 failure=0
     12nfails=0
     13ntokens=0
    1314for key in $(sed -ne 's/.*#undef *\([A-Za-z0-9_]*\).*/\1/p' "$config_h_in");
    1415do
     16  ntokens=$(($ntokens + 1))
    1517  if ! grep '[ef] \<'"$key"'\>' "$win32_config_h" >/dev/null 2>&1; then
    1618    echo "error: $key missing from win32/config.h"
    17     failure=1
     19    nfails=$(($nfails + 1))
    1820  fi
    1921done
    2022
    21 if test "$failure" != "0"; then
     23echo "$ntokens tokens, $nfails errors in Win32 config.h"
     24
     25if test "$nfails" != "0"; then
    2226  exit 1
    2327fi
    2428
    25 echo "0 errors in Win32 config.h"
    2629exit 0
    2730
Note: See TracChangeset for help on using the changeset viewer.