public inbox for gentoo-commits@lists.gentoo.org
 help / color / mirror / Atom feed
From: "Mart Raudsepp" <leio@gentoo.org>
To: gentoo-commits@lists.gentoo.org
Subject: [gentoo-commits] repo/gentoo:master commit in: dev-libs/libgweather/, dev-libs/libgweather/files/
Date: Sun, 30 Aug 2020 07:40:12 +0000 (UTC)	[thread overview]
Message-ID: <1598773200.9714e5edfb5f13d1ae6af6a05d91430578427fc0.leio@gentoo> (raw)

commit:     9714e5edfb5f13d1ae6af6a05d91430578427fc0
Author:     Mart Raudsepp <leio <AT> gentoo <DOT> org>
AuthorDate: Sun Aug 30 07:39:07 2020 +0000
Commit:     Mart Raudsepp <leio <AT> gentoo <DOT> org>
CommitDate: Sun Aug 30 07:40:00 2020 +0000
URL:        https://gitweb.gentoo.org/repo/gentoo.git/commit/?id=9714e5ed

dev-libs/libgweather: automatically skip network test when sandboxed

Closes: https://bugs.gentoo.org/739592
Package-Manager: Portage-2.3.103, Repoman-2.3.20
Signed-off-by: Mart Raudsepp <leio <AT> gentoo.org>

 .../files/3.36.1-autoskip-network-test.patch       | 30 ++++++++++++++++++++++
 dev-libs/libgweather/libgweather-3.36.1.ebuild     |  1 +
 2 files changed, 31 insertions(+)

diff --git a/dev-libs/libgweather/files/3.36.1-autoskip-network-test.patch b/dev-libs/libgweather/files/3.36.1-autoskip-network-test.patch
new file mode 100644
index 00000000000..d6b3d2f6131
--- /dev/null
+++ b/dev-libs/libgweather/files/3.36.1-autoskip-network-test.patch
@@ -0,0 +1,30 @@
+From f2bacee194ce58aabf5a08752556177bda6ab570 Mon Sep 17 00:00:00 2001
+From: Mart Raudsepp <leio@gentoo.org>
+Date: Sun, 30 Aug 2020 10:35:13 +0300
+Subject: [PATCH] tests: Skip metar tests when METAR_SOURCES couldn't be
+ resolved
+
+---
+ libgweather/test_libgweather.c | 6 ++++++
+ 1 file changed, 6 insertions(+)
+
+diff --git a/libgweather/test_libgweather.c b/libgweather/test_libgweather.c
+index 8a21911..ef401f8 100644
+--- a/libgweather/test_libgweather.c
++++ b/libgweather/test_libgweather.c
+@@ -419,6 +419,12 @@ test_metar_weather_stations (void)
+     msg = soup_message_new ("GET", METAR_SOURCES);
+     session = soup_session_new ();
+     soup_session_send_message (session, msg);
++    if (msg->status_code == SOUP_STATUS_CANT_RESOLVE) {
++        g_test_skip ("Could not resolve " METAR_SOURCES " - network sandboxed?");
++        g_object_unref (session);
++        g_object_unref (msg);
++        return;
++    }
+     g_assert (SOUP_STATUS_IS_SUCCESSFUL (msg->status_code));
+     g_object_unref (session);
+     g_assert_nonnull (msg->response_body);
+-- 
+2.20.1
+

diff --git a/dev-libs/libgweather/libgweather-3.36.1.ebuild b/dev-libs/libgweather/libgweather-3.36.1.ebuild
index 0db353126e4..ae7a41a1cc9 100644
--- a/dev-libs/libgweather/libgweather-3.36.1.ebuild
+++ b/dev-libs/libgweather/libgweather-3.36.1.ebuild
@@ -41,6 +41,7 @@ BDEPEND="
 PATCHES=(
 	"${FILESDIR}"/3.32.1-meson-tweaks.patch # Provide introspection optionality and don't build tests that aren't ran automatically
 	"${FILESDIR}"/3.36.1-tests-locale.patch # Don't fail tests when a locale is not present, https://gitlab.gnome.org/GNOME/libgweather/-/merge_requests/58
+	"${FILESDIR}"/3.36.1-autoskip-network-test.patch
 )
 
 src_prepare() {


             reply	other threads:[~2020-08-30  7:40 UTC|newest]

Thread overview: 5+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2020-08-30  7:40 Mart Raudsepp [this message]
  -- strict thread matches above, loose matches on Subject: below --
2021-04-15 15:36 [gentoo-commits] repo/gentoo:master commit in: dev-libs/libgweather/, dev-libs/libgweather/files/ Matt Turner
2021-03-27 21:47 Matt Turner
2020-08-30  7:40 Mart Raudsepp
2020-02-08 20:12 Matt Turner

Reply instructions:

You may reply publicly to this message via plain-text email
using any one of the following methods:

* Save the following mbox file, import it into your mail client,
  and reply-to-all from there: mbox

  Avoid top-posting and favor interleaved quoting:
  https://en.wikipedia.org/wiki/Posting_style#Interleaved_style

* Reply using the --to, --cc, and --in-reply-to
  switches of git-send-email(1):

  git send-email \
    --in-reply-to=1598773200.9714e5edfb5f13d1ae6af6a05d91430578427fc0.leio@gentoo \
    --to=leio@gentoo.org \
    --cc=gentoo-commits@lists.gentoo.org \
    --cc=gentoo-dev@lists.gentoo.org \
    /path/to/YOUR_REPLY

  https://kernel.org/pub/software/scm/git/docs/git-send-email.html

* If your mail client supports setting the In-Reply-To header
  via mailto: links, try the mailto: link
Be sure your reply has a Subject: header at the top and a blank line before the message body.
This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox