From 70acff73c8d103ec68c575d3cac1bdd87c189cf0 Mon Sep 17 00:00:00 2001 From: Paul Buetow Date: Tue, 10 Mar 2026 19:13:39 +0200 Subject: task 435: add race-enabled mage target --- Magefile.go | 8 ++++++++ 1 file changed, 8 insertions(+) diff --git a/Magefile.go b/Magefile.go index 45c8bc6..cc1feeb 100644 --- a/Magefile.go +++ b/Magefile.go @@ -89,6 +89,14 @@ func Test() error { return sh.RunWithV(goEnv(), "go", "test", "./...", "-failfast", "-timeout=90m") } +// TestRace runs the full test suite with the race detector enabled. +func TestRace() error { + if err := sh.RunWithV(goEnv(), "go", "clean", "-testcache"); err != nil { + return err + } + return sh.RunWithV(goEnv(), "go", "test", "./...", "-race", "-failfast", "-timeout=90m") +} + // TestWithName runs a specific test by name. func TestWithName() error { if err := sh.RunWithV(goEnv(), "go", "clean", "-testcache"); err != nil { -- cgit v1.2.3