1
0
mirror of https://github.com/jesseduffield/lazygit.git synced 2025-08-09 09:22:48 +03:00

Support -race arg when running integration tests to turn on go's race detector

For the "cli" and "tui" modes of the test runner there's a "-race" parameter to
turn it on; for running tests on CI with go test, you turn it on by setting the
environment variable LAZYGIT_RACE_DETECTOR to a non-empty value.
This commit is contained in:
Stefan Haller
2023-09-08 17:13:30 +02:00
parent 8081b59a02
commit f108fd2236
5 changed files with 40 additions and 16 deletions

View File

@@ -23,7 +23,7 @@ import (
// If invoked directly, you can specify tests to run by passing their names as positional arguments
func RunCLI(testNames []string, slow bool, sandbox bool, waitForDebugger bool) {
func RunCLI(testNames []string, slow bool, sandbox bool, waitForDebugger bool, raceDetector bool) {
inputDelay := tryConvert(os.Getenv("INPUT_DELAY"), 0)
if slow {
inputDelay = SLOW_INPUT_DELAY
@@ -36,6 +36,7 @@ func RunCLI(testNames []string, slow bool, sandbox bool, waitForDebugger bool) {
runAndPrintFatalError,
sandbox,
waitForDebugger,
raceDetector,
inputDelay,
1,
)