Skip to content

Commit

Permalink
Added elapsed time on time out
Browse files Browse the repository at this point in the history
  • Loading branch information
Snaipe committed Sep 13, 2015
1 parent 98a892d commit 98eb5e4
Show file tree
Hide file tree
Showing 3 changed files with 10 additions and 8 deletions.
6 changes: 3 additions & 3 deletions po/fr.po
Original file line number Diff line number Diff line change
Expand Up @@ -8,7 +8,7 @@ msgid ""
msgstr ""
"Project-Id-Version: criterion 1.0.0\n"
"Report-Msgid-Bugs-To: franklinmathieu+criterion@gmail.com\n"
"POT-Creation-Date: 2015-09-13 13:10+0200\n"
"POT-Creation-Date: 2015-09-13 14:51+0200\n"
"PO-Revision-Date: 2015-04-03 17:58+0200\n"
"Last-Translator: <franklinmathieu@gmail.com>\n"
"Language-Team: French\n"
Expand Down Expand Up @@ -61,8 +61,8 @@ msgstr ""

#: src/log/normal.c:61
#, fuzzy, c-format
msgid "%1$s::%2$s: Timed out.\n"
msgstr "%1$s::%2$s: Délai expiré.\n"
msgid "%1$s::%2$s: Timed out. (%3$3.2fs)\n"
msgstr "%1$s::%2$s: Délai expiré. (%3$3.2fs)\n"

#: src/log/normal.c:62
#, c-format
Expand Down
7 changes: 4 additions & 3 deletions src/log/normal.c
Original file line number Diff line number Diff line change
Expand Up @@ -58,7 +58,7 @@ static msg_t msg_post_suite_test = N_("%1$s::%2$s: Test is disabled\n");
static msg_t msg_post_suite_suite = N_("%1$s::%2$s: Suite is disabled\n");
static msg_t msg_assert_fail = N_("%1$s%2$s%3$s:%4$s%5$d%6$s: Assertion failed: %7$s\n");
static msg_t msg_theory_fail = N_(" Theory %1$s::%2$s failed with the following parameters: (%3$s)\n");
static msg_t msg_test_timeout = N_("%1$s::%2$s: Timed out.\n");
static msg_t msg_test_timeout = N_("%1$s::%2$s: Timed out. (%3$3.2fs)\n");
static msg_t msg_test_crash_line = N_("%1$s%2$s%3$s:%4$s%5$u%6$s: Unexpected signal caught below this line!\n");
static msg_t msg_test_crash = N_("%1$s::%2$s: CRASH!\n");
static msg_t msg_test_other_crash = N_("%1$sWarning! The test `%2$s::%3$s` crashed during its setup or teardown.%4$s\n");
Expand All @@ -78,7 +78,7 @@ static msg_t msg_post_suite_test = "%s::%s: Test is disabled\n";
static msg_t msg_post_suite_suite = "%s::%s: Suite is disabled\n";
static msg_t msg_assert_fail = "%s%s%s:%s%d%s: Assertion failed: %s\n";
static msg_t msg_theory_fail = " Theory %s::%s failed with the following parameters: %s\n";
static msg_t msg_test_timeout = "%s::%s: timed out.\n";
static msg_t msg_test_timeout = "%s::%s: Timed out. (%3.2fs)\n";
static msg_t msg_test_crash_line = "%s%s%s:%s%u%s: Unexpected signal caught below this line!\n";
static msg_t msg_test_crash = "%s::%s: CRASH!\n";
static msg_t msg_test_other_crash = "%sWarning! The test `%s::%s` crashed during its setup or teardown.%s\n";
Expand Down Expand Up @@ -226,7 +226,8 @@ void normal_log_test_timeout(UNUSED struct criterion_test_stats *stats) {
criterion_pimportant(CRITERION_PREFIX_FAIL,
_(msg_test_timeout),
stats->test->category,
stats->test->name);
stats->test->name,
stats->elapsed_time);
}

struct criterion_output_provider normal_logging = {
Expand Down
5 changes: 3 additions & 2 deletions src/log/tap.c
Original file line number Diff line number Diff line change
Expand Up @@ -119,9 +119,10 @@ void tap_log_test_crash(struct criterion_test_stats *stats) {
}

void tap_log_test_timeout(struct criterion_test_stats *stats) {
criterion_important("not ok - %s::%s timed out\n",
criterion_important("not ok - %s::%s timed out (%3.2fs)\n",
stats->test->category,
stats->test->name);
stats->test->name,
stats->elapsed_time);
}

struct criterion_output_provider tap_logging = {
Expand Down

0 comments on commit 98eb5e4

Please sign in to comment.