2020-03-27 03:26:10 +03:00
|
|
|
# Copyright (c) 2020 Digital Asset (Switzerland) GmbH and/or its affiliates. All rights reserved.
|
2019-04-04 11:33:38 +03:00
|
|
|
# SPDX-License-Identifier: Apache-2.0
|
|
|
|
|
|
|
|
load(
|
2019-04-12 14:10:16 +03:00
|
|
|
"//rules_daml:daml.bzl",
|
|
|
|
"daml_compile",
|
2019-04-04 11:33:38 +03:00
|
|
|
)
|
|
|
|
|
|
|
|
TEST_FILES = \
|
2019-04-12 14:10:16 +03:00
|
|
|
[
|
|
|
|
"BasicTests",
|
|
|
|
"AuthorizedDivulgence",
|
2019-11-01 18:14:25 +03:00
|
|
|
"DontDiscloseNonConsumingExercisesToObservers",
|
2019-04-12 14:10:16 +03:00
|
|
|
"LargeTransaction",
|
|
|
|
"ConjunctionChoices",
|
2020-05-27 17:27:50 +03:00
|
|
|
"ContractKeys",
|
2019-04-12 14:10:16 +03:00
|
|
|
]
|
2019-04-04 11:33:38 +03:00
|
|
|
|
|
|
|
[
|
2019-04-12 14:10:16 +03:00
|
|
|
daml_compile(
|
|
|
|
name = name,
|
2020-03-19 02:06:55 +03:00
|
|
|
srcs = ["%s.daml" % name],
|
2019-04-12 14:10:16 +03:00
|
|
|
visibility = ["//daml-lf:__subpackages__"],
|
|
|
|
)
|
|
|
|
for name in TEST_FILES
|
2019-04-04 11:33:38 +03:00
|
|
|
]
|
|
|
|
|
|
|
|
daml_compile(
|
2019-04-12 14:10:16 +03:00
|
|
|
name = "Optional",
|
2020-03-19 02:06:55 +03:00
|
|
|
srcs = ["Optional.daml"],
|
2019-04-12 14:10:16 +03:00
|
|
|
visibility = ["//daml-lf:__subpackages__"],
|
2019-04-04 11:33:38 +03:00
|
|
|
)
|
|
|
|
|
|
|
|
[
|
2019-04-12 14:10:16 +03:00
|
|
|
sh_test(
|
|
|
|
name = name + "-test",
|
|
|
|
size = "small",
|
|
|
|
srcs = ["daml-lf-test.sh"],
|
|
|
|
args = [
|
|
|
|
"$(location //daml-lf/repl:repl)",
|
2019-07-08 12:40:48 +03:00
|
|
|
"$(location //compiler/damlc)",
|
2019-04-15 17:45:08 +03:00
|
|
|
"$(location :%s.dar)" % name,
|
2019-04-12 14:10:16 +03:00
|
|
|
],
|
|
|
|
data = [
|
2019-07-08 12:40:48 +03:00
|
|
|
"//compiler/damlc",
|
2019-04-12 14:10:16 +03:00
|
|
|
"//daml-lf/repl",
|
2019-04-15 17:45:08 +03:00
|
|
|
":%s.dar" % name,
|
2019-04-12 14:10:16 +03:00
|
|
|
],
|
2019-05-14 17:18:55 +03:00
|
|
|
deps = [
|
|
|
|
"@bazel_tools//tools/bash/runfiles",
|
|
|
|
],
|
2019-04-12 14:10:16 +03:00
|
|
|
)
|
|
|
|
for name in TEST_FILES
|
2019-04-04 11:33:38 +03:00
|
|
|
]
|
|
|
|
|
|
|
|
[
|
2019-04-12 14:10:16 +03:00
|
|
|
sh_test(
|
2019-06-03 21:00:25 +03:00
|
|
|
name = "test-scenario-1-dev-" + file.split("/")[2],
|
2019-05-14 17:18:55 +03:00
|
|
|
size = "medium",
|
2019-04-12 14:10:16 +03:00
|
|
|
srcs = ["scenario/test.sh"],
|
|
|
|
args = [
|
|
|
|
"$(location //daml-lf/repl:repl)",
|
2019-07-08 12:40:48 +03:00
|
|
|
"$(location //compiler/damlc)",
|
2019-04-12 14:10:16 +03:00
|
|
|
"$(location :%s)" % file,
|
2019-11-26 12:06:44 +03:00
|
|
|
"$(POSIX_DIFF)",
|
2019-04-12 14:10:16 +03:00
|
|
|
],
|
|
|
|
data = [
|
2019-07-08 12:40:48 +03:00
|
|
|
"//compiler/damlc",
|
2019-04-12 14:10:16 +03:00
|
|
|
"//daml-lf/repl",
|
|
|
|
file,
|
|
|
|
"%s/EXPECTED.ledger" % "/".join(file.split("/")[0:3]),
|
|
|
|
],
|
2019-11-26 12:06:44 +03:00
|
|
|
toolchains = [
|
|
|
|
"@rules_sh//sh/posix:make_variables",
|
|
|
|
],
|
2019-05-14 17:18:55 +03:00
|
|
|
deps = [
|
|
|
|
"@bazel_tools//tools/bash/runfiles",
|
|
|
|
],
|
2019-04-12 14:10:16 +03:00
|
|
|
)
|
2019-06-03 21:00:25 +03:00
|
|
|
for file in glob(["scenario/daml-1.dev/*/Test.daml"])
|
2019-04-04 11:33:38 +03:00
|
|
|
]
|