From ad1ebab379dbd68e006197e8609c67de4734dbde Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?Ludovic=20Court=C3=A8s?= Date: Thu, 13 Dec 2012 22:06:45 +0100 Subject: tests: Skip network-dependent tests when the network is unreachable. * tests/builders.scm (network-reachable?): New variable. ("url-fetch", "gnu-build"): Skip unless NETWORK-REACHABLE?. * tests/derivations.scm (%coreutils): Check for network access. ("build-expression->derivation with one input"): Skip when %COREUTILS is #f. * tests/guix-package.sh: Skip installation of GNU Make when the network is unreachable. * tests/packages.scm ("GNU Make, bootstrap"): Likewise. * tests/union.scm ("union-build"): Likewise. --- tests/derivations.scm | 6 ++++-- 1 file changed, 4 insertions(+), 2 deletions(-) (limited to 'tests/derivations.scm') diff --git a/tests/derivations.scm b/tests/derivations.scm index 203bd9032f..46bab4e19d 100644 --- a/tests/derivations.scm +++ b/tests/derivations.scm @@ -290,8 +290,9 @@ (define %coreutils (false-if-exception - (or (package-derivation %store %bootstrap-coreutils&co) - (nixpkgs-derivation "coreutils")))) + (and (getaddrinfo "www.gnu.org" "80" AI_NUMERICSERV) + (or (package-derivation %store %bootstrap-coreutils&co) + (nixpkgs-derivation "coreutils"))))) (test-skip (if %coreutils 0 1)) @@ -385,6 +386,7 @@ (and (equal? '(hello) (call-with-input-file one read)) (equal? '(world) (call-with-input-file two read))))))) +(test-skip (if %coreutils 0 1)) (test-assert "build-expression->derivation with one input" (let* ((builder '(call-with-output-file %output (lambda (p) -- cgit v1.2.3