diff options
| author | Paul Buetow <paul@buetow.org> | 2026-03-10 19:13:39 +0200 |
|---|---|---|
| committer | Paul Buetow <paul@buetow.org> | 2026-03-10 19:13:39 +0200 |
| commit | 70acff73c8d103ec68c575d3cac1bdd87c189cf0 (patch) | |
| tree | 36bc36390c1f7ddb3e8fb5ef978942fae92107c6 | |
| parent | 8be37dcdc4b8f5d303d034360dedca0136749516 (diff) | |
task 435: add race-enabled mage target
| -rw-r--r-- | Magefile.go | 8 |
1 files changed, 8 insertions, 0 deletions
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 { |
