This is the first in a line of PRs to address some of the concerns laid out in #2979.
Rather than adding more trickery to deduce where test data should be found, I believe that this is the more reliable solution. This uses the same mechanism as QT to include their assets in the resulting binary rather than reading it from the disk at runtime. Untested as-yet on OSX, but I believe it should work fine there.
Copied from the main commit:
Advantages:
- Tests become distributable.
- Cross-compile friendly. Build on one machine and execute in an arbitrary location on another.
- Easier testing for backports. Users can verify that tests pass without having to track down corresponding test data.
- More trustworthy test results and easier quality assurance as tests make fewer assumptions about their environment.
- Tests could theoretically run at client/daemon startup and exit on failure.
Disadvantages:
- Required 'hexdump' build-dependency. This is a standard bsd tool that should be usable everywhere. It is likely already installed on all build-machines.
- Tests can no longer be fudged after build by altering test-data.