daml/daml-lf/tests/BUILD.bazel
gleber aa70c7f64e
Enforce consistent formatting of BUILD files. (#412)
* Add buildifier targets.

The tool allows to check and format BUILD files in the repo.

To check if files are well formatted, run:

    bazel run //:buildifier

To fix badly-formatted files run:

    bazel run //:buildifier-fix

* Cleanup dade-copyright-headers formatting.

* Fix dade-copyright-headers on files with just the copyright.

* Run buildifier automatically on CI via 'fmt.sh'.

* Reformat all BUILD files with buildifier.

Excludes autogenerated Bazel files.
2019-04-12 13:10:16 +02:00

77 lines
2.2 KiB
Python

# 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",
)
TEST_FILES = \
[
"BasicTests",
"AuthorizedDivulgence",
"DontDiscloseNonConsumingChoicesToObservers",
"LargeTransaction",
"ConjunctionChoices",
]
[
daml_compile(
name = name,
damlc = "//daml-foundations/daml-tools/da-hs-damlc-app:da-hs-damlc-app-deprecated",
main_src = "%s.daml" % name,
target = "1.3",
visibility = ["//daml-lf:__subpackages__"],
)
for name in TEST_FILES
]
daml_compile(
name = "Optional",
damlc = "//daml-foundations/daml-tools/da-hs-damlc-app:da-hs-damlc-app-deprecated",
main_src = "Optional.daml",
target = "1.3",
visibility = ["//daml-lf:__subpackages__"],
)
[
sh_test(
name = name + "-test",
size = "small",
srcs = ["daml-lf-test.sh"],
args = [
"$(location //daml-lf/repl:repl)",
"$(location //daml-foundations/daml-tools/da-hs-damlc-app)",
"$(location :%s.dalf)" % name,
],
data = [
"//daml-foundations/daml-tools/da-hs-damlc-app",
"//daml-lf/repl",
":%s.dalf" % name,
],
)
for name in TEST_FILES
]
[
sh_test(
name = "test-scenario-1-3-" + file.split("/")[2],
size = "small",
srcs = ["scenario/test.sh"],
args = [
"$(location //daml-lf/repl:repl)",
"$(location //daml-foundations/daml-tools/da-hs-damlc-app:da-hs-damlc-app-deprecated)",
"$(location :%s)" % file,
"$(location //daml-foundations/daml-ghc/package-database/deprecated:daml-prim-1.3.dalf)",
],
data = [
"//daml-foundations/daml-ghc/package-database/deprecated:daml-prim-1.3.dalf",
"//daml-foundations/daml-tools/da-hs-damlc-app:da-hs-damlc-app-deprecated",
"//daml-lf/repl",
file,
"%s/EXPECTED.ledger" % "/".join(file.split("/")[0:3]),
],
)
for file in glob(["scenario/daml-1.3/*/Test.daml"])
]