mirror of
https://github.com/digital-asset/daml.git
synced 2024-09-20 09:17:43 +03:00
d2e2c21684
New year, new copyright, new expected unknown issues with various files that won't be covered by the script and/or will be but shouldn't change. I'll do the details on Jan 1, but would appreciate this being preapproved so I can actually get it merged by then. CHANGELOG_BEGIN CHANGELOG_END
161 lines
3.8 KiB
Python
161 lines
3.8 KiB
Python
# Copyright (c) 2022 Digital Asset (Switzerland) GmbH and/or its affiliates. All rights reserved.
|
|
# SPDX-License-Identifier: Apache-2.0
|
|
|
|
load(
|
|
"//rules_daml:daml.bzl",
|
|
"daml_build_test",
|
|
"daml_compile",
|
|
)
|
|
load(
|
|
"//daml-lf/language:daml-lf.bzl",
|
|
"lf_version_configuration",
|
|
)
|
|
|
|
TEST_FILES = \
|
|
[
|
|
"BasicTests",
|
|
"AuthorizedDivulgence",
|
|
"DontDiscloseNonConsumingExercisesToObservers",
|
|
"LargeTransaction",
|
|
"ConjunctionChoices",
|
|
"ContractKeys",
|
|
"AuthTests",
|
|
]
|
|
|
|
[
|
|
daml_compile(
|
|
name = name,
|
|
srcs = ["%s.daml" % name],
|
|
enable_scenarios = True,
|
|
visibility = ["//daml-lf:__subpackages__"],
|
|
)
|
|
for name in TEST_FILES
|
|
]
|
|
|
|
daml_compile(
|
|
name = "Optional",
|
|
srcs = ["Optional.daml"],
|
|
visibility = ["//daml-lf:__subpackages__"],
|
|
)
|
|
|
|
daml_compile(
|
|
name = "Exceptions",
|
|
srcs = ["Exceptions.daml"],
|
|
visibility = ["//daml-lf:__subpackages__"],
|
|
)
|
|
|
|
daml_compile(
|
|
name = "Interfaces",
|
|
srcs = ["Interfaces.daml"],
|
|
target = "1.dev",
|
|
visibility = ["//daml-lf:__subpackages__"],
|
|
)
|
|
|
|
daml_build_test(
|
|
name = "ReinterpretTests",
|
|
dar_dict = {
|
|
"//daml-lf/tests:AtVersion13.dar": "at-version-13.dar",
|
|
"//daml-lf/tests:AtVersion14.dar": "at-version-14.dar",
|
|
},
|
|
project_dir = "reinterpret",
|
|
visibility = ["//daml-lf:__subpackages__"],
|
|
)
|
|
|
|
daml_compile(
|
|
name = "AtVersion13",
|
|
srcs = ["reinterpret/AtVersion13.daml"],
|
|
target = "1.13",
|
|
visibility = ["//daml-lf:__subpackages__"],
|
|
)
|
|
|
|
daml_compile(
|
|
name = "AtVersion14",
|
|
srcs = ["reinterpret/AtVersion14.daml"],
|
|
target = "1.14",
|
|
visibility = ["//daml-lf:__subpackages__"],
|
|
)
|
|
|
|
daml_compile(
|
|
name = "MultiKeys",
|
|
srcs = ["MultiKeys.daml"],
|
|
visibility = ["//daml-lf:__subpackages__"],
|
|
)
|
|
|
|
[
|
|
sh_test(
|
|
name = name + "-test",
|
|
size = "small",
|
|
srcs = ["daml-lf-test.sh"],
|
|
args = [
|
|
"$(location //daml-lf/repl:repl)",
|
|
"$(location //compiler/damlc:damlc-compile-only)",
|
|
"$(location :%s.dar)" % name,
|
|
],
|
|
data = [
|
|
"//compiler/damlc:damlc-compile-only",
|
|
"//daml-lf/repl",
|
|
":%s.dar" % name,
|
|
],
|
|
deps = [
|
|
"@bazel_tools//tools/bash/runfiles",
|
|
],
|
|
)
|
|
for name in TEST_FILES
|
|
]
|
|
|
|
[
|
|
sh_test(
|
|
name = "test-scenario-stable-" + file.split("/")[2],
|
|
size = "medium",
|
|
srcs = ["scenario/test.sh"],
|
|
args = [
|
|
"$(location //daml-lf/repl:repl)",
|
|
"$(location //compiler/damlc:damlc-compile-only)",
|
|
"$(location :%s)" % file,
|
|
"$(POSIX_DIFF)",
|
|
"false",
|
|
],
|
|
data = [
|
|
"//compiler/damlc:damlc-compile-only",
|
|
"//daml-lf/repl",
|
|
file,
|
|
"%s/EXPECTED.ledger" % "/".join(file.split("/")[0:3]),
|
|
],
|
|
toolchains = [
|
|
"@rules_sh//sh/posix:make_variables",
|
|
],
|
|
deps = [
|
|
"@bazel_tools//tools/bash/runfiles",
|
|
],
|
|
)
|
|
for file in glob(["scenario/stable/*/Test.daml"])
|
|
]
|
|
|
|
[
|
|
sh_test(
|
|
name = "test-scenario-dev-" + file.split("/")[2],
|
|
size = "medium",
|
|
srcs = ["scenario/test.sh"],
|
|
args = [
|
|
"$(location //daml-lf/repl:repl)",
|
|
"$(location //compiler/damlc:damlc-compile-only)",
|
|
"$(location :%s)" % file,
|
|
"$(POSIX_DIFF)",
|
|
"true",
|
|
],
|
|
data = [
|
|
"//compiler/damlc:damlc-compile-only",
|
|
"//daml-lf/repl",
|
|
file,
|
|
"%s/EXPECTED.ledger" % "/".join(file.split("/")[0:3]),
|
|
],
|
|
toolchains = [
|
|
"@rules_sh//sh/posix:make_variables",
|
|
],
|
|
deps = [
|
|
"@bazel_tools//tools/bash/runfiles",
|
|
],
|
|
)
|
|
for file in glob(["scenario/dev/*/Test.daml"])
|
|
]
|