blob: ecbd841dda009898940e63f6f211bd0efaa99143 [file] [log] [blame]
load("//bazel/go:go_test.bzl", "go_test")
load("@io_bazel_rules_go//go:def.bzl", "go_library")
go_library(
name = "standalone",
srcs = [
"standalone_darwin.go",
"standalone_linux.go",
"standalone_windows.go",
],
importpath = "go.skia.org/infra/machine/go/test_machine_monitor/standalone",
visibility = ["//visibility:public"],
deps = select({
"@io_bazel_rules_go//go/platform:android": [
"//go/gpus",
"//go/skerr",
"//machine/go/common",
"//machine/go/test_machine_monitor/standalone/crossplatform",
"//machine/go/test_machine_monitor/standalone/linux",
"@com_github_shirou_gopsutil//host",
],
"@io_bazel_rules_go//go/platform:darwin": [
"//go/skerr",
"//machine/go/common",
"//machine/go/test_machine_monitor/standalone/crossplatform",
"//machine/go/test_machine_monitor/standalone/mac",
"@com_github_shirou_gopsutil//host",
"@org_golang_x_sys//unix",
],
"@io_bazel_rules_go//go/platform:ios": [
"//go/skerr",
"//machine/go/common",
"//machine/go/test_machine_monitor/standalone/crossplatform",
"//machine/go/test_machine_monitor/standalone/mac",
"@com_github_shirou_gopsutil//host",
"@org_golang_x_sys//unix",
],
"@io_bazel_rules_go//go/platform:linux": [
"//go/gpus",
"//go/skerr",
"//machine/go/common",
"//machine/go/test_machine_monitor/standalone/crossplatform",
"//machine/go/test_machine_monitor/standalone/linux",
"@com_github_shirou_gopsutil//host",
],
"@io_bazel_rules_go//go/platform:windows": [
"//go/skerr",
"//machine/go/test_machine_monitor/standalone/crossplatform",
"//machine/go/test_machine_monitor/standalone/windows",
"@com_github_shirou_gopsutil//host",
"@com_github_yusufpapurcu_wmi//:wmi",
],
"//conditions:default": [],
}),
)
go_test(
name = "standalone_test",
srcs = ["standalone_test.go"],
embed = [":standalone"],
deps = [
"@com_github_stretchr_testify//assert",
"@com_github_stretchr_testify//require",
],
)