daml/compatibility/BUILD
Moritz Kiefer 49e19ebed1
Make compat tests work on windows (#5732)
* Make compat tests work on windows

This required some changes to the daml_sdk rule since the read-only
installation by the assistant breaks Bazel completely. We could only
apply those changes on Windows but I think I prefer the consistency
across platforms here over trying to stay close to how the SDK is
installed on user machines given that the SDK installation is not
something we’ve had issues with.

I’ve excluded the postgresql tests for now. I don’t expect them to be
particularly hard to fix but I’ve already spent almost 2 days on this
and having some tests run on Windows seems like a clear improvement
over running no tests on Windows :)

changelog_begin
changelog_end

* Remove todo

changelog_begin
changelog_end
2020-04-28 16:06:36 +02:00

58 lines
1.3 KiB
Python

# Copyright (c) 2020 Digital Asset (Switzerland) GmbH and/or its affiliates. All rights reserved.
# SPDX-License-Identifier: Apache-2.0
load(
"@daml//bazel_tools/client_server:client_server_test.bzl",
"client_server_test",
)
load("@os_info//:os_info.bzl", "is_windows")
load("//bazel_tools:testing.bzl", "sdk_platform_test")
config_setting(
name = "ghci_data",
define_values = {
"ghci_data": "True",
},
)
sdk_versions = [
"1.0.0",
"1.0.1-snapshot.20200417.3908.1.722bac90",
"1.1.0-snapshot.20200422.3991.0.6391ee9f",
"0.0.0",
]
platform_versions = [
"1.0.0",
"1.0.1-snapshot.20200417.3908.1.722bac90",
"1.1.0-snapshot.20200422.3991.0.6391ee9f",
"0.0.0",
]
[
sh_binary(
name = "sandbox-with-postgres-{}".format(version),
srcs = ["@//bazel_tools:sandbox-with-postgres.sh"],
data = [
"@//bazel_tools/client_server:with-postgres",
"@daml-sdk-{}//:daml".format(version),
],
deps = ["@bazel_tools//tools/bash/runfiles"],
)
for version in platform_versions
]
[
sdk_platform_test(
platform_version = platform_version,
sdk_version = sdk_version,
)
for sdk_version in sdk_versions
for platform_version in platform_versions
]
test_suite(
name = "head-quick",
tags = ["head-quick"],
)