Fix lf versions in the tests for buliding against newer LF versions (#4933)

This makes sure that they won’t break once we switch defaults. For
consistency they are specified via `build-options` everywhere.

changelog_begin
changelog_end
This commit is contained in:
Moritz Kiefer 2020-03-13 16:27:54 +01:00 committed by GitHub
parent 4e99f18613
commit a15bfd80f3
No known key found for this signature in database
GPG Key ID: 4AEE18F83AFDEB23

View File

@ -600,11 +600,12 @@ tests tools@Tools{damlc} = testGroup "Packaging" $
, "name: a"
, "source: ."
, "dependencies: [daml-prim, daml-stdlib]"
, "build-options: [--target=1.8]"
]
writeFileUTF8 (tmpDir </> "a" </> "A.daml") $ unlines
[ "daml 1.2 module A where"
]
withCurrentDirectory (tmpDir </> "a") $ callProcessSilent damlc ["build", "-o", tmpDir </> "a" </> "a.dar", "--target=1.8"]
withCurrentDirectory (tmpDir </> "a") $ callProcessSilent damlc ["build", "-o", tmpDir </> "a" </> "a.dar"]
step "Building b"
createDirectoryIfMissing True (tmpDir </> "b")
@ -618,6 +619,7 @@ tests tools@Tools{damlc} = testGroup "Packaging" $
, " - daml-stdlib"
, "data-dependencies:"
, " - " <> show (tmpDir </> "a" </> "a.dar")
, "build-options: [--target=1.7]"
]
writeFileUTF8 (tmpDir </> "b" </> "B.daml") $ unlines
[ "daml 1.2 module B where"
@ -634,11 +636,12 @@ tests tools@Tools{damlc} = testGroup "Packaging" $
, "name: a"
, "source: ."
, "dependencies: [daml-prim, daml-stdlib]"
, "build-options: [--target=1.8]"
]
writeFileUTF8 (tmpDir </> "a" </> "A.daml") $ unlines
[ "daml 1.2 module A where"
]
withCurrentDirectory (tmpDir </> "a") $ callProcessSilent damlc ["build", "-o", tmpDir </> "a" </> "a.dar", "--target=1.8"]
withCurrentDirectory (tmpDir </> "a") $ callProcessSilent damlc ["build", "-o", tmpDir </> "a" </> "a.dar"]
step "Building b"
createDirectoryIfMissing True (tmpDir </> "b")
@ -651,6 +654,7 @@ tests tools@Tools{damlc} = testGroup "Packaging" $
, " - daml-prim"
, " - daml-stdlib"
, " - " <> show (tmpDir </> "a" </> "a.dar")
, "build-options: [--target=1.7]"
]
writeFileUTF8 (tmpDir </> "b" </> "B.daml") $ unlines
[ "daml 1.2 module B where"