Pete Bacon Darwin 10525af67b test(compiler-cli): generate golden files for partial compilation (#39617)
This commit adds a JS script that can generate a partial golden file
for test cases in the compiler compliance tests.

PR Close #39617
2020-11-13 11:25:56 -08:00

15 lines
650 B
Python

load("@build_bazel_rules_nodejs//:index.bzl", "copy_to_bin")
load("//packages/compiler-cli/test/compliance/partial:partial_compliance_goldens.bzl", "partial_compliance_golden")
package(default_visibility = ["//packages/compiler-cli/test/compliance:__subpackages__"])
# Normally we would use `file_group` here but this doesn't work on Windows because there
# appears to be a bug with making the `runfiles` folder available.
# See https://github.com/bazelbuild/rules_nodejs/issues/1689
copy_to_bin(
name = "test_cases",
srcs = glob(["*/**"]),
)
[partial_compliance_golden(filePath = path) for path in glob(include = ["**/TEST_CASES.json"])]