bbcbece6c9
This patch reworks our conformance testing framework because it seems that glib's gtesting framework isn't really well suited to our use case. For example we weren't able to test windows builds given the way we were using it and also for each test we'd like to repeat the test with several different environments so we can test important driver and feature combinations. This patch instead switches away to a simplified but custom approach for running our unit tests. We hope that having a more bespoke setup will enable us to easily extend it to focus on the details important to us. Notable changes with this new approach are: We can now run 'make test' for our mingw windows builds. We've got rid of all the test-*report* make rules and we're just left with 'make test' 'make test' now runs each test several times with different driver and feature combinations checking the result for each run. 'make test' will then output a concise table of all of the results. The combinations tested are: - OpenGL Fixed Function - OpenGL ARBfp - OpenGL GLSL - OpenGL No NPOT texture support - OpenGLES 2.0 - OpenGLES 2.0 No NPOT texture support Reviewed-by: Neil Roberts <neil@linux.intel.com>
34 lines
887 B
Bash
Executable File
34 lines
887 B
Bash
Executable File
#!/bin/sh
|
|
|
|
UNIT_TEST=$1
|
|
shift
|
|
|
|
test -z ${UNIT_TEST} && {
|
|
echo "Usage: $0 UNIT_TEST"
|
|
exit 1
|
|
}
|
|
|
|
UNIT_TEST=`echo $UNIT_TEST|sed 's/-/_/g'`
|
|
|
|
echo "Running: ./test-conformance ${UNIT_TEST} $@"
|
|
echo ""
|
|
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} "$@"
|
|
exit_val=$?
|
|
|
|
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}\" \\"
|
|
echo " --args ./test-conformance ${UNIT_TEST}"
|
|
echo "or:"
|
|
echo "$ env G_SLICE=always-malloc \\"
|
|
echo " libtool --mode=execute \\"
|
|
echo " valgrind ./test-conformance ${UNIT_TEST}"
|
|
|
|
exit $exit_val
|