included-tests: generate binary data from test files for inclusion into test binaries
This change moves test data into the binaries rather than reading them from the disk at runtime. 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.
This commit is contained in:
@@ -151,6 +151,7 @@ AC_PATH_PROGS([LUPDATE], [lupdate-qt4 lupdate4 lupdate],, $qt_bin_path:$PATH)
|
||||
AC_PATH_PROG([PROTOC], [protoc],, $protoc_bin_path:$PATH)
|
||||
AC_PATH_PROG(CCACHE,ccache)
|
||||
AC_PATH_PROG(XGETTEXT,xgettext)
|
||||
AC_PATH_PROG(HEXDUMP,hexdump)
|
||||
PKG_PROG_PKG_CONFIG
|
||||
|
||||
## TODO: Remove these hard-coded paths and flags. They are here for the sake of
|
||||
@@ -353,6 +354,12 @@ AX_BOOST_THREAD
|
||||
AX_BOOST_CHRONO
|
||||
|
||||
if test x$use_tests = xyes; then
|
||||
|
||||
if test x$HEXDUMP = x; then
|
||||
AC_MSG_ERROR(hexdump is required for tests)
|
||||
fi
|
||||
|
||||
|
||||
AX_BOOST_UNIT_TEST_FRAMEWORK
|
||||
fi
|
||||
|
||||
|
||||
Reference in New Issue
Block a user