The libdisable-npots library is just used as a helper as part of
make test so it should not be installed.
If noinst_* is used then automake will generate a static library but
this won't work with LD_PRELOAD so we then need an extra custom rule
to link that into a shared library. The custom rule uses the $(LINK)
Makefile var which gets put in the Makefile because of the static
library. We pass libtool a stub -rpath option which causes it to
generate a shared library.
Instead of including GL/gl.h directly it now includes cogl/cogl.h
instead which should include the right GL header.
Instead of using dlopen to specifically open libGL it now tries to use
dlsym with RTLD_NEXT. This requires defining _GNU_SOURCE on GNU
systems. If RTLD_NEXT is not available it will try passing NULL which
is unlikely to work but it will at least catch the case where it
returns the wrapper version of glGetString to prevent infinite
recursion.
This should hopefully make it work on OS X where the name of the
header and library are different (although this is currently
untested).
* tests/tools/Makefile.am: Optionally build the
libdisable-npots.la library depending on whether libdl was
detected in the configure script. A helper script is also
generated to setup the LD_PRELOAD.
* tests/conform/Makefile.am: There are now two versions of the
test-report and full-report rules. test-report-normal is the same
as before and test-report-disable-npots runs the tests with the
disable-npots wrapper script. The full-report rule runs both of
them and displays two separate HTML files. The test-report rule
just runs the normal version as before.
* configure.ac: Add a test for libdl
* tests/tools/disable-npots.sh.in: New file. Template for the
helper script
* tests/tools/disable-npots.c: New file
framework
* configure.ac:
* tests/*:
The tests have been reorganised into different categories: conformance,
interactive and micro benchmarks.
- conformance tests can be run as part of automated tests
- interactive tests are basically all the existing tests
- micro benchmarks focus on a single performance metric
I converted the timeline tests to conformance tests and also added some
tests from Neil Roberts and Ebassi.
Note: currently only the conformance tests use the glib test APIs,
though the micro benchmarks should too.
The other change is to make the unit tests link into monolithic binaries
which makes the build time for unit tests considerably faster. To deal
with the extra complexity this adds to debugging individual tests I
have added some sugar to the makefiles so all the tests can be run
directly via a symlink and when an individual test is run this way,
then a note is printed to the terminal explaining exactly how that test
may be debugged using GDB.
There is a convenience make rule: 'make test-report', that will run all
the conformance tests and hopefully even open the results in your web
browser. It skips some of the slower timeline tests, but you can run
those using 'make full-report'