blob: 29b3c7eb8ba40741a1b9dc150d9734f04bdc83c8 [file] [log] [blame]
load("//bazel/go:go_test.bzl", "go_test")
load("@io_bazel_rules_go//go:def.bzl", "go_library")
go_library(
name = "strategy",
srcs = [
"strategies.go",
"strategy.go",
],
importpath = "go.skia.org/infra/autoroll/go/strategy",
visibility = ["//visibility:public"],
deps = [
"//autoroll/go/revision",
"//go/ds",
"//go/util",
"@com_google_cloud_go_datastore//:datastore",
],
)
go_test(
name = "strategy_test",
srcs = [
"strategies_test.go",
"strategy_test.go",
],
embed = [":strategy"],
# Datastore tests fail intermittently when running locally (i.e. not on RBE) due to tests
# running in parallel against the same Datastore emulator instance:
#
# rpc error: code = Aborted desc = too much contention on these datastore entities.
#
# This is not an issue on RBE because each test target starts its own emulator instance.
#
# https://docs.bazel.build/versions/master/be/common-definitions.html#common-attributes-tests
flaky = True,
deps = [
"//autoroll/go/revision",
"//go/ds",
"//go/ds/testutil",
"//go/testutils/unittest",
"@com_github_stretchr_testify//require",
],
)