[epiphany/gnome-3-32] Use feature type for meson options



commit a42e8c5cfd65a6d4426a67fe0fee3f954fd3589e
Author: Michael Catanzaro <mcatanzaro gnome org>
Date:   Wed Feb 20 23:44:31 2019 +0000

    Use feature type for meson options
    
    This could break anyone currently using -Dunit_tests=false, but probably
    not many people choose that.
    
    
    (cherry picked from commit f2b8170e3d1c100f15269ec6f9e82929b0756be2)

 .gitlab-ci.yml    | 2 +-
 meson_options.txt | 8 ++++----
 tests/meson.build | 4 ++--
 3 files changed, 7 insertions(+), 7 deletions(-)
---
diff --git a/.gitlab-ci.yml b/.gitlab-ci.yml
index 4bbaf9228..f08a3692d 100644
--- a/.gitlab-ci.yml
+++ b/.gitlab-ci.yml
@@ -11,7 +11,7 @@ flatpak:
     FLATPAK_MODULE: 'epiphany'
     # Make sure to keep this in sync with the Flatpak manifest, all arguments
     # are passed except the config-args because we build it ourselves
-    MESON_ARGS: '-Dunit_tests=true -Dnetwork_tests=true'
+    MESON_ARGS: '-Dunit_tests=enabled -Dnetwork_tests=enabled'
     APP_ID: 'org.gnome.Epiphany'
 
 review:
diff --git a/meson_options.txt b/meson_options.txt
index 62f6c6e11..007c56393 100644
--- a/meson_options.txt
+++ b/meson_options.txt
@@ -5,8 +5,8 @@ option('developer_mode',
 )
 
 option('network_tests',
-  type: 'boolean',
-  value: false,
+  type: 'feature',
+  value: 'disabled',
   description: 'Enable tests that require network access, if unit_tests are enabled'
 )
 
@@ -17,7 +17,7 @@ option('tech_preview',
 )
 
 option('unit_tests',
-  type: 'boolean',
-  value: true,
+  type: 'feature',
+  value: 'enabled',
   description: 'Enable unit tests'
 )
diff --git a/tests/meson.build b/tests/meson.build
index bfabf6e2c..b199a2c10 100644
--- a/tests/meson.build
+++ b/tests/meson.build
@@ -5,7 +5,7 @@ envs = [
   'GSETTINGS_BACKEND=memory',
 ]
 
-if get_option('unit_tests')
+if get_option('unit_tests').enabled()
   # FIXME: The tests that need ephy-test-utils are all disabled....
   #
   # libephytestutils = static_library('ephytestutils',
@@ -169,7 +169,7 @@ if get_option('unit_tests')
   #      env: envs
   # )
 
-  if get_option('network_tests')
+  if get_option('network_tests').enabled()
     gsb_service_test = executable('test-ephy-gsb-service',
       'ephy-gsb-service-test.c',
       dependencies: ephymain_dep


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