Skip to content
Snippets Groups Projects
Commit 75db3da2 authored by Edward Z. Yang's avatar Edward Z. Yang
Browse files

Test to ensure that internal libraries work with --assume-deps-up-to-date.


Signed-off-by: default avatarEdward Z. Yang <ezyang@cs.stanford.edu>
parent 38dc31b2
No related branches found
No related tags found
No related merge requests found
...@@ -359,6 +359,33 @@ tests config = do ...@@ -359,6 +359,33 @@ tests config = do
runExe' "fooexe" [] runExe' "fooexe" []
>>= assertOutputContains "25" >>= assertOutputContains "25"
-- Basic test to make sure we can build internal libraries manually.
mtcs "InternalLibraries/Library" "AssumeDepsUpToDate" $ \step -> do
withPackageDb $ do
step "Building foolib"
withPackage "foolib" $ do
cabal "configure" []
let upd = "--assume-deps-up-to-date"
step "foolib: copying global data"
cabal "copy" [upd]
let mk_foolib_internal str = do
step $ "foolib: building foolib-internal (" ++ str ++ ")"
cabal "build" [upd, "foolib-internal"]
cabal "copy" [upd, "foolib-internal"]
cabal "register" [upd, "foolib-internal"]
mk_foolib str = do
step $ "foolib: building foolib (" ++ str ++ ")"
cabal "build" [upd, "foolib"]
cabal "copy" [upd, "foolib"]
cabal "register" [upd, "foolib"]
mk_foolib_internal "run 1"
mk_foolib "run 1"
mk_foolib_internal "run 2"
mk_foolib "run 2"
withPackage "fooexe" $ do
cabal_build []
runExe' "fooexe" [] >>= assertOutputContains "25"
-- Test to ensure that cabal_macros.h are computed per-component. -- Test to ensure that cabal_macros.h are computed per-component.
tc "Macros" $ do tc "Macros" $ do
cabal_build [] cabal_build []
...@@ -544,3 +571,6 @@ tests config = do ...@@ -544,3 +571,6 @@ tests config = do
tcs :: FilePath -> FilePath -> TestM a -> TestTreeM () tcs :: FilePath -> FilePath -> TestM a -> TestTreeM ()
tcs name sub_name m tcs name sub_name m
= testTreeSub config name sub_name m = testTreeSub config name sub_name m
mtcs :: FilePath -> FilePath -> ((String -> TestM ()) -> TestM a) -> TestTreeM ()
mtcs name sub_name = testTreeSubSteps config name sub_name
0% Loading or .
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment