mirror of
https://github.com/digital-asset/daml.git
synced 2024-09-20 01:07:18 +03:00
d2e2c21684
New year, new copyright, new expected unknown issues with various files that won't be covered by the script and/or will be but shouldn't change. I'll do the details on Jan 1, but would appreciate this being preapproved so I can actually get it merged by then. CHANGELOG_BEGIN CHANGELOG_END
76 lines
1.6 KiB
Python
76 lines
1.6 KiB
Python
# Copyright (c) 2022 Digital Asset (Switzerland) GmbH and/or its affiliates. All rights reserved.
|
|
# SPDX-License-Identifier: Apache-2.0
|
|
|
|
load(
|
|
"//bazel_tools/client_server:client_server_test.bzl",
|
|
"client_server_test",
|
|
)
|
|
load(
|
|
"//bazel_tools/client_server:client_server_build.bzl",
|
|
"client_server_build",
|
|
)
|
|
load(
|
|
"//bazel_tools:scala.bzl",
|
|
"da_scala_binary",
|
|
)
|
|
load("@os_info//:os_info.bzl", "is_windows")
|
|
|
|
sh_binary(
|
|
name = "client",
|
|
srcs = ["client.sh"],
|
|
)
|
|
|
|
exports_files(["client_input_file"])
|
|
|
|
da_scala_binary(
|
|
name = "server",
|
|
srcs = ["server.scala"],
|
|
main_class = "com.daml.bazeltools.clientservertest.tests.Main",
|
|
scala_deps = [
|
|
"@maven//:com_github_scopt_scopt",
|
|
],
|
|
)
|
|
|
|
client_server_test(
|
|
name = "test",
|
|
timeout = "short",
|
|
client = ":client",
|
|
client_args = [
|
|
"--foobar",
|
|
# Use the input file passed in via `data`.
|
|
"$$(rlocation $$TEST_WORKSPACE/$(rootpath :client_input_file))",
|
|
"--target-port=%PORT%",
|
|
],
|
|
|
|
# Data files available to both client and server.
|
|
data = [
|
|
":client_input_file",
|
|
],
|
|
server = ":server",
|
|
server_args = [
|
|
"--port-file=%PORT_FILE%",
|
|
],
|
|
)
|
|
|
|
client_server_build(
|
|
name = "build",
|
|
outs = ["build.out"],
|
|
client = ":client",
|
|
client_args = [
|
|
"--foobar",
|
|
"--target-port=%PORT%",
|
|
],
|
|
client_files = [
|
|
":client_input_file",
|
|
],
|
|
# Data files available to both client and server.
|
|
data = [
|
|
":client_input_file",
|
|
],
|
|
output_env = "CS_OUT",
|
|
server = ":server",
|
|
server_args = [
|
|
"--port-file=%PORT_FILE%",
|
|
],
|
|
)
|