Skip to content

Commit c5527e8

Browse files
committed
feat(integration_runner): Adds debug flag to add output for troubleshooting
1 parent 87032c2 commit c5527e8

File tree

1 file changed

+9
-0
lines changed
  • daemon/cmd/integration_runner

1 file changed

+9
-0
lines changed

daemon/cmd/integration_runner/main.go

Lines changed: 9 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -51,6 +51,7 @@ var (
5151
flagMaxCustomEvents = flag.Int("max_custom_events", 30000, "value for newrelic.custom_events.max_samples_stored")
5252
flagWarnIsFail = flag.Bool("warnisfail", false, "warn result is treated as a fail")
5353
flagOpcacheOff = flag.Bool("opcacheoff", false, "run without opcache. Some tests are intended to fail when run this way")
54+
flagDebug = flag.Bool("debug", false, "enable debug logging for integration_runner")
5455

5556
// externalPort is the port on which we start a server to handle
5657
// external calls.
@@ -527,6 +528,10 @@ func runTest(t *integration.Test) {
527528
if skipIf != nil {
528529
_, body, err := skipIf.Execute()
529530

531+
if *flagDebug {
532+
fmt.Printf("SkipIf output:\n%s\n", body)
533+
}
534+
530535
if err != nil {
531536
t.Output = body
532537
t.Fatal(fmt.Errorf("error executing skipif: %v", err))
@@ -557,6 +562,10 @@ func runTest(t *integration.Test) {
557562
t.Duration = 0
558563
}
559564

565+
if *flagDebug {
566+
fmt.Printf("Test output:\n%s\n", body)
567+
}
568+
560569
// Always save the test output. If an error occurred it may contain
561570
// critical information regarding the cause. Currently, it may also
562571
// contain valgrind commentary which we want to display.

0 commit comments

Comments
 (0)