Reputation: 4539
I'm trying to specify a env variable for a bazel test. I've tried the following but it fails:
cc_test(
name = "some_test",
size = "small",
deps = ["some_thing"],
srcs = ["test.cc"],
env = ["ENVVAR=foo"],
}
Upvotes: 2
Views: 1326
Reputation: 4539
I could not find this documented and I found it by trial and error. This works.
cc_test(
name = "some_test",
size = "small",
deps = ["some_thing"],
srcs = ["test.cc"],
env = {"ENVVAR":"foo"},
}
Upvotes: 3