From 63562a503adeb86bacafae37405aa460b3637aa4 Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?Petr=20Balv=C3=ADn?= Date: Sun, 20 Sep 2026 01:40:51 +0200 Subject: [PATCH] test(justfile): run the CLI and debugger tests outside the coverage set Assisted-by: DeepSeek V4.1 Flash --- .gitea/workflows/test.yml | 8 ++++++++ justfile | 7 +++++++ 2 files changed, 15 insertions(+) diff --git a/.gitea/workflows/test.yml b/.gitea/workflows/test.yml index 01d9cf4..36802cb 100644 --- a/.gitea/workflows/test.yml +++ b/.gitea/workflows/test.yml @@ -84,6 +84,14 @@ jobs: # suites); the runner's Go setup provides both the tool and GOROOT. run: go test -count=1 -timeout 10m -coverprofile=coverage.out ./arch/... ./asm/... ./ast/... ./disasm/... ./format/... ./lexer/... ./lint/... ./lsp/... ./parser/... ./token/... ./verify/... + - name: Tests outside the coverage set + # The CLI and the debugger sit outside `packages` because a thin main and a + # ptrace-bound package pull the total under the floor, but their tests guard + # shipped surfaces: the command exit codes, the manual pages against the + # binary's own help, and the debugger's architecture-neutral units. They run + # here so the floor stays a product measure and nothing is left untested. + run: go test -count=1 -timeout 10m ./cmd/... ./debug/... + - name: Oracle parity # Re-run the live go-tool-asm comparison as its own step so that a parity # regression names the gate that failed instead of hiding inside the suite. diff --git a/justfile b/justfile index 8b32669..4739b1f 100644 --- a/justfile +++ b/justfile @@ -31,6 +31,13 @@ test: system(q{go}, q{test}, q{-count=1}, q{-timeout}, q{10m}, q{-coverprofile}, q{coverage.out}, qw({{packages}})) == 0 or die qq{the test suite failed\n}; + # The packages outside the coverage set carry tests of their own: the CLI's + # exit codes and manual-page guard, and the debugger's architecture-neutral + # units. They run without a profile, because a thin main and a ptrace-bound + # package would drag the floor down rather than measure the product. + system(q{go}, q{test}, q{-count=1}, q{-timeout}, q{10m}, + q{./cmd/...}, q{./debug/...}) == 0 + or die qq{the tests outside the coverage set failed\n}; open(my $c, q{-|}, q{go}, q{tool}, q{cover}, q{-func=coverage.out}) or die qq{cover: $!}; my $total; while (my $l = <$c>) { $total = $1 if $l =~ m{^total:\s+\S+\s+([0-9.]+)%} }