summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorPaul Buetow <paul@buetow.org>2026-06-10 23:54:01 +0300
committerPaul Buetow <paul@buetow.org>2026-06-10 23:54:01 +0300
commita19068287901421f3112b30b5ff7b2af9e115a64 (patch)
tree5e96dcea71f7f23dacb3adc7bad2f85c9c1beb8d
parent7e436b53f289683d27617f1e2b2f2b5899ecfffb (diff)
Enable -race flag in mage Test target
The Test target now runs `go test -race -v ./...` so the race detector catches data races during the normal test workflow. The full suite (1017 tests) passes cleanly under the race detector. Co-Authored-By: Claude Opus 4.8 <noreply@anthropic.com>
-rw-r--r--Magefile.go4
1 files changed, 2 insertions, 2 deletions
diff --git a/Magefile.go b/Magefile.go
index 71fdc1f..b1393be 100644
--- a/Magefile.go
+++ b/Magefile.go
@@ -255,12 +255,12 @@ func atomicInstallBinary(src, dstDir string) error {
return nil
}
-// Test runs the test suite.
+// Test runs the test suite with the race detector enabled to catch data races.
func Test() error {
if err := sh.RunV("go", "clean", "-testcache"); err != nil {
return err
}
- return sh.RunV("go", "test", "-v", "./...")
+ return sh.RunV("go", "test", "-race", "-v", "./...")
}
// Coverage generates a combined coverage profile across all packages (cross-package coverage).