Skip to content

Don't truncate subsecond precision in run-tests.php JUNIT output #7836

New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Closed
wants to merge 1 commit into from
Closed
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
6 changes: 3 additions & 3 deletions run-tests.php
Original file line number Diff line number Diff line change
Expand Up @@ -3478,7 +3478,7 @@ function junit_mark_test_as(
$type,
string $file_name,
string $test_name,
?int $time = null,
?float $time = null,
string $message = '',
string $details = ''
): void {
Expand Down Expand Up @@ -3533,15 +3533,15 @@ function junit_mark_test_as(
$JUNIT['files'][$file_name]['xml'] .= "</testcase>\n";
}

function junit_suite_record(string $suite, string $param, int $value = 1): void
function junit_suite_record(string $suite, string $param, float $value = 1): void
{
global $JUNIT;

$JUNIT[$param] += $value;
$JUNIT['suites'][$suite][$param] += $value;
}

function junit_get_timer(string $file_name): int
function junit_get_timer(string $file_name): float
{
global $JUNIT;
if (!junit_enabled()) {
Expand Down