Skip to content

Commit

Permalink
syz-ci: put build error reason into report
Browse files Browse the repository at this point in the history
We inline Report in bug reports, so put the build error reason there.
Should produce much handier reports.
  • Loading branch information
dvyukov committed Mar 29, 2019
1 parent faba132 commit 9028d21
Showing 1 changed file with 3 additions and 2 deletions.
5 changes: 3 additions & 2 deletions syz-ci/manager.go
Expand Up @@ -293,10 +293,11 @@ func (mgr *Manager) build(kernelCommit *vcs.Commit) error {
if err := build.Image(mgr.managercfg.TargetOS, mgr.managercfg.TargetVMArch, mgr.managercfg.Type,
mgr.kernelDir, tmpDir, mgr.mgrcfg.Compiler, mgr.mgrcfg.Userspace,
mgr.mgrcfg.KernelCmdline, mgr.mgrcfg.KernelSysctl, mgr.configData); err != nil {
if _, ok := err.(build.KernelBuildError); ok {
if buildErr, ok := err.(build.KernelBuildError); ok {
rep := &report.Report{
Title: fmt.Sprintf("%v build error", mgr.mgrcfg.RepoAlias),
Output: []byte(err.Error()),
Report: []byte(buildErr.Title),
Output: buildErr.Output,
}
if err := mgr.reportBuildError(rep, info, tmpDir); err != nil {
mgr.Errorf("failed to report image error: %v", err)
Expand Down

0 comments on commit 9028d21

Please sign in to comment.