diff options
author | Ludovic Courtès <ludo@gnu.org> | 2015-02-23 23:41:26 +0100 |
---|---|---|
committer | Ludovic Courtès <ludo@gnu.org> | 2015-02-24 00:01:34 +0100 |
commit | 12d720fd1a9c43019f2d5afa051b45c7633b3ab0 (patch) | |
tree | b79f77aadfa44872d5c5aaf69ca99d6756f57c92 /tests/packages.scm | |
parent | 49685cae2bbe0384d4e0e46d38e9d0e1327e5225 (diff) | |
download | guix-12d720fd1a9c43019f2d5afa051b45c7633b3ab0.tar guix-12d720fd1a9c43019f2d5afa051b45c7633b3ab0.tar.gz |
tests: Factorize the network reachability test.
* guix/tests.scm (network-reachable?): New procedure.
* tests/builders.scm (network-reachable?): Remove.
Replace references to it with calls to the new 'network-reachable?'
procedure.
* tests/derivations.scm (%coreutils): Use 'network-reachable?' instead
of 'getaddrinfo'.
* tests/packages.scm: Likewise.
* tests/union.scm: Likewise.
Diffstat (limited to 'tests/packages.scm')
-rw-r--r-- | tests/packages.scm | 6 |
1 files changed, 2 insertions, 4 deletions
diff --git a/tests/packages.scm b/tests/packages.scm index 851520b343..5725b0a8a9 100644 --- a/tests/packages.scm +++ b/tests/packages.scm @@ -176,8 +176,7 @@ (and (direct-store-path? source) (string-suffix? "utils.scm" source)))) -(unless (false-if-exception (getaddrinfo "www.gnu.org" "80" AI_NUMERICSERV)) - (test-skip 1)) +(unless (network-reachable?) (test-skip 1)) (test-equal "package-source-derivation, snippet" "OK" (let* ((file (search-bootstrap-binary "guile-2.0.9.tar.xz" @@ -532,8 +531,7 @@ (%current-target-system "foo64-linux-gnu")) (equal? drv (bag->derivation %store bag)))))) -(unless (false-if-exception (getaddrinfo "www.gnu.org" "80" AI_NUMERICSERV)) - (test-skip 1)) +(unless (network-reachable?) (test-skip 1)) (test-assert "GNU Make, bootstrap" ;; GNU Make is the first program built during bootstrap; we choose it ;; here so that the test doesn't last for too long. |