daml/daml-lf/tests/BUILD.bazel

77 lines
1.8 KiB
Python
Raw Normal View History

2019-04-04 11:33:38 +03:00
# Copyright (c) 2019 Digital Asset (Switzerland) GmbH and/or its affiliates. All rights reserved.
# SPDX-License-Identifier: Apache-2.0
load(
"//rules_daml:daml.bzl",
"daml_compile",
2019-04-04 11:33:38 +03:00
)
TEST_FILES = \
[
"BasicTests",
"AuthorizedDivulgence",
"DontDiscloseNonConsumingChoicesToObservers",
"LargeTransaction",
"ConjunctionChoices",
]
2019-04-04 11:33:38 +03:00
[
daml_compile(
name = name,
main_src = "%s.daml" % name,
visibility = ["//daml-lf:__subpackages__"],
)
for name in TEST_FILES
2019-04-04 11:33:38 +03:00
]
daml_compile(
name = "Optional",
main_src = "Optional.daml",
visibility = ["//daml-lf:__subpackages__"],
2019-04-04 11:33:38 +03:00
)
[
sh_test(
name = name + "-test",
size = "small",
srcs = ["daml-lf-test.sh"],
args = [
"$(location //daml-lf/repl:repl)",
"$(location //daml-foundations/daml-tools/damlc-app)",
2019-04-15 17:45:08 +03:00
"$(location :%s.dar)" % name,
],
data = [
"//daml-foundations/daml-tools/damlc-app",
"//daml-lf/repl",
2019-04-15 17:45:08 +03:00
":%s.dar" % name,
],
deps = [
"@bazel_tools//tools/bash/runfiles",
],
)
for name in TEST_FILES
2019-04-04 11:33:38 +03:00
]
[
sh_test(
name = "test-scenario-1-dev-" + file.split("/")[2],
size = "medium",
srcs = ["scenario/test.sh"],
args = [
"$(location //daml-lf/repl:repl)",
"$(location //daml-foundations/daml-tools/damlc-app:damlc-app)",
"$(location :%s)" % file,
],
data = [
"//daml-foundations/daml-tools/damlc-app",
"//daml-lf/repl",
file,
"%s/EXPECTED.ledger" % "/".join(file.split("/")[0:3]),
],
deps = [
"@bazel_tools//tools/bash/runfiles",
],
)
for file in glob(["scenario/daml-1.dev/*/Test.daml"])
2019-04-04 11:33:38 +03:00
]