]> git.ipfire.org Git - thirdparty/libvirt.git/commitdiff
meson: add expensive_tests build option
authorPavel Hrdina <phrdina@redhat.com>
Fri, 24 Jul 2020 14:07:05 +0000 (16:07 +0200)
committerPavel Hrdina <phrdina@redhat.com>
Mon, 3 Aug 2020 07:26:53 +0000 (09:26 +0200)
Signed-off-by: Pavel Hrdina <phrdina@redhat.com>
Reviewed-by: Ján Tomko <jtomko@redhat.com>
Reviewed-by: Peter Krempa <pkrempa@redhat.com>
Reviewed-by: Neal Gompa <ngompa13@gmail.com>
configure.ac
meson.build
meson_options.txt

index a533610c6cf081a33bcc4f4628460909007faad9..f7e665bd4556a3e5f1b77daf765b304e6a9f975b 100644 (file)
@@ -614,27 +614,6 @@ if test -z "$PERL"; then
          AC_MSG_ERROR(['perl' binary is required to build libvirt])
 fi
 
-LIBVIRT_ARG_ENABLE([EXPENSIVE_TESTS],
-                   [set the default for enabling expensive tests ]
-                     [(long timeouts), use VIR_TEST_EXPENSIVE to ]
-                     [override during make],
-                   [check])
-case "$enable_expensive_tests" in
-  0|no) VIR_TEST_EXPENSIVE_DEFAULT=0 ;;
-  1|yes) VIR_TEST_EXPENSIVE_DEFAULT=1 ;;
-  check) ;;
-  *) AC_MSG_ERROR([bad value ${enable_expensive_tests} for enable-expensive-tests option]) ;;
-esac
-if test "$enable_expensive_tests" = check; then
-  if test -d $srcdir/.git ; then
-    VIR_TEST_EXPENSIVE_DEFAULT=0
-  else
-    VIR_TEST_EXPENSIVE_DEFAULT=1
-  fi
-fi
-AC_SUBST([VIR_TEST_EXPENSIVE_DEFAULT])
-AM_CONDITIONAL([WITH_EXPENSIVE_TESTS], [test $VIR_TEST_EXPENSIVE_DEFAULT = 1])
-
 LIBVIRT_ARG_ENABLE([TEST_COVERAGE], [turn on code coverage instrumentation], [no])
 case "$enable_test_coverage" in
   yes|no) ;;
index 61546f38afdb5a9dc8d7f2464cb3c98804d0b12a..f9173b1acd656fc8cd7fcd7a79e8b0b9668fa077 100644 (file)
@@ -129,6 +129,15 @@ if packager_version != ''
 endif
 
 
+# test options
+
+if get_option('expensive_tests').auto()
+  use_expensive_tests = not git
+else
+  use_expensive_tests = get_option('expensive_tests').enabled()
+endif
+
+
 # figure out libvirt version strings
 
 arr_version = meson.project_version().split('.')
index 7bb283177cf503109110d9fa0525e0e5ae0e4126..390c7d33fa94e112a6e8a6d0c3b02bbae964b304 100644 (file)
@@ -4,3 +4,4 @@ option('packager', type: 'string', value: '', description: 'Extra packager name'
 option('packager_version', type: 'string', value: '', description: 'Extra packager version')
 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')