From mboxrd@z Thu Jan 1 00:00:00 1970 Received: from eggs.gnu.org ([209.51.188.92]:57310) by lists.gnu.org with esmtp (Exim 4.71) (envelope-from ) id 1hSndl-00016i-66 for guix-patches@gnu.org; Mon, 20 May 2019 15:08:06 -0400 Received: from Debian-exim by eggs.gnu.org with spam-scanned (Exim 4.71) (envelope-from ) id 1hSndj-0008IP-L2 for guix-patches@gnu.org; Mon, 20 May 2019 15:08:04 -0400 Received: from debbugs.gnu.org ([209.51.188.43]:52605) by eggs.gnu.org with esmtps (TLS1.0:RSA_AES_128_CBC_SHA1:16) (Exim 4.71) (envelope-from ) id 1hSndi-0008Ht-Fs for guix-patches@gnu.org; Mon, 20 May 2019 15:08:02 -0400 Received: from Debian-debbugs by debbugs.gnu.org with local (Exim 4.84_2) (envelope-from ) id 1hSndi-0004pJ-8a for guix-patches@gnu.org; Mon, 20 May 2019 15:08:02 -0400 Subject: [bug#35812] [PATCH] fix hackage cabal tests Resent-Message-ID: Received: from eggs.gnu.org ([209.51.188.92]:57082) by lists.gnu.org with esmtp (Exim 4.71) (envelope-from ) id 1hSncq-0000u1-NF for guix-patches@gnu.org; Mon, 20 May 2019 15:07:09 -0400 Received: from Debian-exim by eggs.gnu.org with spam-scanned (Exim 4.71) (envelope-from ) id 1hSncp-0007qq-GT for guix-patches@gnu.org; Mon, 20 May 2019 15:07:08 -0400 Received: from mx2.mailbox.org ([80.241.60.215]:60368) by eggs.gnu.org with esmtps (TLS1.0:RSA_AES_256_CBC_SHA1:32) (Exim 4.71) (envelope-from ) id 1hSncp-0007o4-6J for guix-patches@gnu.org; Mon, 20 May 2019 15:07:07 -0400 Received: from smtp2.mailbox.org (smtp2.mailbox.org [IPv6:2001:67c:2050:105:465:1:2:0]) (using TLSv1.2 with cipher ECDHE-RSA-CHACHA20-POLY1305 (256/256 bits)) (No client certificate requested) by mx2.mailbox.org (Postfix) with ESMTPS id 2D08DA0AE8 for ; Mon, 20 May 2019 21:07:02 +0200 (CEST) Received: from smtp2.mailbox.org ([80.241.60.241]) by spamfilter05.heinlein-hosting.de (spamfilter05.heinlein-hosting.de [80.241.56.123]) (amavisd-new, port 10030) with ESMTP id cME6Axzk8hP8 for ; Mon, 20 May 2019 21:07:00 +0200 (CEST) From: Robert Vollmert Content-Type: multipart/mixed; boundary="Apple-Mail=_CD780271-33D0-4271-91E4-2A9DE05FAD7F" Mime-Version: 1.0 (Mac OS X Mail 12.4 \(3445.104.8\)) Message-Id: Date: Mon, 20 May 2019 21:06:59 +0200 List-Id: List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , Errors-To: guix-patches-bounces+kyle=kyleam.com@gnu.org Sender: "Guix-patches" To: 35812@debbugs.gnu.org --Apple-Mail=_CD780271-33D0-4271-91E4-2A9DE05FAD7F Content-Transfer-Encoding: quoted-printable Content-Type: text/plain; charset=utf-8 Hackage cabal tests didn=E2=80=99t run independently due to memoization, and test-cabal-6 was failing. Let me know if anything should be done differently. --Apple-Mail=_CD780271-33D0-4271-91E4-2A9DE05FAD7F Content-Disposition: attachment; filename=0001-tests-fix-cabal-tests-to-test-and-pass.patch Content-Type: application/octet-stream; x-unix-mode=0644; name="0001-tests-fix-cabal-tests-to-test-and-pass.patch" Content-Transfer-Encoding: quoted-printable =46rom=208b6dac85a9f6c4e851c1a75a4958dff7915fb2f1=20Mon=20Sep=2017=20= 00:00:00=202001=0AFrom:=20Robert=20Vollmert=20=0ADate:=20= Fri,=2017=20May=202019=2010:48:42=20+0200=0ASubject:=20[PATCH]=20tests:=20= fix=20cabal=20tests=20to=20test=20and=20pass=0A=0A*=20= guix/import/hackage.scm:=20export=20unmemoized=20import=20function=0A*=20= tests/hackage.scm:=20use=20unmemoized=20import=20function=20to=20make=20= tests=20independent=0A*=20tests/hackage.scm:=20fix=20failing=20= test-cabal-6=20by=20providing=20expected=20output=0A---=0A=20= guix/import/hackage.scm=20|=2031=20+++++++++++++++++--------------=0A=20= tests/hackage.scm=20=20=20=20=20=20=20|=2039=20= ++++++++++++++++++++++++++++++++++++---=0A=202=20files=20changed,=2053=20= insertions(+),=2017=20deletions(-)=0A=0Adiff=20--git=20= a/guix/import/hackage.scm=20b/guix/import/hackage.scm=0Aindex=20= 2a51420d14..5b80a7ea1d=20100644=0A---=20a/guix/import/hackage.scm=0A+++=20= b/guix/import/hackage.scm=0A@@=20-40,6=20+40,7=20@@=0A=20=20=20= #:use-module=20(guix=20packages)=0A=20=20=20#:use-module=20((guix=20= utils)=20#:select=20(call-with-temporary-output-file))=0A=20=20=20= #:export=20(hackage->guix-package=0A+=20=20=20=20=20=20=20=20=20=20=20=20= hackage->guix-package-impl=0A=20=20=20=20=20=20=20=20=20=20=20=20=20= hackage-recursive-import=0A=20=20=20=20=20=20=20=20=20=20=20=20=20= %hackage-updater=0A=20=0A@@=20-277,13=20+278,12=20@@=20representation=20= of=20a=20Cabal=20file=20as=20produced=20by=20'read-cabal'."=0A=20=20=20=20= =20=20=20=20=20(license=20,(string->license=20(cabal-package-license=20= cabal))))=0A=20=20=20=20=20=20(append=20hackage-dependencies=20= hackage-native-dependencies))))=0A=20=0A-(define=20hackage->guix-package=0A= -=20=20(memoize=0A-=20=20=20(lambda*=20(package-name=20#:key=0A-=20=20=20= =20=20=20=20=20=20=20=20=20=20=20=20=20=20=20=20=20=20=20=20=20=20=20= (include-test-dependencies?=20#t)=0A-=20=20=20=20=20=20=20=20=20=20=20=20= =20=20=20=20=20=20=20=20=20=20=20=20=20=20(port=20#f)=0A-=20=20=20=20=20=20= =20=20=20=20=20=20=20=20=20=20=20=20=20=20=20=20=20=20=20=20= (cabal-environment=20'()))=0A-=20=20=20=20=20"Fetch=20the=20Cabal=20file=20= for=20PACKAGE-NAME=20from=20hackage.haskell.org,=20or,=20if=20the=0A= +(define=20hackage->guix-package-impl=0A+=20=20(lambda*=20(package-name=20= #:key=0A+=20=20=20=20=20=20=20=20=20=20=20=20=20=20=20=20=20=20=20=20=20=20= =20=20=20(include-test-dependencies?=20#t)=0A+=20=20=20=20=20=20=20=20=20= =20=20=20=20=20=20=20=20=20=20=20=20=20=20=20=20(port=20#f)=0A+=20=20=20=20= =20=20=20=20=20=20=20=20=20=20=20=20=20=20=20=20=20=20=20=20=20= (cabal-environment=20'()))=0A+=20=20=20"Fetch=20the=20Cabal=20file=20for=20= PACKAGE-NAME=20from=20hackage.haskell.org,=20or,=20if=20the=0A=20called=20= with=20keyword=20parameter=20PORT,=20from=20PORT.=20=20Return=20the=20= `package'=0A=20S-expression=20corresponding=20to=20that=20package,=20or=20= #f=20on=20failure.=0A=20CABAL-ENVIRONMENT=20is=20an=20alist=20defining=20= the=20environment=20in=20which=20the=20Cabal=0A@@=20-293,13=20+293,16=20= @@=20symbol=20'true'=20or=20'false'.=20=20The=20value=20associated=20= with=20other=20keys=20has=20to=20conform=0A=20to=20the=20Cabal=20file=20= format=20definition.=20=20The=20default=20value=20associated=20with=20= the=0A=20keys=20\"os\",=20\"arch\"=20and=20\"impl\"=20is=20\"linux\",=20= \"x86_64\"=20and=20\"ghc\"=0A=20respectively."=0A-=20=20=20=20=20(let=20= ((cabal-meta=20(if=20port=0A-=20=20=20=20=20=20=20=20=20=20=20=20=20=20=20= =20=20=20=20=20=20=20=20=20=20=20=20(read-cabal=20= (canonical-newline-port=20port))=0A-=20=20=20=20=20=20=20=20=20=20=20=20=20= =20=20=20=20=20=20=20=20=20=20=20=20=20=20(hackage-fetch=20= package-name))))=0A-=20=20=20=20=20=20=20(and=3D>=20cabal-meta=20= (compose=20(cut=20hackage-module->sexp=20<>=0A-=20=20=20=20=20=20=20=20=20= =20=20=20=20=20=20=20=20=20=20=20=20=20=20=20=20=20=20=20=20=20=20=20=20=20= =20=20=20=20=20#:include-test-dependencies?=0A-=20=20=20=20=20=20=20=20=20= =20=20=20=20=20=20=20=20=20=20=20=20=20=20=20=20=20=20=20=20=20=20=20=20=20= =20=20=20=20=20include-test-dependencies?)=0A-=20=20=20=20=20=20=20=20=20= =20=20=20=20=20=20=20=20=20=20=20=20=20=20=20=20=20=20=20=20=20=20=20=20=20= (cut=20eval-cabal=20<>=20cabal-environment)))))))=0A+=20=20=20(let=20= ((cabal-meta=20(if=20port=0A+=20=20=20=20=20=20=20=20=20=20=20=20=20=20=20= =20=20=20=20=20=20=20=20=20=20(read-cabal=20(canonical-newline-port=20= port))=0A+=20=20=20=20=20=20=20=20=20=20=20=20=20=20=20=20=20=20=20=20=20= =20=20=20=20(hackage-fetch=20package-name))))=0A+=20=20=20=20=20(and=3D>=20= cabal-meta=20(compose=20(cut=20hackage-module->sexp=20<>=0A+=20=20=20=20=20= =20=20=20=20=20=20=20=20=20=20=20=20=20=20=20=20=20=20=20=20=20=20=20=20=20= =20=20=20=20=20=20=20#:include-test-dependencies?=0A+=20=20=20=20=20=20=20= =20=20=20=20=20=20=20=20=20=20=20=20=20=20=20=20=20=20=20=20=20=20=20=20=20= =20=20=20=20=20include-test-dependencies?)=0A+=20=20=20=20=20=20=20=20=20= =20=20=20=20=20=20=20=20=20=20=20=20=20=20=20=20=20=20=20=20=20=20=20= (cut=20eval-cabal=20<>=20cabal-environment))))))=0A+=0A+(define=20= hackage->guix-package=0A+=20=20(memoize=20hackage->guix-package-impl))=0A= =20=0A=20(define*=20(hackage-recursive-import=20package-name=20.=20args)=0A= =20=20=20(recursive-import=20package-name=20#f=0Adiff=20--git=20= a/tests/hackage.scm=20b/tests/hackage.scm=0Aindex=20= e17851a213..e56aa996d6=20100644=0A---=20a/tests/hackage.scm=0A+++=20= b/tests/hackage.scm=0A@@=20-161,7=20+161,7=20@@=20library=0A=20=20=20=20=20= (lambda=20(name-version)=0A=20=20=20=20=20=20=20(call-with-input-string=20= test-cabal=0A=20=20=20=20=20=20=20=20=20read-cabal)))=0A-=20=20=20(match=20= (hackage->guix-package=20"foo"=20#:cabal-environment=20= cabal-environment)=0A+=20=20=20(match=20(hackage->guix-package-impl=20= "foo"=20#:cabal-environment=20cabal-environment)=0A=20=20=20=20=20=20= (('package=0A=20=20=20=20=20=20=20=20=20('name=20"ghc-foo")=0A=20=20=20=20= =20=20=20=20=20('version=20"1.0.0")=0A@@=20-207,8=20+207,41=20@@=20= library=0A=20=20=20=20=20=20=20=20=20=20=20=20=20=20=20=20=20=20=20=20=20= =20=20=20=20#:cabal-environment=20'(("impl"=20.=20"ghc-7.8"))))=0A=20=0A=20= (test-assert=20"hackage->guix-package=20test=206"=0A-=20=20= (eval-test-with-cabal=20test-cabal-6=0A-=20=20=20=20=20=20=20=20=20=20=20= =20=20=20=20=20=20=20=20=20=20=20=20=20#:cabal-environment=20'(("impl"=20= .=20"ghc-7.8"))))=0A+=20=20(mock=0A+=20=20=20((guix=20import=20hackage)=20= hackage-fetch=0A+=20=20=20=20(lambda=20(name-version)=0A+=20=20=20=20=20=20= (call-with-input-string=20test-cabal-6=0A+=20=20=20=20=20=20=20=20= read-cabal)))=0A+=20=20=20(match=20(hackage->guix-package-impl=20"foo")=0A= +=20=20=20=20=20(('package=0A+=20=20=20=20=20=20=20=20('name=20= "ghc-foo")=0A+=20=20=20=20=20=20=20=20('version=20"1.0.0")=0A+=20=20=20=20= =20=20=20=20('source=0A+=20=20=20=20=20=20=20=20=20('origin=0A+=20=20=20=20= =20=20=20=20=20=20=20('method=20'url-fetch)=0A+=20=20=20=20=20=20=20=20=20= =20=20('uri=20('string-append=0A+=20=20=20=20=20=20=20=20=20=20=20=20=20=20= =20=20=20=20"https://hackage.haskell.org/package/foo/foo-"=0A+=20=20=20=20= =20=20=20=20=20=20=20=20=20=20=20=20=20=20'version=0A+=20=20=20=20=20=20=20= =20=20=20=20=20=20=20=20=20=20=20".tar.gz"))=0A+=20=20=20=20=20=20=20=20=20= =20=20('sha256=0A+=20=20=20=20=20=20=20=20=20=20=20=20('base32=0A+=20=20=20= =20=20=20=20=20=20=20=20=20=20(?=20string?=20hash)))))=0A+=20=20=20=20=20= =20=20=20('build-system=20'haskell-build-system)=0A+=20=20=20=20=20=20=20= =20('inputs=0A+=20=20=20=20=20=20=20=20=20('quasiquote=0A+=20=20=20=20=20= =20=20=20=20=20(("ghc-b"=20('unquote=20'ghc-b))=0A+=20=20=20=20=20=20=20=20= =20=20=20("ghc-http"=20('unquote=20'ghc-http))=0A+=20=20=20=20=20=20=20=20= =20=20=20("ghc-mtl"=20('unquote=20'ghc-mtl)))))=0A+=20=20=20=20=20=20=20=20= ('native-inputs=0A+=20=20=20=20=20=20=20=20=20('quasiquote=0A+=20=20=20=20= =20=20=20=20=20=20(("ghc-haskell-gi"=20('unquote=20'ghc-haskell-gi)))))=0A= +=20=20=20=20=20=20=20=20('home-page=20"http://test.org")=0A+=20=20=20=20= =20=20=20=20('synopsis=20(?=20string?))=0A+=20=20=20=20=20=20=20=20= ('description=20(?=20string?))=0A+=20=20=20=20=20=20=20=20('license=20= 'bsd-3))=0A+=20=20=20=20=20=20#t)=0A+=20=20=20=20=20(x=0A+=20=20=20=20=20= =20(pk=20'fail=20x=20#f)))))=0A=20=0A=20(test-assert=20"read-cabal=20= test=201"=0A=20=20=20(match=20(call-with-input-string=20= test-read-cabal-1=20read-cabal)=0A--=20=0A2.21.0=0A=0A= --Apple-Mail=_CD780271-33D0-4271-91E4-2A9DE05FAD7F--