@@ -12,7 +12,10 @@ load("//bazel_tools:haskell.bzl", "da_haskell_test")
12
12
load ("@build_environment//:configuration.bzl" , "sdk_version" )
13
13
load ("@os_info//:os_info.bzl" , "is_windows" )
14
14
load ("//rules_daml:daml.bzl" , "daml_compile" )
15
- load ("//daml-lf/language:daml-lf.bzl" , "LF_DEV_VERSIONS" , "LF_MAJOR_VERSIONS" , "lf_version_latest" , "mangle_for_damlc" )
15
+ load ("//daml-lf/language:daml-lf.bzl" , "LF_DEV_VERSIONS" , "lf_version_latest" , "mangle_for_damlc" )
16
+
17
+ # Test Only LF 1.x
18
+ LF_MAJOR_VERSIONS = ["1" ]
16
19
17
20
[
18
21
genrule (
@@ -21,6 +24,8 @@ load("//daml-lf/language:daml-lf.bzl", "LF_DEV_VERSIONS", "LF_MAJOR_VERSIONS", "
21
24
glob (["**/*.daml" ]) + [
22
25
"//daml-script/daml:daml-script-{}.dar" .format (target ),
23
26
"//docs:source/daml-script/template-root/src/ScriptExample.daml" ,
27
+ "//daml-script/test:template.dar" ,
28
+ "//daml-script/test:retrointerface.dar" ,
24
29
],
25
30
outs = ["script-test-v{}.dar" .format (major )],
26
31
cmd = """
@@ -33,6 +38,8 @@ load("//daml-lf/language:daml-lf.bzl", "LF_DEV_VERSIONS", "LF_MAJOR_VERSIONS", "
33
38
cp -L $(location :daml/TestExceptions.daml) $$TMP_DIR/daml
34
39
cp -L $(location :daml/TestInterfaces.daml) $$TMP_DIR/daml
35
40
cp -L $(location //docs:source/daml-script/template-root/src/ScriptExample.daml) $$TMP_DIR/daml
41
+ cp -L $(location //daml-script/test:template.dar) $$TMP_DIR/
42
+ cp -L $(location //daml-script/test:retrointerface.dar) $$TMP_DIR/
36
43
cat << EOF >> $$TMP_DIR/daml/ScriptExample.daml
37
44
initializeFixed : Script ()
38
45
initializeFixed = do
@@ -52,6 +59,9 @@ dependencies:
52
59
- daml-stdlib
53
60
- daml-prim
54
61
- daml-script-{target}.dar
62
+ data-dependencies:
63
+ - template.dar
64
+ - retrointerface.dar
55
65
build-options:
56
66
- --target={target}
57
67
EOF
@@ -330,6 +340,19 @@ daml_compile(
330
340
version = "2.0.0" ,
331
341
)
332
342
343
+ daml_compile (
344
+ name = "template" ,
345
+ srcs = [":daml/Template.daml" ],
346
+ target = "1.15" ,
347
+ )
348
+
349
+ daml_compile (
350
+ name = "retrointerface" ,
351
+ srcs = [":daml/RetroInterface.daml" ],
352
+ data_dependencies = ["//daml-script/test:template.dar" ],
353
+ target = "1.15" ,
354
+ )
355
+
333
356
da_scala_test_suite (
334
357
name = "test" ,
335
358
size = "large" ,
@@ -340,6 +363,8 @@ da_scala_test_suite(
340
363
data = [
341
364
":script-test-no-ledger.dar" ,
342
365
"//daml-script/runner:daml-script-binary" ,
366
+ "//daml-script/test:retrointerface.dar" ,
367
+ "//daml-script/test:template.dar" ,
343
368
] + [
344
369
":script-test-v{}.dar" .format (major )
345
370
for major in LF_MAJOR_VERSIONS
0 commit comments