[epiphany/gnome-3-32] Don't run Safe Browsing test by default



commit 46785b8081c2e26820c19747052dfd512e27c042
Author: Michael Catanzaro <mcatanzaro gnome org>
Date:   Wed Feb 20 23:42:59 2019 +0000

    Don't run Safe Browsing test by default
    
    Require opt-in to run network tests.
    
    Our CI has network, so we'll run it there.
    
    Fixes #684
    
    
    (cherry picked from commit ca58a4243180873210265e9b9509edcc52662756)

 .gitlab-ci.yml    |  4 ++--
 meson_options.txt |  6 ++++++
 tests/meson.build | 22 ++++++++++++----------
 3 files changed, 20 insertions(+), 12 deletions(-)
---
diff --git a/.gitlab-ci.yml b/.gitlab-ci.yml
index 80882efb7..4bbaf9228 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'
+    MESON_ARGS: '-Dunit_tests=true -Dnetwork_tests=true'
     APP_ID: 'org.gnome.Epiphany'
 
 review:
@@ -20,4 +20,4 @@ review:
   extends: '.review'
 
 stop_review:
-  extends: '.stop_review'
\ No newline at end of file
+  extends: '.stop_review'
diff --git a/meson_options.txt b/meson_options.txt
index 4a61f9597..62f6c6e11 100644
--- a/meson_options.txt
+++ b/meson_options.txt
@@ -4,6 +4,12 @@ option('developer_mode',
   description: 'Enable developer mode'
 )
 
+option('network_tests',
+  type: 'boolean',
+  value: false,
+  description: 'Enable tests that require network access, if unit_tests are enabled'
+)
+
 option('tech_preview',
   type: 'boolean',
   value: false,
diff --git a/tests/meson.build b/tests/meson.build
index 6294f4e92..bfabf6e2c 100644
--- a/tests/meson.build
+++ b/tests/meson.build
@@ -64,16 +64,6 @@ if get_option('unit_tests')
        env: envs
   )
 
-  gsb_service_test = executable('test-ephy-gsb-service',
-    'ephy-gsb-service-test.c',
-    dependencies: ephymain_dep
-  )
-  test('GSB service test',
-       gsb_service_test,
-       env: envs,
-       timeout: 90 # slow!
-  )
-
   history_test = executable('test-ephy-history',
     'ephy-history-test.c',
     dependencies: ephymain_dep
@@ -178,4 +168,16 @@ if get_option('unit_tests')
   #      web_view_test,
   #      env: envs
   # )
+
+  if get_option('network_tests')
+    gsb_service_test = executable('test-ephy-gsb-service',
+      'ephy-gsb-service-test.c',
+      dependencies: ephymain_dep
+    )
+    test('GSB service test',
+         gsb_service_test,
+         env: envs,
+         timeout: 90 # slow!
+    )
+  endif
 endif


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