Skip to content

Commit

Permalink
Factorize Java codegen integration test build defs (#11704)
Browse files Browse the repository at this point in the history
changelog_begin
changelog_end
  • Loading branch information
cocreature authored Nov 15, 2021
1 parent bf86ee4 commit 41d2d95
Show file tree
Hide file tree
Showing 2 changed files with 21 additions and 86 deletions.
101 changes: 15 additions & 86 deletions language-support/java/codegen/BUILD.bazel
Original file line number Diff line number Diff line change
Expand Up @@ -19,6 +19,7 @@ load(
":codegen.bzl",
"dar_to_java",
"mangle_for_java",
"test_exclusions",
)
load(
"//daml-lf/language:daml-lf.bzl",
Expand Down Expand Up @@ -175,92 +176,20 @@ scala_source_jar(
#### Integration Tests
########################################################

daml_compile(
name = "integration-tests-model-1_6",
srcs = glob(
[
"src/it/daml/Tests/*.daml",
"src/it/daml/Tests/Lib1_6.daml",
],
exclude = [
"src/it/daml/Tests/NumericTest.daml",
"src/it/daml/Tests/GenMapTest.daml",
],
),
target = "1.6",
)

daml_compile(
name = "integration-tests-model-1_7",
srcs = glob(
[
"src/it/daml/Tests/*.daml",
"src/it/daml/Tests/Lib1_7.daml",
],
exclude = [
"src/it/daml/Tests/GenMapTest.daml",
],
),
target = "1.7",
)

daml_compile(
name = "integration-tests-model-1_8",
srcs = glob(
[
"src/it/daml/Tests/*.daml",
"src/it/daml/Tests/Lib1_8.daml",
],
exclude = [
"src/it/daml/Tests/GenMapTest.daml",
],
),
target = "1.8",
)

daml_compile(
name = "integration-tests-model-1_11",
srcs = glob(
[
"src/it/daml/Tests/*.daml",
"src/it/daml/Tests/Lib1_111.daml",
],
),
target = "1.11",
)

daml_compile(
name = "integration-tests-model-1_12",
srcs = glob(
[
"src/it/daml/Tests/*.daml",
"src/it/daml/Tests/Lib1_112.daml",
],
),
target = "1.12",
)

daml_compile(
name = "integration-tests-model-1_13",
srcs = glob(
[
"src/it/daml/Tests/*.daml",
"src/it/daml/Tests/Lib1_113.daml",
],
),
target = "1.13",
)

daml_compile(
name = "integration-tests-model-1_dev",
srcs = glob(
[
"src/it/daml/Tests/*.daml",
"src/it/daml/Tests/Libdev.daml",
],
),
target = "1.dev",
)
[
daml_compile(
name = "integration-tests-model-{}".format(mangle_for_java(ver)),
srcs = glob(
[
"src/it/daml/Tests/*.daml",
"src/it/daml/Tests/Lib{}.daml".format(mangle_for_java(ver)),
],
exclude = test_exclusions.get(ver, []),
),
target = ver,
)
for ver in COMPILER_LF_VERSIONS
]

daml_compile(
name = "pkg1",
Expand Down
6 changes: 6 additions & 0 deletions language-support/java/codegen/codegen.bzl
Original file line number Diff line number Diff line change
Expand Up @@ -42,3 +42,9 @@ def dar_to_java(**kwargs):
"//language-support/java/bindings:bindings-java",
],
)

test_exclusions = {
"1.6": ["src/it/daml/Tests/GenMapTest.daml", "src/it/daml/Tests/NumericTest.daml"],
"1.7": ["src/it/daml/Tests/GenMapTest.daml"],
"1.8": ["src/it/daml/Tests/GenMapTest.daml"],
}

0 comments on commit 41d2d95

Please sign in to comment.