Skip to content

Commit 4739e99

Browse files
authored
Merge pull request #158813 from rickystewart/blathers/backport-release-24.3-158798
release-24.3: process-bep-file: make sure we're inserting newlines in print output
2 parents 1366774 + e445bdf commit 4739e99

File tree

1 file changed

+7
-7
lines changed
  • pkg/cmd/bazci/process-bep-file

1 file changed

+7
-7
lines changed

pkg/cmd/bazci/process-bep-file/main.go

Lines changed: 7 additions & 7 deletions
Original file line numberDiff line numberDiff line change
@@ -70,7 +70,7 @@ func process() error {
7070
if *jsonOutFile != "" {
7171
jsonReport, errs := engflow.ConstructJSONReport(invocation, *serverName)
7272
for _, err := range errs {
73-
fmt.Printf("error loading JSON test report: %+v", err)
73+
fmt.Printf("error loading JSON test report: %+v\n", err)
7474
}
7575
jsonOut, err := json.Marshal(jsonReport)
7676
if err != nil {
@@ -81,11 +81,11 @@ func process() error {
8181
return err
8282
}
8383
} else {
84-
fmt.Printf("no -jsonoutfile; skipping constructing JSON test report")
84+
fmt.Println("no -jsonoutfile; skipping constructing JSON test report")
8585
}
8686

8787
if githubApiToken == "" {
88-
fmt.Printf("no GITHUB_API_TOKEN; skipping reporting to GitHub")
88+
fmt.Println("no GITHUB_API_TOKEN; skipping reporting to GitHub")
8989
return nil
9090
}
9191

@@ -99,12 +99,12 @@ func process() error {
9999
for _, res := range results {
100100
var seenNew bool
101101
if res.Err != nil {
102-
fmt.Printf("got error downloading test XML for result %+v; got error %+v", res, res.Err)
102+
fmt.Printf("got error downloading test XML for result %+v; got error %+v\n", res, res.Err)
103103
continue
104104
}
105105
var testXml bazelutil.TestSuites
106106
if err := xml.Unmarshal([]byte(res.TestXml), &testXml); err != nil {
107-
fmt.Printf("could not parse test.xml: got error %+v", err)
107+
fmt.Printf("could not parse test.xml: got error %+v\n", err)
108108
continue
109109
}
110110
for _, suite := range testXml.Suites {
@@ -138,7 +138,7 @@ func process() error {
138138
GithubApiToken: githubApiToken,
139139
ExtraParams: extraParamsSlice,
140140
}), testXml); err != nil {
141-
fmt.Printf("could not post to GitHub: got error %+v", err)
141+
fmt.Printf("could not post to GitHub: got error %+v\n", err)
142142
}
143143
}
144144
}
@@ -166,7 +166,7 @@ func main() {
166166
os.Exit(1)
167167
}
168168
if err := process(); err != nil {
169-
fmt.Printf("ERROR: %+v", err)
169+
fmt.Printf("ERROR: %+v\n", err)
170170
os.Exit(1)
171171
}
172172
}

0 commit comments

Comments
 (0)