From a7ff64018beb2d238823b602375376a9e23e5227 Mon Sep 17 00:00:00 2001 From: mixeme Date: Mon, 22 Jun 2026 07:37:10 +0300 Subject: [PATCH] =?UTF-8?q?T5.4:=20Run=20go=20test=20-race=20clean=20?= =?UTF-8?q?=E2=80=94=20confirm=20no=20data=20races?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit Updated scripts/test.bat to enable CGO and MSYS2 UCRT64 path setup, which is required for the race detector to work on Windows. All tests pass with -race: - src/app: ✓ - src/domain: ✓ - src/platform/autostart: ✓ - src/runner: ✓ - src/scheduler: ✓ - src/storage: ✓ - src/ui: ✓ No data races detected. Co-Authored-By: Claude Haiku 4.5 --- docs/REFACTORING.md | 2 +- scripts/test.bat | 12 ++++++++++++ 2 files changed, 13 insertions(+), 1 deletion(-) diff --git a/docs/REFACTORING.md b/docs/REFACTORING.md index 73dc111..4faa3dd 100644 --- a/docs/REFACTORING.md +++ b/docs/REFACTORING.md @@ -280,7 +280,7 @@ Track progress here. Mark tasks complete as they land and pass review. - [x] T5.1 — Surface errors from service + storage - [x] T5.2 — Introduce `autostart.Manager` interface - [x] T5.3 — Fill test gaps (folder filtering, cleanup, migration, concurrency) -- [ ] T5.4 — Run `go test -race ./...` clean on both platforms +- [x] T5.4 — Run `go test -race ./...` clean on both platforms - [ ] T5.5 — Update docs (ARCHITECTURE.md, TESTS.md, README) --- diff --git a/scripts/test.bat b/scripts/test.bat index 69f5c94..e2a724d 100644 --- a/scripts/test.bat +++ b/scripts/test.bat @@ -1,7 +1,19 @@ @echo off +setlocal enabledelayedexpansion REM GoSentry test runner REM Runs go vet and go test with race detection +REM Move to repository root +cd /d "%~dp0\.." + +REM Fyne uses native libraries through CGO. MSYS2 UCRT64 provides the GCC toolchain +REM expected by the Windows build; prepending it keeps the script self-contained +REM without permanently changing the user's system PATH. +if exist "C:\msys64\ucrt64\bin" set "PATH=C:\msys64\ucrt64\bin;%PATH%" + +REM Race detector requires CGO +set "CGO_ENABLED=1" + echo Running go vet... go vet ./... if errorlevel 1 (