mirror of
https://github.com/netbirdio/gvisor.git
synced 2026-05-22 17:12:49 -07:00
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:
@@ -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
@@ -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
@@ -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,
|
||||
)
|
||||
|
||||
Reference in New Issue
Block a user