2011-05-05 22:34:38 +00:00
|
|
|
#!/bin/sh
|
|
|
|
|
2012-02-23 12:30:51 +00:00
|
|
|
UNIT_TEST=$1
|
2011-05-05 22:34:38 +00:00
|
|
|
shift
|
|
|
|
|
2012-02-23 12:30:51 +00:00
|
|
|
test -z ${UNIT_TEST} && {
|
|
|
|
echo "Usage: $0 UNIT_TEST"
|
2011-05-05 22:34:38 +00:00
|
|
|
exit 1
|
|
|
|
}
|
|
|
|
|
2012-02-23 12:30:51 +00:00
|
|
|
UNIT_TEST=`echo $UNIT_TEST|sed 's/-/_/g'`
|
2011-05-05 22:34:38 +00:00
|
|
|
|
2012-02-23 12:30:51 +00:00
|
|
|
echo "Running: ./test-conformance ${UNIT_TEST} $@"
|
2011-05-05 22:34:38 +00:00
|
|
|
echo ""
|
2012-02-23 12:30:51 +00:00
|
|
|
if test -f @abs_builddir@/test-conformance; then
|
|
|
|
TEST_CONFORMANCE=@abs_builddir@/test-conformance
|
|
|
|
elif test -f @abs_builddir@/test-conformance.exe; then
|
|
|
|
TEST_CONFORMANCE=@abs_builddir@/test-conformance.exe
|
|
|
|
fi
|
|
|
|
COGL_TEST_VERBOSE=1 $TEST_CONFORMANCE ${UNIT_TEST} "$@"
|
2011-11-30 11:20:11 +00:00
|
|
|
exit_val=$?
|
2011-05-05 22:34:38 +00:00
|
|
|
|
|
|
|
echo ""
|
|
|
|
echo "NOTE: For debugging purposes, you can run this single test as follows:"
|
|
|
|
echo "$ libtool --mode=execute \\"
|
|
|
|
echo " gdb --eval-command=\"b ${UNIT_TEST}\" \\"
|
2012-02-23 12:30:51 +00:00
|
|
|
echo " --args ./test-conformance ${UNIT_TEST}"
|
2011-05-05 22:34:38 +00:00
|
|
|
echo "or:"
|
|
|
|
echo "$ env G_SLICE=always-malloc \\"
|
|
|
|
echo " libtool --mode=execute \\"
|
2012-02-23 12:30:51 +00:00
|
|
|
echo " valgrind ./test-conformance ${UNIT_TEST}"
|
2011-11-30 11:20:11 +00:00
|
|
|
|
|
|
|
exit $exit_val
|