Navigation Menu

Skip to content

Commit

Permalink
upgrade test suite script for easy gdb debugging. (thanks to Sutou-san.)
Browse files Browse the repository at this point in the history
  • Loading branch information
Tetsuro IKEDA committed Oct 29, 2009
1 parent adaa785 commit e2e5807
Showing 1 changed file with 16 additions and 2 deletions.
18 changes: 16 additions & 2 deletions test/run-unit-test.sh
@@ -1,13 +1,27 @@
#!/bin/sh

export BASE_DIR="`dirname $0`"
top_dir="$BASE_DIR/.."

if test -z "$NO_MAKE"; then
make -C $BASE_DIR/../ > /dev/null || exit 1
make -C $top_dir > /dev/null || exit 1
fi

if test -z "$CUTTER"; then
CUTTER="`make -s -C $BASE_DIR echo-cutter`"
fi
export CUTTER

$CUTTER --keep-opening-modules -s $BASE_DIR "$@" $BASE_DIR
CUTTER_ARGS=
CUTTER_WRAPPER=
if test x"$CUTTER_DEBUG" = x"yes"; then
CUTTER_WRAPPER="$top_dir/libtool --mode=execute gdb --args"
CUTTER_ARGS="--keep-opening-modules"
elif test x"$CUTTER_CHECK_LEAK" = x"yes"; then
CUTTER_WRAPPER="$top_dir/libtool --mode=execute valgrind "
CUTTER_WRAPPER="$CUTTER_WRAPPER --leak-check=full --show-reachable=yes -v"
CUTTER_ARGS="--keep-opening-modules"
fi

CUTTER_ARGS="$CUTTER_ARGS -s $BASE_DIR"
$CUTTER_WRAPPER $CUTTER $CUTTER_ARGS "$@" $BASE_DIR

0 comments on commit e2e5807

Please sign in to comment.