checks.nix's hook-timeout-backends (the tracked git hook shims against real GNU/uutils/busybox/toybox timeout implementations, with and without perl, under dash, bash and busybox ash: 240 cases) was the one test PR Risk's test-nix ran on a GitHub runner, through `nix flake check`. It is now //tests/hook_timeout_backends:hook_timeout_backends_test, an sh_test (pr-core-only) that the bazel-test lane runs remotely on every PR: the static uutils 0.12.0, busybox 1.35.0 and toybox 0.8.15 binaries come in sha256-pinned through MODULE.bazel; dash, bash, perl and GNU coreutils from the executor, failing (not skipping) when one is missing. checks.nix goes and flake.nix declares no checks, so test-nix's `nix run .#default` + `nix flake check` is a packaging check (build the package Nix users install, evaluate every flake output), not a test. TestHookTimeoutBackendsRunUnderBazel pins the target and that no flake check comes back. ga-96smfk.22 Co-authored-by: Claude Opus 5.5 (1M context) <noreply@anthropic.com>
60 lines
1.9 KiB
Python
60 lines
1.9 KiB
Python
load("@rules_shell//shell:sh_test.bzl", "sh_test")
|
|
|
|
# The tracked git hook shims (.githooks/*, managed section only) against real
|
|
# timeout implementations: GNU coreutils and perl from the executor, and
|
|
# static uutils coreutils, busybox and toybox builds pinned in MODULE.bazel,
|
|
# under dash, bash and busybox ash. Formerly checks.nix's flake check
|
|
# hook-timeout-backends, which only PR Risk's test-nix job ran. See the
|
|
# script's header for the matrix and what each case asserts.
|
|
#
|
|
# Tags:
|
|
# pr-core-only: a non-Go sh_test (no Go testcases for the integration
|
|
# lane's check_testcases.py); the PR-core lane runs it.
|
|
sh_test(
|
|
name = "hook_timeout_backends_test",
|
|
size = "small",
|
|
srcs = ["hook_timeout_backends_test.sh"],
|
|
args = [
|
|
"$(rootpath @busybox_static//file)",
|
|
"$(rootpath @toybox_static//file)",
|
|
"$(rootpath @uutils_coreutils//:coreutils)",
|
|
"$(rootpath //:.githooks/pre-commit)",
|
|
"$(rootpath //:.githooks/post-merge)",
|
|
"$(rootpath //:.githooks/pre-push)",
|
|
"$(rootpath //:.githooks/post-checkout)",
|
|
"$(rootpath //:.githooks/prepare-commit-msg)",
|
|
],
|
|
data = [
|
|
"//:.githooks/post-checkout",
|
|
"//:.githooks/post-merge",
|
|
"//:.githooks/pre-commit",
|
|
"//:.githooks/pre-push",
|
|
"//:.githooks/prepare-commit-msg",
|
|
"@busybox_static//file",
|
|
"@toybox_static//file",
|
|
"@uutils_coreutils//:coreutils",
|
|
],
|
|
tags = ["pr-core-only"],
|
|
)
|
|
|
|
# --- begin repo_files (managed by tools/bazel/go_srcs.py; run `make bazel-sync`) ---
|
|
|
|
filegroup(
|
|
name = "repo_files",
|
|
srcs = glob(
|
|
["**"],
|
|
exclude = [
|
|
"**/*.db",
|
|
"**/*.exe",
|
|
"**/*.out",
|
|
"**/*.prof",
|
|
"**/*.pyc",
|
|
"**/*.test",
|
|
"**/__pycache__/**",
|
|
"**/node_modules/**",
|
|
],
|
|
),
|
|
visibility = ["//:__pkg__"],
|
|
)
|
|
|
|
# --- end repo_files ---
|