daml/ledger/ledger-api-integration-tests/BUILD.bazel
Gerolf Seitz 8a08b752a9
Use Ledger API Test Tool for sandbox (#1545)
Extra command line arguments to the client_server_test target are passed
to the ledger-api-test-tool instead of the arguments defined in the
bazel target.

For example:
`bazel run //ledger/sandbox:conformance-test-static-time --list` will
pass the --list parameter to the ledger-api-test-tool (to print all
available tests), instead of actually running the tests in static-time mode.


The Ledger API Test Tool takes the flag --all-tests to run all defaul
 and optional tests

The tool also allows multiple occurrences of the --include and --exclude
flags.

Also removes StandaloneSemanticTestRunner.

Fixes #1371
2019-06-07 12:04:31 +02:00

125 lines
3.7 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",
)
load(
"//bazel_tools:scala.bzl",
"da_scala_binary",
"da_scala_library",
"da_scala_test_suite",
)
dependencies = [
"//3rdparty/jvm/com/github/scopt:scopt",
"//3rdparty/jvm/com/google/guava:guava",
"//3rdparty/jvm/com/typesafe/akka:akka_stream",
"//3rdparty/jvm/com/typesafe/scala_logging:scala_logging",
"//3rdparty/jvm/io/grpc:grpc_core",
"//3rdparty/jvm/io/grpc:grpc_netty",
"//3rdparty/jvm/io/grpc:grpc_services",
"//3rdparty/jvm/io/netty:netty_codec_http2",
"//3rdparty/jvm/io/netty:netty_handler",
"//3rdparty/jvm/org/scalatest:scalatest",
"//3rdparty/jvm/org/scalaz:scalaz_concurrent",
"//3rdparty/jvm/org/scalaz:scalaz_core",
"//3rdparty/jvm/org/slf4j:slf4j_api",
"//daml-lf/archive:daml_lf_archive_scala",
"//daml-lf/archive:daml_lf_java_proto",
"//daml-lf/data",
"//daml-lf/engine",
"//daml-lf/interpreter",
"//daml-lf/lfpackage",
"//daml-lf/scenario-interpreter",
"//daml-lf/transaction",
"//language-support/scala/bindings",
"//ledger-api/rs-grpc-akka",
"//ledger-api/rs-grpc-bridge",
"//ledger-api/testing-utils",
"//ledger/ledger-api-client:ledger-api-client",
"//ledger/ledger-api-common:ledger-api-common",
"//ledger/ledger-api-domain:ledger-api-domain",
"//ledger/ledger-api-scala-logging",
"//ledger/sandbox:sandbox",
"//ledger/test-common:test-common",
"//ledger/sandbox:sandbox-scala-tests-lib",
"//ledger/participant-state",
]
da_scala_library(
name = "ledger-api-integration-tests-lib",
srcs = glob(["src/test/lib/**/*.scala"]),
visibility = [
"//visibility:public",
],
deps = dependencies + [
"//daml-lf/testing-tools",
],
)
java_library(
name = "default-it-logback-config",
resources = ["src/test/resources/logback-test.xml"],
visibility = [
"//visibility:public",
],
)
da_scala_library(
name = "ledger-api-integration-tests-as-library",
srcs = glob([
"src/test/itsuite/**/*.scala",
"src/test/semanticsuite/**/*.scala",
]),
visibility = [
"//ledger/ledger-api-test-tool:__subpackages__",
],
deps = [
":ledger-api-integration-tests-lib",
"//daml-lf/testing-tools",
] + dependencies,
)
da_scala_test_suite(
name = "ledger-api-integration-tests",
size = "large",
# WARNING: srcs list has to be explicit here! It can not be added via deps, due to
# test discovery mechanism in the test_suite macro working only on sources.
srcs = glob(
include = ["src/test/itsuite/**/*.scala"],
# the excluded tests are run by the conformance test via the ledger-api-test-tool
# see //ledger/sandbox:conformance-test-*
exclude = ["src/test/itsuite/**/TransactionServiceIT.scala"],
),
data = [
"//ledger/sandbox:Test.dar",
],
# this test suite is very intensive, long, and relying on timeouts. Moreover,
# the test suite already parallelizes each scala test, so we'll still be busy
# only with this one. for the same reason we do not run it on macos -- it takes
# up to 20 minutes on our macOS ci workers.
tags = [
"dont-run-on-darwin",
"exclusive",
],
deps = [
":default-it-logback-config",
":ledger-api-integration-tests-lib",
] + dependencies,
)
TEST_FILES = [
"SemanticTests",
]
[
daml_compile(
name = name,
main_src = "src/test/semanticsuite/daml/%s.daml" % name,
visibility = ["//visibility:public"],
)
for name in TEST_FILES
]