Skip to content

Commit

Permalink
Skip wrapdb test if there is no connectivity.
Browse files Browse the repository at this point in the history
  • Loading branch information
jpakkane committed Oct 25, 2022
1 parent 8c5838b commit 3c0ac62
Showing 1 changed file with 9 additions and 0 deletions.
9 changes: 9 additions & 0 deletions unittests/platformagnostictests.py
Original file line number Diff line number Diff line change
Expand Up @@ -98,7 +98,16 @@ def test_new_subproject_reconfigure(self):
self.setconf('-Dfoo=enabled')
self.build('reconfigure')

def check_connectivity(self):
import urllib
try:
with urllib.request.urlopen('https://wrapdb.mesonbuild.com') as p:
pass
except urllib.error.URLError as e:
self.skipTest('No internet connectivity: ' + str(e))

def test_update_wrapdb(self):
self.check_connectivity()
# Write the project into a temporary directory because it will add files
# into subprojects/ and we don't want to pollute meson source tree.
with tempfile.TemporaryDirectory() as testdir:
Expand Down

0 comments on commit 3c0ac62

Please sign in to comment.