Repository : ssh://darcs.haskell.org//srv/darcs/testsuite On branch : master
http://hackage.haskell.org/trac/ghc/changeset/79281d44cecd2a0a0458169d3d934246ee7182d1 >--------------------------------------------------------------- commit 79281d44cecd2a0a0458169d3d934246ee7182d1 Author: Duncan Coutts <[email protected]> Date: Wed May 25 17:04:37 2011 +0100 Add filtering and accept output for ghcpkg01 We have to filter out the new pkgroot field value because it contains a system-dependent value (absolute path of the global package db). >--------------------------------------------------------------- tests/ghc-regress/cabal/Makefile | 12 +++++++----- tests/ghc-regress/cabal/ghcpkg01.stdout | 7 ++++++- 2 files changed, 13 insertions(+), 6 deletions(-) diff --git a/tests/ghc-regress/cabal/Makefile b/tests/ghc-regress/cabal/Makefile index 322309a..a820fb3 100644 --- a/tests/ghc-regress/cabal/Makefile +++ b/tests/ghc-regress/cabal/Makefile @@ -5,21 +5,23 @@ include $(TOP)/mk/test.mk PKGCONF01=local01.package.conf LOCAL_GHC_PKG01 = '$(GHC_PKG)' --no-user-package-conf -f $(PKGCONF01) +STRIP_PKGROOT=sed 's/^pkgroot: .*$$/pkgroot: /' + # a bunch of tests for ghc-pkg ghcpkg01 : @rm -rf $(PKGCONF01) $(LOCAL_GHC_PKG01) init $(PKGCONF01) $(LOCAL_GHC_PKG01) list $(LOCAL_GHC_PKG01) register --force test.pkg 2>/dev/null - $(LOCAL_GHC_PKG01) describe testpkg - $(LOCAL_GHC_PKG01) describe testpkg-1.2.3.4 + $(LOCAL_GHC_PKG01) describe testpkg | $(STRIP_PKGROOT) + $(LOCAL_GHC_PKG01) describe testpkg-1.2.3.4 | $(STRIP_PKGROOT) $(LOCAL_GHC_PKG01) field testpkg-1.2.3.4 import-dirs @: # test2.pkg is a later version of testpkg-1.2.3.4 $(LOCAL_GHC_PKG01) register --force test2.pkg 2>/dev/null $(LOCAL_GHC_PKG01) list - $(LOCAL_GHC_PKG01) describe testpkg-2.0 - $(LOCAL_GHC_PKG01) describe testpkg-* + $(LOCAL_GHC_PKG01) describe testpkg-2.0 | $(STRIP_PKGROOT) + $(LOCAL_GHC_PKG01) describe testpkg-* | $(STRIP_PKGROOT) $(LOCAL_GHC_PKG01) field testpkg-* version @: # test hiding/exposing @@ -39,7 +41,7 @@ ghcpkg01 : $(LOCAL_GHC_PKG01) unregister testpkg-3.0 $(LOCAL_GHC_PKG01) unregister testpkg-2.0 - $(LOCAL_GHC_PKG01) describe testpkg + $(LOCAL_GHC_PKG01) describe testpkg | $(STRIP_PKGROOT) $(LOCAL_GHC_PKG01) unregister testpkg-* $(LOCAL_GHC_PKG01) list diff --git a/tests/ghc-regress/cabal/ghcpkg01.stdout b/tests/ghc-regress/cabal/ghcpkg01.stdout index bd406f2..edfa92d 100644 --- a/tests/ghc-regress/cabal/ghcpkg01.stdout +++ b/tests/ghc-regress/cabal/ghcpkg01.stdout @@ -32,6 +32,7 @@ framework-dirs: frameworks: haddock-interfaces: haddock-html: +pkgroot: name: testpkg version: 1.2.3.4 @@ -64,6 +65,7 @@ framework-dirs: frameworks: haddock-interfaces: haddock-html: +pkgroot: import-dirs: /usr/local/lib/testpkg "c:/Program Files/testpkg" Reading package info from "test2.pkg" ... done. @@ -102,6 +104,7 @@ framework-dirs: frameworks: haddock-interfaces: haddock-html: +pkgroot: name: testpkg version: 2.0 @@ -134,7 +137,7 @@ framework-dirs: frameworks: haddock-interfaces: haddock-html: - +pkgroot: --- name: testpkg version: 1.2.3.4 @@ -167,6 +170,7 @@ framework-dirs: frameworks: haddock-interfaces: haddock-html: +pkgroot: version: 2.0 version: 1.2.3.4 @@ -206,6 +210,7 @@ framework-dirs: frameworks: haddock-interfaces: haddock-html: +pkgroot: local01.package.conf: _______________________________________________ Cvs-ghc mailing list [email protected] http://www.haskell.org/mailman/listinfo/cvs-ghc
