Commit c6c3f2c5 authored by Edward Z. Yang's avatar Edward Z. Yang
Browse files

Test for register --assume-deps-up-to-date


Signed-off-by: default avatarEdward Z. Yang <ezyang@cs.stanford.edu>
parent 4ea94c45
......@@ -169,6 +169,9 @@ extra-source-files:
tests/PackageTests/PreProcessExtraSources/Main.hs
tests/PackageTests/PreProcessExtraSources/my.cabal
tests/PackageTests/ReexportedModules/ReexportedModules.cabal
tests/PackageTests/RegisterAssumeDepsUpToDate/P.hs
tests/PackageTests/RegisterAssumeDepsUpToDate/RegisterOneShot.cabal
tests/PackageTests/RegisterAssumeDepsUpToDate/q/Q.hs
tests/PackageTests/Regression/T3294/T3294.cabal
tests/PackageTests/TemplateHaskell/dynamic/Exe.hs
tests/PackageTests/TemplateHaskell/dynamic/Lib.hs
......
name: RegisterAssumeDepsUpToDate
version: 0.1.0.0
license: BSD3
author: Edward Z. Yang
maintainer: ezyang@cs.stanford.edu
build-type: Simple
cabal-version: >=1.23
library q
exposed-modules: Q
build-depends: base
hs-source-dirs: q
default-language: Haskell2010
library
exposed-modules: P
build-depends: base, q
hs-source-dirs: .
default-language: Haskell2010
......@@ -442,6 +442,21 @@ tests config = do
runInstalledExe' "myprog" []
>>= assertOutputContains "aaa"
-- Test register --assume-deps-up-to-date
tc "RegisterAssumeDepsUpToDate" $ do
withPackageDb $ do
-- We'll test this by generating registration files and verifying
-- that they are indeed files (and not directories)
cabal_build []
cabal "copy" []
let q_reg = "pkg-config-q"
cabal "register" ["--assume-deps-up-to-date", "q", "--gen-pkg-config=" ++ q_reg]
pkg_dir <- packageDir
ghcPkg "register" [pkg_dir </> q_reg]
let main_reg = "pkg-config-p"
cabal "register" ["--assume-deps-up-to-date", "RegisterAssumeDepsUpToDate", "--gen-pkg-config=" ++ main_reg]
ghcPkg "register" [pkg_dir </> main_reg]
where
ghc_pkg_guess bin_name = do
cwd <- packageDir
......
Markdown is supported
0% or .
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment