~ubuntu-branches/ubuntu/precise/fwts/precise-updates

« back to all changes in this revision

Viewing changes to src/lib/src/fwts_summary.c

  • Committer: Bazaar Package Importer
  • Author(s): Colin King, Colin King, Micah Gersten
  • Date: 2011-02-23 14:37:00 UTC
  • Revision ID: james.westby@ubuntu.com-20110223143700-dm2tlj3ib38qhkpr
Tags: 0.22.01
[ Colin King <colin.king@canonical.com> ]
* Fixes for minor bugs (LP: #723746)
* bios: mtrr: fix: disable MTRR VGA test as it is not helpful.
* doc: fix fwts man page, remove duplicated -s options.
* acpi: s3: fix typo.
* acpi: method: comments on what needs testing.
* bios: mtrr: fix to stop valgrind complaining.
* lib: fwts_summary: fix summary fields to fit in 80 columns.

[ Micah Gersten <micahg@ubuntu.com> ]
* debian/control: Drop duplicate pciutils in fwts Depends

Show diffs side-by-side

added added

removed removed

Lines of Context:
174
174
static void fwts_summary_format_field(char *buffer, int buflen, uint32_t value)
175
175
{
176
176
        if (value)
177
 
                snprintf(buffer, buflen, "%7u", value);
 
177
                snprintf(buffer, buflen, "%5u", value);
178
178
        else
179
179
                *buffer = '\0';
180
180
}
242
242
                fwts_list_foreach(item, test_list)
243
243
                        fwts_list_add_ordered(sorted, fwts_list_data(fwts_framework_test *,item), fwts_framework_compare_test_name);
244
244
 
245
 
                fwts_log_summary_verbatum(fw, "Test           |Passed |Failed |Aborted|Warning|Skipped|Info   |");
246
 
                fwts_log_summary_verbatum(fw, "---------------+-------+-------+-------+-------+-------+-------+");
 
245
                fwts_log_summary_verbatum(fw, "Test           |Pass |Fail |Abort|Warn |Skip |Info |");
 
246
                fwts_log_summary_verbatum(fw, "---------------+-----+-----+-----+-----+-----+-----+");
247
247
                fwts_list_foreach(item, sorted) {
248
248
                        fwts_framework_test *test = fwts_list_data(fwts_framework_test*,item);
249
249
                        if (test->was_run) {
250
 
                                char passed[8];
251
 
                                char failed[8];
252
 
                                char aborted[8];
253
 
                                char warning[8];
254
 
                                char skipped[8];
255
 
                                char infoonly[8];
 
250
                                char passed[6];
 
251
                                char failed[6];
 
252
                                char aborted[6];
 
253
                                char warning[6];
 
254
                                char skipped[6];
 
255
                                char infoonly[6];
256
256
 
257
257
                                fwts_summary_format_field(passed, sizeof(passed), test->results.passed);
258
258
                                fwts_summary_format_field(failed, sizeof(failed), test->results.failed);
261
261
                                fwts_summary_format_field(skipped, sizeof(skipped), test->results.skipped);
262
262
                                fwts_summary_format_field(infoonly, sizeof(infoonly), test->results.infoonly);
263
263
 
264
 
                                fwts_log_summary_verbatum(fw, "%-15.15s|%7.7s|%7.7s|%7.7s|%7.7s|%7.7s|%7.7s|",
 
264
                                fwts_log_summary_verbatum(fw, "%-15.15s|%5.5s|%5.5s|%5.5s|%5.5s|%5.5s|%5.5s|",
265
265
                                        test->name, passed, failed, aborted, warning, skipped, infoonly);
266
266
                        }
267
267
                }
268
 
                fwts_log_summary_verbatum(fw, "---------------+-------+-------+-------+-------+-------+-------+");
 
268
                fwts_log_summary_verbatum(fw, "---------------+-----+-----+-----+-----+-----+-----+");
269
269
                fwts_list_free(sorted, NULL);
270
270
        }
271
271
        return FWTS_OK;