0003-meson-add-tests-option.patch 3.0 KB

12345678910111213141516171819202122232425262728293031323334353637383940414243444546474849505152535455565758596061626364656667686970717273747576777879808182838485868788899091929394
  1. From c24f6cc8f847a4f90cd8fe0f94604862c5ac4a5e Mon Sep 17 00:00:00 2001
  2. From: Romain Naour <romain.naour@gmail.com>
  3. Date: Mon, 21 Dec 2020 22:12:14 +0100
  4. Subject: [PATCH] meson: add tests option
  5. tests/fp/fp-bench.c use fenv.h that is not always provided
  6. by the libc (uClibc).
  7. To workaround this issue, add an new meson option to
  8. disable tests while building Qemu.
  9. Fixes:
  10. http://autobuild.buildroot.net/results/53f5d8baa994d599b9da013ee643b82353366ec3/build-end.log
  11. Signed-off-by: Romain Naour <romain.naour@gmail.com>
  12. Signed-off-by: Adam Duskett <aduskett@gmail.com>
  13. Refresh for 6.0.0
  14. ---
  15. configure | 7 +++++++
  16. meson.build | 5 ++++-
  17. meson_options.txt | 2 ++
  18. 3 files changed, 13 insertions(+), 1 deletion(-)
  19. diff --git a/configure b/configure
  20. index 18c26e0389..7cceae4418 100755
  21. --- a/configure
  22. +++ b/configure
  23. @@ -460,6 +460,7 @@ meson=""
  24. ninja=""
  25. skip_meson=no
  26. gettext="auto"
  27. +tests="auto"
  28. fuse="auto"
  29. fuse_lseek="auto"
  30. multiprocess="auto"
  31. @@ -1549,6 +1550,10 @@ for opt do
  32. ;;
  33. --disable-libdaxctl) libdaxctl=no
  34. ;;
  35. + --disable-tests) tests="disabled"
  36. + ;;
  37. + --enable-tests) tests="enabled"
  38. + ;;
  39. --enable-fuse) fuse="enabled"
  40. ;;
  41. --disable-fuse) fuse="disabled"
  42. @@ -1915,6 +1920,7 @@ disabled with --disable-FEATURE, default is enabled if available
  43. xkbcommon xkbcommon support
  44. rng-none dummy RNG, avoid using /dev/(u)random and getrandom()
  45. libdaxctl libdaxctl support
  46. + tests build tests
  47. fuse FUSE block device export
  48. fuse-lseek SEEK_HOLE/SEEK_DATA support for FUSE exports
  49. multiprocess Out of process device emulation support
  50. @@ -6422,6 +6428,7 @@ NINJA=$ninja $meson setup \
  51. -Dzstd=$zstd -Dseccomp=$seccomp -Dvirtfs=$virtfs -Dcap_ng=$cap_ng \
  52. -Dattr=$attr -Ddefault_devices=$default_devices \
  53. -Ddocs=$docs -Dsphinx_build=$sphinx_build -Dinstall_blobs=$blobs \
  54. + -Dtests=$tests \
  55. -Dvhost_user_blk_server=$vhost_user_blk_server -Dmultiprocess=$multiprocess \
  56. -Dfuse=$fuse -Dfuse_lseek=$fuse_lseek -Dguest_agent_msi=$guest_agent_msi \
  57. $(if test "$default_features" = no; then echo "-Dauto_features=disabled"; fi) \
  58. diff --git a/meson.build b/meson.build
  59. index e3386196ba..7f4efdc347 100644
  60. --- a/meson.build
  61. +++ b/meson.build
  62. @@ -2381,7 +2381,10 @@ subdir('scripts')
  63. subdir('tools')
  64. subdir('pc-bios')
  65. subdir('docs')
  66. -subdir('tests')
  67. +if get_option('tests').enabled()
  68. + subdir('tests')
  69. +endif
  70. +
  71. if gtk.found()
  72. subdir('po')
  73. endif
  74. diff --git a/meson_options.txt b/meson_options.txt
  75. index f6f64785fe..81bffbfe87 100644
  76. --- a/meson_options.txt
  77. +++ b/meson_options.txt
  78. @@ -111,6 +111,8 @@ option('fuse_lseek', type : 'feature', value : 'auto',
  79. option('vhost_user_blk_server', type: 'feature', value: 'auto',
  80. description: 'build vhost-user-blk server')
  81. +option('tests', type : 'feature', value : 'auto',
  82. + description: 'Tests build support')
  83. option('virtfs', type: 'feature', value: 'auto',
  84. description: 'virtio-9p support')
  85. option('virtiofsd', type: 'feature', value: 'auto',
  86. --
  87. 2.29.2