File: disable_network_tests.patch

package info (click to toggle)
libfinance-quotehist-perl 1.32-1
  • links: PTS, VCS
  • area: main
  • in suites: bullseye
  • size: 288 kB
  • sloc: perl: 1,406; makefile: 4
file content (21 lines) | stat: -rw-r--r-- 544 bytes parent folder | download | duplicates (3)
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
Description: Add check of environmental variable to disable all network
 tests during the build process.
Origin: vendor
Forwarded: not-needed
Author: John Lightsey <lightsey@debian.org>
Reviewed-by: gregor herrmann <gregoa@debian.org>
Last-Update: 2016-07-14

--- a/t/testload.pm
+++ b/t/testload.pm
@@ -87,6 +87,10 @@
 sub network_ok {
   if (! defined $Network_Up) {
     my %ua_parms;
+    if ($ENV{NO_NETWORK}) {
+      $Network_Up = 0;
+      return $Network_Up;
+    }
     if ($ENV{http_proxy}) {
       $ua_parms{env_proxy} = 1;
     }