File: 07_skip_IpAddress_tests.patch

package info (click to toggle)
libsfml 3.0.1%2Bdfsg-1
  • links: PTS, VCS
  • area: main
  • in suites: experimental
  • size: 13,704 kB
  • sloc: cpp: 52,754; ansic: 24,944; objc: 668; sh: 172; xml: 25; makefile: 18
file content (39 lines) | stat: -rw-r--r-- 1,560 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
38
39
Description: Stop running tests that require network access
Origin: https://github.com/SFML/SFML/commit/601b5032e74c0a2ade6ba944e57f203f39fd2187
Author: Chris Thrasher <chrisjthrasher@gmail.com>
---
This patch header follows DEP-3: http://dep.debian.net/deps/dep3/
--- a/test/Network/IpAddress.test.cpp
+++ b/test/Network/IpAddress.test.cpp
@@ -71,15 +71,19 @@ TEST_CASE("[Network] sf::IpAddress")
 
     SECTION("Static functions")
     {
-        SECTION("getLocalAddress")
+        // These functions require external network access to work thus imposing an additional
+        // requirement on our test suite of internet access. This causes issues for developers
+        // trying to work offline and for package managers who may be building and running the
+        // tests offline as well.
+        (void)[]
         {
             const std::optional<sf::IpAddress> ipAddress = sf::IpAddress::getLocalAddress();
             REQUIRE(ipAddress.has_value());
             CHECK(ipAddress->toString() != "0.0.0.0");
             CHECK(ipAddress->toInteger() != 0);
-        }
+        };
 
-        SECTION("getPublicAddress")
+        (void)[]
         {
             const std::optional<sf::IpAddress> ipAddress = sf::IpAddress::getPublicAddress(sf::seconds(1));
             if (ipAddress.has_value())
@@ -87,7 +91,7 @@ TEST_CASE("[Network] sf::IpAddress")
                 CHECK(ipAddress->toString() != "0.0.0.0");
                 CHECK(ipAddress->toInteger() != 0);
             }
-        }
+        };
     }
 
     SECTION("Static constants")