[libvirt PATCH 017/351] meson: add expensive_tests build option

[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

 



Signed-off-by: Pavel Hrdina <phrdina@xxxxxxxxxx>
---
 configure.ac      | 21 ---------------------
 meson.build       |  6 ++++++
 meson_options.txt |  1 +
 3 files changed, 7 insertions(+), 21 deletions(-)

diff --git a/configure.ac b/configure.ac
index 71766f2fe61..7b370f4f1be 100644
--- a/configure.ac
+++ b/configure.ac
@@ -616,27 +616,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) ;;
diff --git a/meson.build b/meson.build
index fee75204d27..e48525d9d22 100644
--- a/meson.build
+++ b/meson.build
@@ -128,6 +128,12 @@ endif
 
 use_test_suite = get_option('test_suite')
 
+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
 
diff --git a/meson_options.txt b/meson_options.txt
index 6973b9f6587..f0c4f93ad16 100644
--- a/meson_options.txt
+++ b/meson_options.txt
@@ -4,3 +4,4 @@ option('packager_version', type: 'string', value: '', description: 'Extra packag
 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('test_suite', type: 'boolean', value: true, description: 'Whether to enable and build test suite by default')
+option('expensive_tests', type: 'feature', value: 'auto', description: 'set the default for enabling expensive tests (long timeouts), use VIR_TEST_EXPENSIVE to override')
-- 
2.26.2




[Index of Archives]     [Virt Tools]     [Libvirt Users]     [Lib OS Info]     [Fedora Users]     [Fedora Desktop]     [Fedora SELinux]     [Big List of Linux Books]     [Yosemite News]     [KDE Users]     [Fedora Tools]

  Powered by Linux