From 9d0edba3a320537f842682e189be4649e76215eb Mon Sep 17 00:00:00 2001 From: David Dworken Date: Sun, 2 Feb 2025 09:41:13 -0800 Subject: [PATCH] Add support for NoSleep param to test runner --- client/testutils.go | 5 ++++- 1 file changed, 4 insertions(+), 1 deletion(-) diff --git a/client/testutils.go b/client/testutils.go index caee5c3..a4b9eb1 100644 --- a/client/testutils.go +++ b/client/testutils.go @@ -168,6 +168,7 @@ type TmuxCommand struct { ResizeX int ResizeY int ExtraDelay float64 + NoSleep bool } func captureTerminalOutputWithShellName(t testing.TB, tester shellTester, overriddenShellName string, commands []string) string { @@ -246,7 +247,9 @@ func buildTmuxInputCommands(t testing.TB, captureConfig TmuxCaptureConfig) strin if cmd.ExtraDelay != 0 { fullCommand += fmt.Sprintf(" sleep %f\n", cmd.ExtraDelay) } - fullCommand += " sleep " + sleepAmount + "\n" + if !cmd.NoSleep { + fullCommand += " sleep " + sleepAmount + "\n" + } } fullCommand += " sleep 2.5\n" if testutils.IsGithubAction() {