mirror of
https://github.com/digital-asset/daml.git
synced 2024-09-20 17:28:46 +03:00
a925f0174c
* update copyright notices for 2021 To be merged on 2021-01-01. CHANGELOG_BEGIN CHANGELOG_END * patch-bazel-windows & da-ghc-lib
111 lines
2.6 KiB
Python
111 lines
2.6 KiB
Python
# Copyright (c) 2021 Digital Asset (Switzerland) GmbH and/or its affiliates. All rights reserved.
|
|
# SPDX-License-Identifier: Apache-2.0
|
|
|
|
load(
|
|
"//rules_daml:daml.bzl",
|
|
"daml_compile",
|
|
)
|
|
|
|
TEST_FILES = \
|
|
[
|
|
"BasicTests",
|
|
"AuthorizedDivulgence",
|
|
"DontDiscloseNonConsumingExercisesToObservers",
|
|
"LargeTransaction",
|
|
"ConjunctionChoices",
|
|
"ContractKeys",
|
|
]
|
|
|
|
[
|
|
daml_compile(
|
|
name = name,
|
|
srcs = ["%s.daml" % name],
|
|
visibility = ["//daml-lf:__subpackages__"],
|
|
)
|
|
for name in TEST_FILES
|
|
]
|
|
|
|
daml_compile(
|
|
name = "Optional",
|
|
srcs = ["Optional.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)",
|
|
"$(location :%s.dar)" % name,
|
|
],
|
|
data = [
|
|
"//compiler/damlc",
|
|
"//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)",
|
|
"$(location :%s)" % file,
|
|
"$(POSIX_DIFF)",
|
|
"false",
|
|
],
|
|
data = [
|
|
"//compiler/damlc",
|
|
"//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)",
|
|
"$(location :%s)" % file,
|
|
"$(POSIX_DIFF)",
|
|
"true",
|
|
],
|
|
data = [
|
|
"//compiler/damlc",
|
|
"//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"])
|
|
]
|