1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
44
45
46
47
48
49
50
51
52
53
54
55
56
57
58
59
60
61
62
63
64
65
66
67
68
69
70
71
72
73
74
75
76
77
78
79
80
81
82
83
84
85
86
87
88
89
90
91
92
93
|
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
|