We read every piece of feedback, and take your input very seriously.
To see all available qualifiers, see our documentation.
There was an error while loading. Please reload this page.
1 parent b08cab0 commit 8cdf5d2Copy full SHA for 8cdf5d2
tools/flakeguard/runner/runner.go
@@ -604,6 +604,16 @@ func (r *Runner) transformTestOutputFiles(filePaths []string) error {
604
inFile.Close()
605
outFile.Close()
606
if err != nil {
607
+ // Transformation failed; read & log the original file’s contents.
608
+ raw, readErr := os.ReadFile(origPath)
609
+ if readErr != nil {
610
+ return fmt.Errorf(
611
+ "failed to transform file %s: %v (also failed reading original file: %v)",
612
+ origPath, err, readErr,
613
+ )
614
+ }
615
+ log.Printf("Original test file %s content:\n%s\n", origPath, string(raw))
616
+
617
return fmt.Errorf("failed to transform output file %s: %v", origPath, err)
618
}
619
// Use the transformed file path.
0 commit comments