mirror of
https://github.com/digital-asset/daml.git
synced 2024-09-20 01:07:18 +03:00
96f16df3c0
Basically we remove the dependency of different components on "//language-support/scala/bindings" by: - replacing com.daml.ledger.api.refinements.ApiTypes.Party by com.daml.lf.data.Ref.Party - replacing com.daml.ledger.api.refinements.ApiTypes.ApplicationId by Option[com.daml.lf.data.Ref.ApplicationId] (here we use option as ApiTypes.ApplicationId allows empty string while Ref.ApplicationId does not). - adding rounding logic for timestamp in com.daml.lf.data.Time.Timestamp and use it instead of the one from com.daml.api.util.TimestampConversion Note we did not clean daml-sript export as it have never pass the alpha stage and will be dropped with the 3.x fork.
118 lines
3.5 KiB
Python
118 lines
3.5 KiB
Python
# Copyright (c) 2023 Digital Asset (Switzerland) GmbH and/or its affiliates. All rights reserved.
|
|
# SPDX-License-Identifier: Apache-2.0
|
|
|
|
load(
|
|
"//language-support/scala/codegen:codegen.bzl",
|
|
"dar_to_scala",
|
|
)
|
|
load(
|
|
"//language-support/java/codegen:codegen.bzl",
|
|
"dar_to_java",
|
|
)
|
|
load(
|
|
"//daml-lf/language:daml-lf.bzl",
|
|
"lf_version_configuration",
|
|
"version_in",
|
|
)
|
|
load("//ledger-test-tool:conformance.bzl", "testtool_lf_versions")
|
|
load("//test-common:test-common.bzl", "da_scala_dar_resources_library")
|
|
|
|
alias(
|
|
name = "dar-files",
|
|
actual = "dar-files-default",
|
|
visibility = ["//visibility:public"],
|
|
)
|
|
|
|
[
|
|
[
|
|
# alias model-tests-KEYWORD.dar, dar-files-KEYWORD, and dar-files-KEYWORD-lib
|
|
# to model-tests-TAG.dar, dar-files-TAG, dar-files-TAG-lib, and test-common-TAG
|
|
# where : KEYWORD is a keyword like default, latest, or dev
|
|
# TAG is a (java friendly) version TAG like 1_8
|
|
# The mapping KEYWORD -> TAG is defined by test_common_configurations
|
|
alias(
|
|
name = "%s-%s%s" % (target_prefix, name, target_suffix),
|
|
actual = ":%s-%s%s" % (target_prefix, lf_version, target_suffix),
|
|
visibility = ["//visibility:public"],
|
|
),
|
|
]
|
|
for (target_prefix, target_suffix) in [
|
|
("benchtool-tests", ".dar"),
|
|
("model-tests", ".dar"),
|
|
("dar-files", ""),
|
|
("dar-files", "-lib"),
|
|
]
|
|
for (name, lf_version) in lf_version_configuration.items()
|
|
]
|
|
|
|
# Carbon tests helps to test upgrades when packages are dependent on each other
|
|
carbon_test_names = [
|
|
"carbonv1",
|
|
"carbonv2", #carbonv2 depends on carbon v1
|
|
"carbonv3", #carbonv3 depends on carbon v2
|
|
"modelext", #modelext depends on model
|
|
]
|
|
|
|
general_test_names = [
|
|
"benchtool",
|
|
"model",
|
|
"semantic",
|
|
"performance",
|
|
"package_management",
|
|
]
|
|
|
|
# Correspond to the directories under src/test/lib/daml
|
|
test_names = {
|
|
lf_version: general_test_names +
|
|
(carbon_test_names if version_in(
|
|
lf_version,
|
|
v1_minor_version_range = ("15", "dev"),
|
|
v2_minor_version_range = ("0", "dev"),
|
|
) else [])
|
|
for lf_version in testtool_lf_versions
|
|
}
|
|
|
|
da_scala_dar_resources_library(
|
|
add_maven_tag = True,
|
|
daml_dir_names = test_names,
|
|
daml_root_dir = "src/main/daml",
|
|
data_dependencies = {
|
|
"carbonv2": ["//test-common:carbonv1-tests-%s.build"],
|
|
"carbonv3": ["//test-common:carbonv2-tests-%s.build"],
|
|
"modelext": ["//test-common:model-tests-%s.build"],
|
|
},
|
|
exclusions = {
|
|
"1.8": [
|
|
"**/*Exception*.daml",
|
|
"**/*Interface*daml",
|
|
"**/Limits.daml",
|
|
"**/Foo.daml",
|
|
],
|
|
"1.14": [
|
|
"**/*Interface*daml",
|
|
],
|
|
},
|
|
lf_versions = testtool_lf_versions,
|
|
maven_name_prefix = "test",
|
|
visibility = ["//visibility:public"],
|
|
)
|
|
|
|
[
|
|
[
|
|
[
|
|
dar_to_java(
|
|
name = "%s-tests-%s.java-codegen" % (test_name, target),
|
|
src = ":%s-tests-%s.dar" % (test_name, target),
|
|
package_prefix = "com.daml.ledger.test.java.%s" % test_name,
|
|
tags = ["maven_coordinates=com.daml:test-common-%s-tests-java-%s:__VERSION__" % (
|
|
test_name.replace("_", "-"),
|
|
target,
|
|
)],
|
|
visibility = ["//visibility:public"],
|
|
),
|
|
]
|
|
for test_name in test_names.get(target, [])
|
|
]
|
|
for target in testtool_lf_versions
|
|
]
|