From 203df6cc585b1b7b64e29bee5242619508b2bc59 Mon Sep 17 00:00:00 2001 From: Nick Craig-Wood Date: Wed, 29 Oct 2025 21:33:36 +0000 Subject: [PATCH] fstest: add ResetRun to allow the remote to be reset in tests --- fstest/run.go | 7 ++++++- 1 file changed, 6 insertions(+), 1 deletion(-) diff --git a/fstest/run.go b/fstest/run.go index 4ffb33692..2f492d4db 100644 --- a/fstest/run.go +++ b/fstest/run.go @@ -60,11 +60,16 @@ type Run struct { Logf, Fatalf func(text string, args ...any) } +// ResetRun re-reads the command line arguments into the global run. +func ResetRun() { + oneRun = newRun() +} + // TestMain drives the tests func TestMain(m *testing.M) { flag.Parse() if !*Individual { - oneRun = newRun() + ResetRun() } rc := m.Run() if !*Individual {