Changeset 2519


Ignore:
Timestamp:
Jul 11, 2011, 5:11:27 PM (10 years ago)
Author:
Peter
Message:

new functions in common_defs (taken from svndigest's test suite). using these functions in doxygen_test to simplify syntax.

Location:
trunk/test
Files:
2 edited

Legend:

Unmodified
Added
Removed
  • trunk/test/common_defs.sh.in

    r2517 r2519  
    2020
    2121
    22 # function copied from GNU Automake 1.10.2
    23 #
    24 # is_newest FILE FILES
    25 # --------------------
    26 # Return false if any file in FILES is newer than FILE.
    27 # Resolve ties in favor of FILE.
    28 is_newest ()
    29 {
    30   test x`find "$@" -newer "$1"` = x
    31 }
    32 
    33 #
     22# bootstrap a test project
    3423#
    3524bootstrap ()
     
    6352}
    6453
     54Exit () { set +x; exit $1; }
     55warn_ () { echo $@ >&2; }
     56exit_fail () { warn_ "$me: failed test: $@"; Exit 1; }
     57exit_fatal () { warn_ "$me: hard error: $@"; Exit 99; }
     58exit_skip () { warn_ "$me: skipped test: $@"; Exit 77; }
     59exit_success () { echo "$me: successsful test: $@"; Exit 0; }
     60
    6561me=$0
    6662
     
    8076      ver_minor=`echo ${version_am} | cut -f 2 -d '.'`
    8177      test ${ver_major} -gt 1 || test ${ver_minor} -ge 10 || exit 77
     78      ;;
     79      doxygen)
     80      test @have_doxygen@ = "yes" || exit_skip no doxygen
    8281      ;;
    8382      libtool)
  • trunk/test/doxygen_test.sh

    r2518 r2519  
    2323
    2424required=doxygen
    25 . ./common_defs.sh || exit 1
    26 
    27 if test $have_doxygen = "no"; then
    28     echo Skipped;
    29     exit 77;
    30 fi
     25. ./common_defs.sh || exit 99
    3126
    3227printf "doxygen "
    3328$DOXYGEN --version
    34 (cd $abs_top_builddir/doc && make doc < /dev/null) || exit 1
    35 if test ! -e $abs_top_builddir/doc/doxygen.error; then
    36     echo Cannot find file: $abs_top_builddir/doc/doxygen.error
    37     exit 1;
    38 fi
    39 if test -s $abs_top_builddir/doc/doxygen.error; then
     29(cd $abs_top_builddir/doc && make doc < /dev/null) || exit_fail
    4030
    41     cat $abs_top_builddir/doc/doxygen.error
    42     exit 1;
    43 fi
    44 echo Test is OK
    45 
    46 exit 0
     31cat $abs_top_builddir/doc/doxygen.error || test_fail
     32test -s $abs_top_builddir/doc/doxygen.error && exit_fail
     33exit_success
Note: See TracChangeset for help on using the changeset viewer.