File: tests-no-network.diff

package info (click to toggle)
tellico 3.3.5-1
  • links: PTS, VCS
  • area: main
  • in suites: bullseye
  • size: 23,468 kB
  • sloc: cpp: 73,731; xml: 8,383; ansic: 7,003; javascript: 3,059; python: 603; perl: 63; ada: 32; sh: 28; makefile: 22
file content (37 lines) | stat: -rw-r--r-- 1,023 bytes parent folder | download
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
Author: Pino Toscano <pino@debian.org>
Description: Make sure the network is considered unavailable.
Last-Updated: 2020-04-23
Forwarded: not-needed

--- a/src/tests/tellicoreadtest.cpp
+++ b/src/tests/tellicoreadtest.cpp
@@ -46,11 +46,13 @@ QTEST_GUILESS_MAIN( TellicoReadTest )
 #define TELLICOREAD_NUMBER_OF_CASES 10
 
 static bool hasNetwork() {
+#if 0
   foreach(const QNetworkInterface& net, QNetworkInterface::allInterfaces()) {
     if(net.flags().testFlag(QNetworkInterface::IsUp) && !net.flags().testFlag(QNetworkInterface::IsLoopBack)) {
       return true;
     }
   }
+#endif
   return false;
 }
 
--- a/src/tests/imagejobtest.cpp
+++ b/src/tests/imagejobtest.cpp
@@ -37,11 +37,13 @@
 QTEST_GUILESS_MAIN( ImageJobTest )
 
 static bool hasNetwork() {
+#if 0
   foreach(const QNetworkInterface& net, QNetworkInterface::allInterfaces()) {
     if(net.flags().testFlag(QNetworkInterface::IsUp) && !net.flags().testFlag(QNetworkInterface::IsLoopBack)) {
       return true;
     }
   }
+#endif
   return false;
 }