[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]
06/07: gnu: dhall: Disable network tests differently.
From: |
guix-commits |
Subject: |
06/07: gnu: dhall: Disable network tests differently. |
Date: |
Tue, 9 Jun 2020 18:03:05 -0400 (EDT) |
nckx pushed a commit to branch master
in repository guix.
commit 5e7daec9b4bfd2a3a430fc800ab6b1b527a5fa27
Author: Tobias Geerinckx-Rice <me@tobias.gr>
AuthorDate: Tue Jun 9 18:10:16 2020 +0200
gnu: dhall: Disable network tests differently.
* gnu/packages/dhall.scm (dhall)[source]: Remove patch.
[arguments]: Rename ‘remove-more-tests’ phase to ‘remove-network-tests’.
Identify the tests by name instead of by content.
* gnu/packages/patches/dhall-remove-network-tests.patch: Delete file.
* gnu/local.mk (dist_patch_DATA): Remove it.
---
gnu/local.mk | 1 -
gnu/packages/dhall.scm | 22 ++++-
.../patches/dhall-remove-network-tests.patch | 97 ----------------------
3 files changed, 18 insertions(+), 102 deletions(-)
diff --git a/gnu/local.mk b/gnu/local.mk
index 8f39c1c..76d6b5d 100644
--- a/gnu/local.mk
+++ b/gnu/local.mk
@@ -867,7 +867,6 @@ dist_patch_DATA =
\
%D%/packages/patches/desmume-gcc6-fixes.patch \
%D%/packages/patches/desmume-gcc7-fixes.patch \
%D%/packages/patches/dfu-programmer-fix-libusb.patch \
- %D%/packages/patches/dhall-remove-network-tests.patch \
%D%/packages/patches/diffutils-gets-undeclared.patch \
%D%/packages/patches/dkimproxy-add-ipv6-support.patch \
%D%/packages/patches/docbook-xsl-nonrecursive-string-subst.patch \
diff --git a/gnu/packages/dhall.scm b/gnu/packages/dhall.scm
index bbe2d27..86cbe76 100644
--- a/gnu/packages/dhall.scm
+++ b/gnu/packages/dhall.scm
@@ -1,4 +1,5 @@
;;; Copyright © 2020 John Soo <jsoo1@asu.edu>
+;;; Copyright © 2020 Tobias Geerinckx-Rice <me@tobias.gr>
;;;
;;; This file is part of GNU Guix.
;;;
@@ -39,8 +40,7 @@
".tar.gz"))
(sha256
(base32
- "18v7vvcbcm9s7slh6h43rj9yakkkxwnwgj6kv84i6qzd2j7d80mc"))
- (patches (search-patches "dhall-remove-network-tests.patch"))))
+ "18v7vvcbcm9s7slh6h43rj9yakkkxwnwgj6kv84i6qzd2j7d80mc"))))
(build-system haskell-build-system)
(inputs
`(("ghc-aeson" ,ghc-aeson)
@@ -99,9 +99,23 @@
(arguments
`(#:phases
(modify-phases %standard-phases
- ;; Remove tests that require network
- (add-after 'unpack 'remove-more-tests
+ (add-after 'unpack 'remove-network-tests
(lambda _
+ (with-directory-excursion "dhall-lang/tests"
+ (for-each
+ delete-file
+ '("import/failure/referentiallyInsane.dhall"
+ "import/success/customHeadersA.dhall"
+ "import/success/noHeaderForwardingA.dhall"
+ "import/success/unit/RemoteAsTextA.dhall"
+ "import/success/unit/SimpleRemoteA.dhall"
+ "import/success/unit/asLocation/RemoteChain1A.dhall"
+ "import/success/unit/asLocation/RemoteChain2A.dhall"
+ "import/success/unit/asLocation/RemoteChain3A.dhall"
+ "import/success/unit/asLocation/RemoteChainEnvA.dhall"
+ "import/success/unit/asLocation/RemoteChainMissingA.dhall"
+ "type-inference/success/CacheImportsA.dhall"
+ "type-inference/success/CacheImportsCanonicalizeA.dhall")))
(substitute* "src/Dhall/Tutorial.hs"
(((string-append
"-- >>> input auto "
diff --git a/gnu/packages/patches/dhall-remove-network-tests.patch
b/gnu/packages/patches/dhall-remove-network-tests.patch
deleted file mode 100644
index c260e78..0000000
--- a/gnu/packages/patches/dhall-remove-network-tests.patch
+++ /dev/null
@@ -1,97 +0,0 @@
-diff a/dhall-lang/tests/import/failure/referentiallyInsane.dhall
b/dhall-lang/tests/import/failure/referentiallyInsane.dhall
---- a/dhall-lang/tests/import/failure/referentiallyInsane.dhall
-+++ /dev/null
-@@ -1,13 +0,0 @@
--{- The following remote import attempts to import an environment variable,
which
-- must be disallowed by the referential sanity check
--
-- One reason for doing this is to protect against remote imports exfiltrating
-- environment variables (such as via custom headers). Only referentially
-- opaque imports (i.e. local imports) have permission to refer to other
-- referentially opaque imports in order to protect against this attack.
--
-- The referential sanity check also ensures that remote imports are
-- referentially transparent. Or in other words, any import that is globally
-- addressable must have a meaning that is not context-sensitive.
---}
--https://raw.githubusercontent.com/dhall-lang/dhall-lang/master/tests/import/data/referentiallyOpaque.dhall
-diff a/dhall-lang/tests/import/success/customHeadersA.dhall
b/dhall-lang/tests/import/success/customHeadersA.dhall
---- a/dhall-lang/tests/import/success/customHeadersA.dhall
-+++ /dev/null
-@@ -1,3 +0,0 @@
--https://httpbin.org/user-agent
-- using [ { mapKey = "User-Agent", mapValue = "Dhall" } ]
-- as Text
-diff a/dhall-lang/tests/import/success/noHeaderForwardingA.dhall
b/dhall-lang/tests/import/success/noHeaderForwardingA.dhall
---- a/dhall-lang/tests/import/success/noHeaderForwardingA.dhall
-+++ /dev/null
-@@ -1,6 +0,0 @@
--{- The purpose of this test is to verify that the custom headers supplied to
-- this import are not forwarded to the transitive import of
-- https://httpbin.org/user-agent
---}
--https://raw.githubusercontent.com/dhall-lang/dhall-lang/master/tests/import/success/customHeadersA.dhall
-- using [ { mapKey = "User-Agent", mapValue = "Secret" } ]
-diff a/dhall-lang/tests/import/success/unit/RemoteAsTextA.dhall
b/dhall-lang/tests/import/success/unit/RemoteAsTextA.dhall
---- a/dhall-lang/tests/import/success/unit/RemoteAsTextA.dhall
-+++ /dev/null
-@@ -1 +0,0 @@
--https://raw.githubusercontent.com/dhall-lang/dhall-lang/0b983b92aa2222dc3e292c20550ee37dea3f41df/tests/import/data/example.txt
as Text
-diff a/dhall-lang/tests/import/success/unit/SimpleRemoteA.dhall
b/dhall-lang/tests/import/success/unit/SimpleRemoteA.dhall
---- a/dhall-lang/tests/import/success/unit/SimpleRemoteA.dhall
-+++ /dev/null
-@@ -1 +0,0 @@
--https://raw.githubusercontent.com/dhall-lang/dhall-lang/0b983b92aa2222dc3e292c20550ee37dea3f41df/tests/import/data/simple.dhall
-diff a/dhall-lang/tests/import/success/unit/asLocation/RemoteChain1A.dhall
b/dhall-lang/tests/import/success/unit/asLocation/RemoteChain1A.dhall
---- a/dhall-lang/tests/import/success/unit/asLocation/RemoteChain1A.dhall
-+++ /dev/null
-@@ -1 +0,0 @@
--https://raw.githubusercontent.com/dhall-lang/dhall-lang/0b983b92aa2222dc3e292c20550ee37dea3f41df/tests/import/data/simpleLocation.dhall
-diff a/dhall-lang/tests/import/success/unit/asLocation/RemoteChain2A.dhall
b/dhall-lang/tests/import/success/unit/asLocation/RemoteChain2A.dhall
---- a/dhall-lang/tests/import/success/unit/asLocation/RemoteChain2A.dhall
-+++ /dev/null
-@@ -1 +0,0 @@
--https://raw.githubusercontent.com/Nadrieril/dhall-rust/f7d8c64a9799f139ad65427c2518376adb9e2e2f/dhall/tests/import/success/unit/asLocation/Canonicalize3A.dhall
-diff a/dhall-lang/tests/import/success/unit/asLocation/RemoteChain3A.dhall
b/dhall-lang/tests/import/success/unit/asLocation/RemoteChain3A.dhall
---- a/dhall-lang/tests/import/success/unit/asLocation/RemoteChain3A.dhall
-+++ /dev/null
-@@ -1 +0,0 @@
--https://raw.githubusercontent.com/Nadrieril/dhall-rust/f7d8c64a9799f139ad65427c2518376adb9e2e2f/dhall/tests/import/success/unit/asLocation/Canonicalize5A.dhall
-diff a/dhall-lang/tests/import/success/unit/asLocation/RemoteChainEnvA.dhall
b/dhall-lang/tests/import/success/unit/asLocation/RemoteChainEnvA.dhall
---- a/dhall-lang/tests/import/success/unit/asLocation/RemoteChainEnvA.dhall
-+++ /dev/null
-@@ -1,5 +0,0 @@
--{-
-- This test verifies that `env:VAR as Location` isn't rejected as
referentially opaque,
-- as `env:VAR` on its own would.
---}
--https://raw.githubusercontent.com/Nadrieril/dhall-rust/f7d8c64a9799f139ad65427c2518376adb9e2e2f/dhall/tests/import/success/unit/asLocation/EnvA.dhall
-diff
a/dhall-lang/tests/import/success/unit/asLocation/RemoteChainMissingA.dhall
b/dhall-lang/tests/import/success/unit/asLocation/RemoteChainMissingA.dhall
---- a/dhall-lang/tests/import/success/unit/asLocation/RemoteChainMissingA.dhall
-+++ /dev/null
-@@ -1,6 +0,0 @@
--{- This test verifies that `missing as Location` succeeds when chained since:
-- * The `missing` is never actually resolved (due to the `as Location`)
-- * The `missing` should be treated as referentially transparent (and
therefore
-- be a valid transitive dependency of a remote import)
---}
--https://raw.githubusercontent.com/Nadrieril/dhall-rust/f7d8c64a9799f139ad65427c2518376adb9e2e2f/dhall/tests/import/success/unit/asLocation/MissingA.dhall
-diff a/dhall-lang/tests/type-inference/success/CacheImportsA.dhall
b/dhall-lang/tests/type-inference/success/CacheImportsA.dhall
---- a/dhall-lang/tests/type-inference/success/CacheImportsA.dhall
-+++ /dev/null
-@@ -1,6 +0,0 @@
--{-
-- This URL returns (probably) a different result for each request. This test
-- ensures that import results for a given URL are correctly cached within an
-- execution of dhall.
---}
--let _ = assert : https://csrng.net/csrng/csrng.php?min=0&max=1000 as Text ===
https://csrng.net/csrng/csrng.php?min=0&max=1000 as Text in 0
-diff a/dhall-lang/tests/type-inference/success/CacheImportsCanonicalizeA.dhall
b/dhall-lang/tests/type-inference/success/CacheImportsCanonicalizeA.dhall
---- a/dhall-lang/tests/type-inference/success/CacheImportsCanonicalizeA.dhall
-+++ /dev/null
-@@ -1,5 +0,0 @@
--{-
-- This URL returns (probably) a different result for each request. This test
-- ensures that import locations are canonicalized before being cached.
---}
--let _ = assert : https://csrng.net/csrng/csrng.php?min=0&max=1000 as Text ===
https://csrng.net/csrng/../csrng/csrng.php?min=0&max=1000 as Text in 0
- branch master updated (9bb102d -> 2971ed5), guix-commits, 2020/06/09
- 02/07: gnu: minisign: Update to 0.9., guix-commits, 2020/06/09
- 04/07: gnu: perl-sql-abstract: Update to 1.87., guix-commits, 2020/06/09
- 01/07: gnu: python-pylint: Update to 2.5.3., guix-commits, 2020/06/09
- 03/07: gnu: rust-yaml-rust: Update to 0.4.4., guix-commits, 2020/06/09
- 05/07: gnu: rocksdb: Update to 6.10.1., guix-commits, 2020/06/09
- 06/07: gnu: dhall: Disable network tests differently.,
guix-commits <=
- 07/07: gnu: dhall: Update to 1.32.0., guix-commits, 2020/06/09