unsigned long allocated; /* The size of the results table. */
enum test_status *results; /* Table of results by test number. */
unsigned int aborted; /* Whether the set was aborted. */
+ unsigned int killed; /* Whether the set was killed. */
int reported; /* Whether the results were reported. */
int status; /* The exit status of the test. */
unsigned int all_skipped; /* Whether all tests were skipped. */
ts->passed = 0;
ts->skipped = 0;
ts->failed = 0;
+ ts->killed = 0;
return 0;
}
}
return 0;
} else if (WIFSIGNALED(ts->status)) {
test_summarize(ts, -WTERMSIG(ts->status));
+ ts->killed = 1;
return 0;
} else if (ts->plan != PLAN_FIRST && ts->plan != PLAN_FINAL) {
puts("ABORTED (no valid test plan)");
printf("%-26.26s %4lu/%-4lu %3.0f%% %4lu ", ts->file, ts->failed,
total, total ? (ts->failed * 100.0) / total : 0,
ts->skipped);
- if (WIFEXITED(ts->status))
+ if (WIFEXITED(ts->status)) {
printf("%4d ", WEXITSTATUS(ts->status));
- else
+ } else if (ts->killed) {
+ printf("KILL ");
+ } else {
printf(" -- ");
+ }
if (ts->aborted) {
puts("aborted");
continue;
unsigned long skipped = 0;
unsigned long failed = 0;
unsigned long aborted = 0;
+ unsigned long killed = 0;
/* Walk the list of tests to find the longest name. */
for (current = tests; current != NULL; current = current->next) {
passed += ts->passed;
skipped += ts->skipped + ts->all_skipped;
failed += ts->failed;
+ killed += ts->killed;
count++;
/* If the test fails, we shuffle it over to the fail list. */
/* Print out the final test summary. */
putchar('\n');
- if (aborted != 0) {
+ if (killed != 0) {
+ printf("Killed %lu test set%s, passed %lu/%lu tests",
+ killed, killed == 1 ? "" : "s", passed, total);
+ } else if (aborted != 0) {
if (aborted == 1)
printf("Aborted %lu test set", aborted);
else
printf(" (%.2f usr + %.2f sys = %.2f CPU)\n",
tv_seconds(&stats.ru_utime), tv_seconds(&stats.ru_stime),
tv_sum(&stats.ru_utime, &stats.ru_stime));
- return (failed == 0 && aborted == 0);
+ return (failed == 0 && aborted == 0 && killed == 0);
}
/*