Giter Site home page Giter Site logo

junit / xunit issue about maven-tools HOT 3 CLOSED

stdweird avatar stdweird commented on August 17, 2024
junit / xunit issue

from maven-tools.

Comments (3)

stdweird avatar stdweird commented on August 17, 2024

following patch was applied to the TAP::Harness::Junit module (which was installed using cpan, and is local to jenkins) to force the reported time output to 3 digits after comma, to make the junit_output.xml "valid" again.
TAP::Harness::Junit hasn't seen any development in years, so i think this patch is safe; and i also assume we can't upstream the patch as it way too specific (and feels like it works around some xunit issue about xunit being way to restricted)

--- perl/lib/perl5/TAP/Harness/JUnit.pm.orig	2018-07-20 12:47:24.055481018 +0200
+++ perl/lib/perl5/TAP/Harness/JUnit.pm	2018-07-20 12:49:41.135478156 +0200
@@ -199,6 +199,7 @@
 
 	my $time = $parser->end_time - $parser->start_time;
 	$time = 0 if $self->{__notimes};
+	$time = sprintf("%.3f", $time);
 
 	# Get the return code of test script before re-parsing the TAP output
 	my $badretval = $parser->exit;
@@ -243,6 +244,7 @@
 
 		my $time = $result->{__end_time} - $result->{__start_time};
 		$time = 0 if $self->{__notimes};
+		$time = sprintf("%.3f", $time);
 
 		# Counters
 		if ($result->type eq 'plan') {

from maven-tools.

stdweird avatar stdweird commented on August 17, 2024

@jrha @jouvin @ned21 tests shouldn't be failing anymore (but you might need to rerun them)

from maven-tools.

jrha avatar jrha commented on August 17, 2024

@stdweird thanks for digging into this and sorting it out

from maven-tools.

Related Issues (20)

Recommend Projects

  • React photo React

    A declarative, efficient, and flexible JavaScript library for building user interfaces.

  • Vue.js photo Vue.js

    🖖 Vue.js is a progressive, incrementally-adoptable JavaScript framework for building UI on the web.

  • Typescript photo Typescript

    TypeScript is a superset of JavaScript that compiles to clean JavaScript output.

  • TensorFlow photo TensorFlow

    An Open Source Machine Learning Framework for Everyone

  • Django photo Django

    The Web framework for perfectionists with deadlines.

  • D3 photo D3

    Bring data to life with SVG, Canvas and HTML. 📊📈🎉

Recommend Topics

  • javascript

    JavaScript (JS) is a lightweight interpreted programming language with first-class functions.

  • web

    Some thing interesting about web. New door for the world.

  • server

    A server is a program made to process requests and deliver data to clients.

  • Machine learning

    Machine learning is a way of modeling and interpreting data that allows a piece of software to respond intelligently.

  • Game

    Some thing interesting about game, make everyone happy.

Recommend Org

  • Facebook photo Facebook

    We are working to build community through open source technology. NB: members must have two-factor auth.

  • Microsoft photo Microsoft

    Open source projects and samples from Microsoft.

  • Google photo Google

    Google ❤️ Open Source for everyone.

  • D3 photo D3

    Data-Driven Documents codes.