diff options
author | Jussi Pakkanen <jpakkane@gmail.com> | 2022-10-25 01:05:02 +0300 |
---|---|---|
committer | Jussi Pakkanen <jpakkane@gmail.com> | 2022-10-25 01:05:02 +0300 |
commit | 4a32b21a0fc0c22802aa92cf0032e6a006d6c241 (patch) | |
tree | 0038fdf378b968733c37ec18930b378bf3ff74ad | |
parent | 458dcf8aac74903380c2adceb2b16a87f231b42b (diff) | |
download | meson-checknetworkd.zip meson-checknetworkd.tar.gz meson-checknetworkd.tar.bz2 |
Skip wrapdb test if there is no connectivity.checknetworkd
-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..fd53934 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 urrlib.urlopen('https://wrapdb.mesonbuild.com') as p: + pass + except: + skipTest('No internet connectivity.') + 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: |