Add support for NoSleep param to test runner

This commit is contained in:
David Dworken 2025-02-02 09:41:13 -08:00
parent 482f7ae021
commit 9d0edba3a3
No known key found for this signature in database

View File

@ -168,6 +168,7 @@ type TmuxCommand struct {
ResizeX int ResizeX int
ResizeY int ResizeY int
ExtraDelay float64 ExtraDelay float64
NoSleep bool
} }
func captureTerminalOutputWithShellName(t testing.TB, tester shellTester, overriddenShellName string, commands []string) string { 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 { if cmd.ExtraDelay != 0 {
fullCommand += fmt.Sprintf(" sleep %f\n", cmd.ExtraDelay) fullCommand += fmt.Sprintf(" sleep %f\n", cmd.ExtraDelay)
} }
fullCommand += " sleep " + sleepAmount + "\n" if !cmd.NoSleep {
fullCommand += " sleep " + sleepAmount + "\n"
}
} }
fullCommand += " sleep 2.5\n" fullCommand += " sleep 2.5\n"
if testutils.IsGithubAction() { if testutils.IsGithubAction() {