3 topdir=$(cd $(dirname $0)/.. && pwd)
4 export AUGEAS_LENS_LIB=${topdir}/lenses
5 export AUGEAS_ROOT=${topdir}/build/try
7 AUGCMDS=${topdir}/build/augcmds.txt
8 GDBCMDS=${topdir}/build/gdbcmds.txt
11 cp -pr ${topdir}/tests/root $AUGEAS_ROOT
12 find $AUGEAS_ROOT -name \*.augnew\* | xargs -r rm
14 if [[ ! -f $AUGCMDS ]] ; then
20 if [[ ! -f $GDBCMDS ]] ; then
22 run --nostdinc -I $AUGEAS_LENS_LIB -r $AUGEAS_ROOT < $AUGCMDS
27 if [[ "x$1" == "xgdb" ]] ; then
28 [[ -n "$EMACS" ]] && int="-i=mi"
29 exec libtool --mode=execute gdb $int -x $GDBCMDS ./augtool
30 elif [[ "x$1" == "xstrace" ]] ; then
31 libtool --mode=execute /usr/bin/strace ./augtool --nostdinc < $AUGCMDS
32 elif [[ "x$1" == "xvalgrind" ]] ; then
34 libtool --mode=execute valgrind --leak-check=full ./augtool --nostdinc "$@" < $AUGCMDS
35 elif [[ "x$1" == "xcallgrind" ]] ; then
36 libtool --mode=execute valgrind --tool=callgrind ./augtool --nostdinc < $AUGCMDS
37 elif [[ "x$1" == "xcli" ]] ; then
39 exec ./augtool --nostdinc "$@"
41 ./augtool --nostdinc "$@" < $AUGCMDS
43 for f in $(find $AUGEAS_ROOT -name \*.augnew); do
45 diff -u ${f%.augnew} $f