aboutsummaryrefslogtreecommitdiff
path: root/tests/common_settings/BUILD
blob: bbf32d55357ec7aab79ea65640bccfad91945df3 (plain)
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
load("//rules:common_settings.bzl", "int_flag", "string_flag")

int_flag(
    name = "my_int_flag",
    build_setting_default = 42,
    make_variable = "MY_INT_FLAG",
)

string_flag(
    name = "my_string_flag",
    build_setting_default = "foo",
    make_variable = "MY_STRING_FLAG",
)

sh_test(
    name = "make_variable_test",
    srcs = ["make_variable_test.sh"],
    env = {
        "MESSAGE": "Hello, $(MY_STRING_FLAG)! My name is $(MY_INT_FLAG).",
    },
    toolchains = [
        ":my_int_flag",
        ":my_string_flag",
    ],
)