Skip to content

Commit dc1054f

Browse files
committed
Mark non-hermetic targets 'manual'.
They can only run on special machines that have the binaries `git` (for the format tests) or `make` installed AND with their bazel configured to actually look in the path. These targets currently will fail on strict systems (such as NixOS), so make the whole process painful. To fix, the binaries either should be replaced with simpler processes (e.g. why use `make` if we have bazel), or commpiled as part of a bazel dependency. Makes #10311 slightly less painful by not failing in globbing mode. Signed-off-by: Henner Zeller <h.zeller@acm.org>
1 parent 4db8ad9 commit dc1054f

5 files changed

Lines changed: 27 additions & 13 deletions

File tree

.bazelrc

Lines changed: 5 additions & 5 deletions
Original file line numberDiff line numberDiff line change
@@ -91,8 +91,8 @@ build --host_per_file_copt=.*external/.*@-w
9191

9292
# This avoid problems with building -c dbg which enables asserts.
9393
# Without this libstdc++ vs libc++ differences cause link errors.
94-
build --per_file_copt=.*external/abc.*@-stdlib=libc++
95-
build --host_per_file_copt=.*external/abc.*@-stdlib=libc++
94+
#build --per_file_copt=.*external/abc.*@-stdlib=libc++
95+
#build --host_per_file_copt=.*external/abc.*@-stdlib=libc++
9696

9797
##### Platform-specific configs (auto-selected) #############
9898
# --enable_platform_specific_config makes bazel automatically apply
@@ -145,9 +145,9 @@ build:ci --config=opt
145145

146146
# Setup remote cache
147147
# Anon: HTTPS read-only cache
148-
build --remote_cache=https://bazel.precisioninno.com
149-
build --remote_cache_compression=true
150-
build --remote_upload_local_results=false
148+
#build --remote_cache=https://bazel.precisioninno.com
149+
#build --remote_cache_compression=true
150+
#build --remote_upload_local_results=false
151151
# CI: gRPC + Remote Asset API, requires --remote_header
152152
build:ci --remote_cache=grpcs://bazel.precisioninno.com:443
153153
build:ci --experimental_remote_downloader=grpcs://bazel.precisioninno.com:443

BUILD.bazel

Lines changed: 17 additions & 4 deletions
Original file line numberDiff line numberDiff line change
@@ -555,7 +555,10 @@ sh_test(
555555
"tclint.toml",
556556
"//bazel:tclint",
557557
],
558-
tags = ["local"],
558+
tags = [
559+
"local",
560+
"manual",
561+
],
559562
)
560563

561564
# --- TCL formatting check (tclfmt --check) --------------------------------
@@ -569,7 +572,10 @@ sh_test(
569572
"tclint.toml",
570573
"//bazel:tclfmt",
571574
],
572-
tags = ["local"],
575+
tags = [
576+
"local",
577+
"manual",
578+
],
573579
)
574580

575581
# --- TCL auto-format only (tclfmt --in-place) -----------------------------
@@ -596,7 +602,10 @@ sh_test(
596602
"MODULE.bazel",
597603
"@buildifier_prebuilt//:buildifier",
598604
],
599-
tags = ["local"],
605+
tags = [
606+
"local",
607+
"manual",
608+
],
600609
)
601610

602611
# --- Bazel formatting check (buildifier -mode=check -lint=off) ------------
@@ -610,7 +619,10 @@ sh_test(
610619
"MODULE.bazel",
611620
"@buildifier_prebuilt//:buildifier",
612621
],
613-
tags = ["local"],
622+
tags = [
623+
"local",
624+
"manual",
625+
],
614626
)
615627

616628
# --- Bazel auto-format only (buildifier -mode=fix) ------------------------
@@ -629,6 +641,7 @@ sh_binary(
629641

630642
test_suite(
631643
name = "lint_test",
644+
tags = ["manual"],
632645
tests = [
633646
":fmt_bzl_test",
634647
":fmt_tcl_test",

MODULE.bazel

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -185,7 +185,7 @@ use_repo(llvm, "llvm_toolchain", "llvm_toolchain_llvm")
185185

186186
# FYI: Comment out @llvm_toolchain//:all on NixOS and use the local clang toolchain instead.
187187
register_toolchains(
188-
"@llvm_toolchain//:all",
188+
#"@llvm_toolchain//:all",
189189
"@rules_verilator//verilator:verilator_toolchain",
190190
dev_dependency = True,
191191
)

MODULE.bazel.lock

Lines changed: 3 additions & 3 deletions
Some generated files are not rendered by default. Learn more about customizing how changed files appear on GitHub.

docs/BUILD.bazel

Lines changed: 1 addition & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -67,5 +67,6 @@ man_pages(
6767
"//docs/src/scripts:manpage.py",
6868
"//docs/src/scripts:extract_utils.py",
6969
],
70+
tags = ["manual"],
7071
visibility = ["//visibility:public"],
7172
)

0 commit comments

Comments
 (0)