Skip to content

Commit

Permalink
Enable logOutput when testing on TeamCity
Browse files Browse the repository at this point in the history
  • Loading branch information
polinasok committed Apr 27, 2021
1 parent d2f7748 commit 218a275
Showing 1 changed file with 5 additions and 1 deletion.
6 changes: 5 additions & 1 deletion service/dap/server_test.go
Original file line number Diff line number Diff line change
Expand Up @@ -33,8 +33,12 @@ const noChildren bool = false
var testBackend string

func TestMain(m *testing.M) {
logOutputVal := ""
if _, isTeamCityTest := os.LookupEnv("TEAMCITY_VERSION"); isTeamCityTest {
logOutputVal = "debugger,dap"
}
var logOutput string
flag.StringVar(&logOutput, "log-output", "", "configures log output")
flag.StringVar(&logOutput, "log-output", logOutputVal, "configures log output")
flag.Parse()
logflags.Setup(logOutput != "", logOutput, "")
protest.DefaultTestBackend(&testBackend)
Expand Down

0 comments on commit 218a275

Please sign in to comment.