Signed-off-by: Jiwei Sun <jiwei....@windriver.com> --- utils.c | 39 +++++++++++++++++++++++++++------------ 1 file changed, 27 insertions(+), 12 deletions(-)
diff --git a/utils.c b/utils.c index 0e97ac4..54ef89d 100644 --- a/utils.c +++ b/utils.c @@ -349,7 +349,7 @@ wait_child(const char *ptest_dir, } else if(WIFSIGNALED(status) && pid > 0) { fprintf(fps[0], " Killed by signal\n"); - return 127; + return 0x800000; } else fprintf(fps[0], "\nERROR: Exit status is %d\n", status); @@ -570,17 +570,32 @@ xml_add_case(FILE *xh, int status, struct ptest_entry *ptest, char *buf) /* fprintf should guarantee atomicity for fprintfs within the same process */ if (status != 0) { - fprintf(xh, "\t<testcase classname='%s' name='%s'>\n" \ - "\t\t<failure type='exit_code'" \ - " message='run-ptest exited with code: %d'>" \ - "</failure>\n" \ - "\t\t<system-out>%s" \ - "</system-out>\n" \ - "\t</testcase>\n", - ptest->ptest, - basename(bname), - status, - buf); + if (status == 0x800000) { + fprintf(xh, "\t<testcase classname='%s' name='%s'>\n" \ + "\t\t<failure type='timeout'" \ + " message='Test HUNG, Killed due to timeout 0x%x'>" \ + "</failure>\n" \ + "\t\t<system-out>%s" \ + "</system-out>\n" \ + "\t</testcase>\n", + ptest->ptest, + basename(bname), + status, + buf); + } + else { + fprintf(xh, "\t<testcase classname='%s' name='%s'>\n" \ + "\t\t<failure type='exit_code'" \ + " message='run-ptest exited with code: %d'>" \ + "</failure>\n" \ + "\t\t<system-out>%s" \ + "</system-out>\n" \ + "\t</testcase>\n", + ptest->ptest, + basename(bname), + status, + buf); + } } else { fprintf(xh, "\t<testcase classname='%s' name='%s'>\n" \ -- 1.8.3.1 -- _______________________________________________ yocto mailing list yocto@yoctoproject.org https://lists.yoctoproject.org/listinfo/yocto