1
0

Add note about panic/timeout

This commit is contained in:
dump_stack() 2018-10-07 18:54:17 +00:00
parent 9843778f06
commit 89539796bf

15
main.go
View File

@ -216,7 +216,7 @@ func genOkFail(name string, ok bool) aurora.Value {
}
}
func dumpResult(ka artifact, ki kernelInfo, build_ok, run_ok, test_ok *bool) {
func dumpResult(q *qemu.QemuSystem, ka artifact, ki kernelInfo, build_ok, run_ok, test_ok *bool) {
distroInfo := fmt.Sprintf("%s-%s {%s}", ki.DistroType,
ki.DistroRelease, ki.KernelRelease)
@ -232,8 +232,19 @@ func dumpResult(ka artifact, ki kernelInfo, build_ok, run_ok, test_ok *bool) {
genOkFail("TEST", *test_ok))
}
additional := ""
if q.KernelPanic {
additional = "(panic)"
} else if q.KilledByTimeout {
additional = "(timeout)"
}
if additional != "" {
fmt.Println(colored, additional)
} else {
fmt.Println(colored)
}
}
func whatever(swg *sizedwaitgroup.SizedWaitGroup, ka artifact, ki kernelInfo) {
defer swg.Done()
@ -260,7 +271,7 @@ func whatever(swg *sizedwaitgroup.SizedWaitGroup, ka artifact, ki kernelInfo) {
build_ok := false
run_ok := false
test_ok := false
defer dumpResult(ka, ki, &build_ok, &run_ok, &test_ok)
defer dumpResult(q, ka, ki, &build_ok, &run_ok, &test_ok)
// TODO Write build log to file or database
outFile, output, err := build(tmp, ka, ki)