about summary refs log tree commit diff
path: root/third_party/bazel/rules_haskell/tests/rule_test_exe.bzl
blob: fdecbb385871870c83af6b526f1ddb0ee61b6bfa (plain) (blame)
1
2
3
4
5
6
7
8
9
10
11
12
13
14
load("@bazel_tools//tools/build_rules:test_rules.bzl", "rule_test")

def rule_test_exe(generates, **kwargs):
    """
        Like 'rule_test' but appends ".exe" to the elements of
        "generates".
    """

    new_generates = select({
        "@bazel_tools//src/conditions:windows": [e + ".exe" for e in generates],
        "//conditions:default": generates,
    })

    rule_test(generates = new_generates, **kwargs)