make: set --//tools/nogo:fast by default

nogo:fast is converted to nogo:full with the opposite meaning.
All nogo tests have to be always executed with this option.

Analyzing Go Standard Library takes about 10 minutes on buildkite,
but it is required only to run nogo tests.

PiperOrigin-RevId: 438343203
This commit is contained in:
Andrei Vagin
2022-03-30 10:53:28 -07:00
committed by gVisor bot
parent 5bb1f5086e
commit be49295381
3 changed files with 10 additions and 5 deletions
+1 -1
View File
@@ -197,7 +197,7 @@ smoke-race-tests: ## Runs a smoke test after build building runsc in race config
.PHONY: smoke-race-tests
nogo-tests:
@$(call test,--build_tag_filters=nogo --test_tag_filters=nogo //:all pkg/... tools/...)
@$(call test,--build_tag_filters=nogo --test_tag_filters=nogo --//tools/nogo:full //:all pkg/... tools/...)
.PHONY: nogo-tests
# For unit tests, we take everything in the root, pkg/... and tools/..., and
+2 -1
View File
@@ -4,8 +4,9 @@ load("//tools/nogo:defs.bzl", "nogo_stdlib", "nogo_target")
package(licenses = ["notice"])
bool_flag(
name = "fast",
name = "full",
build_setting_default = False,
visibility = ["//visibility:public"],
)
nogo_target(
+7 -3
View File
@@ -65,7 +65,7 @@ NogoStdlibInfo = provider(
def _nogo_stdlib_impl(ctx):
# If this is disabled, return nothing.
if ctx.attr._fast[BuildSettingInfo].value:
if not ctx.attr._nogo_full[BuildSettingInfo].value:
return [NogoStdlibInfo(
facts = None,
raw_findings = [],
@@ -123,8 +123,8 @@ nogo_stdlib = go_rule(
default = "//tools/nogo:target",
cfg = "target",
),
"_fast": attr.label(
default = "//tools/nogo:fast",
"_nogo_full": attr.label(
default = "//tools/nogo:full",
cfg = "host",
),
},
@@ -419,6 +419,10 @@ nogo_test = rule(
default = "//tools/nogo:target",
cfg = "target",
),
"_nogo_full": attr.label(
default = "//tools/nogo:full",
cfg = "exec",
),
},
test = True,
)