Files
gentoo/dev-perl/WebService-MusicBrainz/files/1.0.2-no-network-testing.patch
Kent Fredric efc9615fc0 dev-perl/WebService-MusicBrainz: Bump to version 1.0.2
- Network tests now controlled by DIST_TEST_OVERRIDE=network support

Upstream:
- Rewrite using Mojolicious
- Implement version 2.0 of MusicBrainz API

Keywords:
- Dropped ppc/ppc64 due to new Mojolicious dep

Package-Manager: Portage-2.3.5, Repoman-2.3.2
2017-06-05 22:13:20 +12:00

94 lines
1.9 KiB
Diff

From ccae912f85bde814a8286786dea50ecd8afde014 Mon Sep 17 00:00:00 2001
From: Kent Fredric <kentfredric@gmail.com>
Date: Mon, 5 Jun 2017 22:03:46 +1200
Subject: [PATCH] Disable network IO tests when NO_NETWORK_TESTING in ENV
Network tests are sandboxed in Portage in some conditions,
so disabling tests unless explicitly asked for is required.
---
t/Area.t | 7 +++++++
t/Artist.t | 7 +++++++
t/Label.t | 7 +++++++
t/Recording.t | 7 +++++++
t/Release.t | 7 +++++++
5 files changed, 35 insertions(+)
diff --git a/t/Area.t b/t/Area.t
index 143d72a..dd54a70 100644
--- a/t/Area.t
+++ b/t/Area.t
@@ -1,3 +1,10 @@
+BEGIN {
+ if ( $ENV{NO_NETWORK_TESTING} ) {
+ print '1..0 # SKIP Network connections required for this test';
+ exit;
+ }
+}
+
use strict;
use Test::More;
diff --git a/t/Artist.t b/t/Artist.t
index 5b6c47a..cfe2a4c 100644
--- a/t/Artist.t
+++ b/t/Artist.t
@@ -1,3 +1,10 @@
+BEGIN {
+ if ( $ENV{NO_NETWORK_TESTING} ) {
+ print '1..0 # SKIP Network connections required for this test';
+ exit;
+ }
+}
+
use strict;
use Test::More;
diff --git a/t/Label.t b/t/Label.t
index 9da331e..09887ca 100644
--- a/t/Label.t
+++ b/t/Label.t
@@ -1,3 +1,10 @@
+BEGIN {
+ if ( $ENV{NO_NETWORK_TESTING} ) {
+ print '1..0 # SKIP Network connections required for this test';
+ exit;
+ }
+}
+
use strict;
use Test::More;
diff --git a/t/Recording.t b/t/Recording.t
index 4077221..fa28295 100644
--- a/t/Recording.t
+++ b/t/Recording.t
@@ -1,3 +1,10 @@
+BEGIN {
+ if ( $ENV{NO_NETWORK_TESTING} ) {
+ print '1..0 # SKIP Network connections required for this test';
+ exit;
+ }
+}
+
use strict;
use Test::More;
diff --git a/t/Release.t b/t/Release.t
index 146b9fe..1ed12ba 100644
--- a/t/Release.t
+++ b/t/Release.t
@@ -1,3 +1,10 @@
+BEGIN {
+ if ( $ENV{NO_NETWORK_TESTING} ) {
+ print '1..0 # SKIP Network connections required for this test';
+ exit;
+ }
+}
+
use strict;
use Test::More;
--
2.12.2