Add some test data
..for testing behaviour with multiple versions/ids of packges being available
This commit is contained in:
parent
ee0135aac2
commit
759a6efab1
@ -5,12 +5,14 @@ import Test.Hspec
|
|||||||
import System.Process
|
import System.Process
|
||||||
|
|
||||||
main = do
|
main = do
|
||||||
let sandboxes = [ "test/data", "test/data/check-packageid" ]
|
let sandboxes = [ "test/data", "test/data/check-packageid"
|
||||||
|
, "test/data/duplicate-pkgver/" ]
|
||||||
genSandboxCfg dir = withDirectory dir $ \cwd -> do
|
genSandboxCfg dir = withDirectory dir $ \cwd -> do
|
||||||
system ("sed 's|@CWD@|" ++ cwd ++ "|g' cabal.sandbox.config.in > cabal.sandbox.config")
|
system ("sed 's|@CWD@|" ++ cwd ++ "|g' cabal.sandbox.config.in > cabal.sandbox.config")
|
||||||
pkgDirs =
|
pkgDirs =
|
||||||
[ "test/data/.cabal-sandbox/i386-osx-ghc-7.6.3-packages.conf.d"
|
[ "test/data/.cabal-sandbox/i386-osx-ghc-7.6.3-packages.conf.d"
|
||||||
, "test/data/check-packageid/.cabal-sandbox/i386-osx-ghc-7.6.3-packages.conf.d"]
|
, "test/data/check-packageid/.cabal-sandbox/i386-osx-ghc-7.6.3-packages.conf.d"
|
||||||
|
, "test/data/duplicate-pkgver/.cabal-sandbox/i386-osx-ghc-7.6.3-packages.conf.d"]
|
||||||
genGhcPkgCache dir = system $ "ghc-pkg recache --force -f" ++ dir
|
genGhcPkgCache dir = system $ "ghc-pkg recache --force -f" ++ dir
|
||||||
genSandboxCfg `mapM_` sandboxes
|
genSandboxCfg `mapM_` sandboxes
|
||||||
genGhcPkgCache `mapM_` pkgDirs
|
genGhcPkgCache `mapM_` pkgDirs
|
||||||
|
@ -0,0 +1,4 @@
|
|||||||
|
name: template-haskell
|
||||||
|
version: 1.0
|
||||||
|
id: template-haskell-1.0-7c59d13f32294d1ef6dc6233c24df961
|
||||||
|
exposed: True
|
@ -0,0 +1,4 @@
|
|||||||
|
name: template-haskell
|
||||||
|
version: 2.8.0.0
|
||||||
|
id: template-haskell-2.8.0.0-14e543bdae2da4d2aeff5386892c9112
|
||||||
|
exposed: True
|
@ -0,0 +1,4 @@
|
|||||||
|
name: template-haskell
|
||||||
|
version: 2.8.0.0
|
||||||
|
id: template-haskell-2.8.0.0-32d4f24abdbb6bf41272b183b2e23e9c
|
||||||
|
exposed: True
|
25
test/data/duplicate-pkgver/cabal.sandbox.config.in
Normal file
25
test/data/duplicate-pkgver/cabal.sandbox.config.in
Normal file
@ -0,0 +1,25 @@
|
|||||||
|
-- This is a Cabal package environment file.
|
||||||
|
-- THIS FILE IS AUTO-GENERATED. DO NOT EDIT DIRECTLY.
|
||||||
|
-- Please create a 'cabal.config' file in the same directory
|
||||||
|
-- if you want to change the default settings for this sandbox.
|
||||||
|
|
||||||
|
|
||||||
|
local-repo: @CWD@/test/data/duplicate-pkgver/.cabal-sandbox/packages
|
||||||
|
logs-dir: @CWD@/test/data/duplicate-pkgver/.cabal-sandbox/logs
|
||||||
|
world-file: @CWD@/test/data/duplicate-pkgver/.cabal-sandbox/world
|
||||||
|
user-install: False
|
||||||
|
package-db: @CWD@/test/data/duplicate-pkgver/.cabal-sandbox/i386-osx-ghc-7.6.3-packages.conf.d
|
||||||
|
build-summary: @CWD@/test/data/duplicate-pkgver/.cabal-sandbox/logs/build.log
|
||||||
|
|
||||||
|
install-dirs
|
||||||
|
prefix: @CWD@/test/data/duplicate-pkgver/.cabal-sandbox
|
||||||
|
bindir: $prefix/bin
|
||||||
|
libdir: $prefix/lib
|
||||||
|
libsubdir: $arch-$os-$compiler/$pkgid
|
||||||
|
libexecdir: $prefix/libexec
|
||||||
|
datadir: $prefix/share
|
||||||
|
datasubdir: $arch-$os-$compiler/$pkgid
|
||||||
|
docdir: $datadir/doc/$arch-$os-$compiler/$pkgid
|
||||||
|
htmldir: $docdir/html
|
||||||
|
haddockdir: $htmldir
|
||||||
|
sysconfdir: $prefix/etc
|
Loading…
Reference in New Issue
Block a user