diff options
author | Jussi Pakkanen <jpakkane@gmail.com> | 2022-10-25 01:05:02 +0300 |
---|---|---|
committer | Jussi Pakkanen <jpakkane@gmail.com> | 2022-10-25 11:21:37 +0300 |
commit | 3c0ac626d7bbf667762b72a8b075617763e17795 (patch) | |
tree | f2f472b08a408e9614bb6afc628315e93f5bfafc /unittests/platformagnostictests.py | |
parent | 8c5838bfea64c47fe2b99008b832636603560865 (diff) | |
download | meson-3c0ac626d7bbf667762b72a8b075617763e17795.zip meson-3c0ac626d7bbf667762b72a8b075617763e17795.tar.gz meson-3c0ac626d7bbf667762b72a8b075617763e17795.tar.bz2 |
Skip wrapdb test if there is no connectivity.
Diffstat (limited to 'unittests/platformagnostictests.py')
-rw-r--r-- | unittests/platformagnostictests.py | 9 |
1 files changed, 9 insertions, 0 deletions
diff --git a/unittests/platformagnostictests.py b/unittests/platformagnostictests.py index fc40442..845d4e5 100644 --- a/unittests/platformagnostictests.py +++ b/unittests/platformagnostictests.py @@ -98,7 +98,16 @@ class PlatformAgnosticTests(BasePlatformTests): 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: |