AC_MSG_ERROR(['perl' binary is required to build libvirt])
fi
-LIBVIRT_ARG_ENABLE([TEST_COVERAGE], [turn on code coverage instrumentation], [no])
-case "$enable_test_coverage" in
- yes|no) ;;
- *) AC_MSG_ERROR([bad value ${enable_test_coverga} for test-coverage option]) ;;
-esac
-
-if test "$enable_test_coverage" = yes; then
- save_WARN_CFLAGS=$WARN_CFLAGS
- WARN_CFLAGS=
- gl_WARN_ADD([-fprofile-arcs])
- gl_WARN_ADD([-ftest-coverage])
- COVERAGE_FLAGS=$WARN_CFLAGS
- AC_SUBST([COVERAGE_CFLAGS], [$COVERAGE_FLAGS])
- AC_SUBST([COVERAGE_LDFLAGS], [$COVERAGE_FLAGS])
- WARN_CFLAGS=$save_WARN_CFLAGS
-fi
-
dnl MinGW checks
LIBVIRT_WIN_CHECK_COMMON
LIBVIRT_WIN_CHECK_MINGW
LIBVIRT_WIN_RESULT_COMMON
LIBVIRT_WIN_RESULT_WINDRES
AC_MSG_NOTICE([])
-AC_MSG_NOTICE([Test suite])
-AC_MSG_NOTICE([])
-LIBVIRT_RESULT([Coverage], [$enable_test_coverage])
-AC_MSG_NOTICE([])
AC_MSG_NOTICE([Miscellaneous])
AC_MSG_NOTICE([])
LIBVIRT_RESULT([Use -Werror], [$enable_werror])
use_expensive_tests = get_option('expensive_tests').enabled()
endif
+coverage_flags = []
+if get_option('test_coverage')
+ coverage_flags = [
+ '-fprofile-arcs',
+ '-ftest-coverage',
+ ]
+endif
+
# figure out libvirt version strings
# generate meson-config.h file
configure_file(output: 'meson-config.h', configuration: conf)
+
+
+# print configuration summary
+
+test_summary = {
+ 'Coverage': coverage_flags.length() > 0,
+}
+summary(test_summary, section: 'Test suite', bool_yn: true)
option('system', type: 'boolean', value: false, description: 'Set install paths to system ones')
option('runstatedir', type: 'string', value: '', description: 'State directory for temporary sockets, pid files, etc')
option('expensive_tests', type: 'feature', value: 'auto', description: 'set the default for enabling expensive tests (long timeouts), use VIR_TEST_EXPENSIVE to override')
+option('test_coverage', type: 'boolean', value: false, description: 'turn on code coverage instrumentation')