2020-04-23 13:58:11 +03:00
|
|
|
# Copyright (c) 2020 Digital Asset (Switzerland) GmbH and/or its affiliates. All rights reserved.
|
|
|
|
# SPDX-License-Identifier: Apache-2.0
|
|
|
|
|
2020-05-05 13:33:32 +03:00
|
|
|
load("@bazel_skylib//lib:versions.bzl", "versions")
|
2020-04-27 15:55:16 +03:00
|
|
|
load("@os_info//:os_info.bzl", "is_windows")
|
2020-04-23 15:46:22 +03:00
|
|
|
load("//bazel_tools:testing.bzl", "sdk_platform_test")
|
2020-05-05 13:33:32 +03:00
|
|
|
load(
|
|
|
|
"//bazel_tools/daml_script:daml_script.bzl",
|
|
|
|
"daml_script_dar",
|
|
|
|
"daml_script_test",
|
|
|
|
)
|
2020-04-23 13:58:11 +03:00
|
|
|
|
2020-04-24 15:04:14 +03:00
|
|
|
config_setting(
|
|
|
|
name = "ghci_data",
|
|
|
|
define_values = {
|
|
|
|
"ghci_data": "True",
|
|
|
|
},
|
|
|
|
)
|
|
|
|
|
2020-04-23 15:46:22 +03:00
|
|
|
sdk_versions = [
|
|
|
|
"1.0.0",
|
|
|
|
"1.0.1-snapshot.20200417.3908.1.722bac90",
|
2020-04-24 13:21:28 +03:00
|
|
|
"1.1.0-snapshot.20200422.3991.0.6391ee9f",
|
2020-04-24 15:43:35 +03:00
|
|
|
"0.0.0",
|
2020-04-23 15:46:22 +03:00
|
|
|
]
|
|
|
|
|
|
|
|
platform_versions = [
|
|
|
|
"1.0.0",
|
|
|
|
"1.0.1-snapshot.20200417.3908.1.722bac90",
|
2020-04-24 15:04:14 +03:00
|
|
|
"1.1.0-snapshot.20200422.3991.0.6391ee9f",
|
2020-04-24 15:43:35 +03:00
|
|
|
"0.0.0",
|
2020-04-23 15:46:22 +03:00
|
|
|
]
|
|
|
|
|
2020-04-24 13:08:32 +03:00
|
|
|
[
|
|
|
|
sh_binary(
|
|
|
|
name = "sandbox-with-postgres-{}".format(version),
|
|
|
|
srcs = ["@//bazel_tools:sandbox-with-postgres.sh"],
|
2020-04-24 15:04:14 +03:00
|
|
|
data = [
|
|
|
|
"@//bazel_tools/client_server:with-postgres",
|
|
|
|
"@daml-sdk-{}//:daml".format(version),
|
|
|
|
],
|
2020-04-24 13:08:32 +03:00
|
|
|
deps = ["@bazel_tools//tools/bash/runfiles"],
|
2020-04-24 15:04:14 +03:00
|
|
|
)
|
|
|
|
for version in platform_versions
|
2020-04-24 13:08:32 +03:00
|
|
|
]
|
|
|
|
|
2020-04-23 15:46:22 +03:00
|
|
|
[
|
|
|
|
sdk_platform_test(
|
|
|
|
platform_version = platform_version,
|
2020-04-24 15:04:14 +03:00
|
|
|
sdk_version = sdk_version,
|
2020-04-23 15:46:22 +03:00
|
|
|
)
|
|
|
|
for sdk_version in sdk_versions
|
|
|
|
for platform_version in platform_versions
|
2020-04-28 17:06:36 +03:00
|
|
|
]
|
2020-04-24 15:43:35 +03:00
|
|
|
|
2020-05-05 13:33:32 +03:00
|
|
|
[
|
|
|
|
daml_script_dar(sdk_version)
|
|
|
|
for sdk_version in sdk_versions
|
|
|
|
]
|
|
|
|
|
|
|
|
[
|
|
|
|
daml_script_test(
|
|
|
|
compiler_version = sdk_version,
|
|
|
|
runner_version = platform_version,
|
|
|
|
)
|
|
|
|
for sdk_version in sdk_versions
|
|
|
|
for platform_version in platform_versions
|
|
|
|
# Test that the DAML script runner can run DARs built with an older SDK
|
|
|
|
# version. I.e. where the runner version is at least the SDK version or
|
|
|
|
# more recent. The HEAD version 0.0.0 is a special case.
|
|
|
|
if versions.is_at_least(sdk_version, platform_version) and sdk_version != "0.0.0" or
|
|
|
|
platform_version == "0.0.0"
|
|
|
|
]
|
|
|
|
|
2020-04-24 15:43:35 +03:00
|
|
|
test_suite(
|
|
|
|
name = "head-quick",
|
|
|
|
tags = ["head-quick"],
|
|
|
|
)
|