Accepting request 215448 from home:mlatimer:branches:devel:languages:perl
Update to 0.09, and implement hash fix to build on 13.1 OBS-URL: https://build.opensuse.org/request/show/215448 OBS-URL: https://build.opensuse.org/package/show/devel:languages:perl/perl-TAP-Formatter-JUnit?expand=0&rev=3
This commit is contained in:
		
				
					committed by
					
						
						Git OBS Bridge
					
				
			
			
				
	
			
			
			
						parent
						
							faac22e4c9
						
					
				
				
					commit
					e700c3f520
				
			@@ -1,3 +0,0 @@
 | 
			
		||||
version https://git-lfs.github.com/spec/v1
 | 
			
		||||
oid sha256:7c2dde056af1e91b80a8c7ce79e0e426a055d550ba26ee85fe76ecee378624db
 | 
			
		||||
size 21468
 | 
			
		||||
							
								
								
									
										100
									
								
								TAP-Formatter-JUnit-0.09-hashorder.patch
									
									
									
									
									
										Normal file
									
								
							
							
						
						
									
										100
									
								
								TAP-Formatter-JUnit-0.09-hashorder.patch
									
									
									
									
									
										Normal file
									
								
							@@ -0,0 +1,100 @@
 | 
			
		||||
This patch addresses https://rt.cpan.org/Public/Bug/Display.html?id=81552
 | 
			
		||||
 | 
			
		||||
Strictly speaking, this is a test suite issue since the generated XML
 | 
			
		||||
remains valid, but some attributes are output in a different order than
 | 
			
		||||
expected by the test suite.
 | 
			
		||||
 | 
			
		||||
However, since I can't think of any simple way to make the tests more
 | 
			
		||||
forgiving of the order of the attributes in the XML, I've tweaked the
 | 
			
		||||
code to use Tie::IxHash to ensure that the generated XML has the
 | 
			
		||||
attributes in the same order as the tests expect them.
 | 
			
		||||
 | 
			
		||||
--- lib/TAP/Formatter/JUnit/Session.pm
 | 
			
		||||
+++ lib/TAP/Formatter/JUnit/Session.pm
 | 
			
		||||
@@ -10,6 +10,7 @@
 | 
			
		||||
 use File::Path qw(mkpath);
 | 
			
		||||
 use IO::File;
 | 
			
		||||
 use TAP::Formatter::JUnit::Result;
 | 
			
		||||
+use Tie::IxHash;
 | 
			
		||||
 
 | 
			
		||||
 has 'testcases' => (
 | 
			
		||||
     is      => 'rw',
 | 
			
		||||
@@ -104,10 +105,12 @@
 | 
			
		||||
             if ($timer_enabled) {
 | 
			
		||||
                 unless ($result->is_test) {
 | 
			
		||||
                     my $duration = $result->time - $t_start;
 | 
			
		||||
-                    my $case     = $xml->testcase( {
 | 
			
		||||
-                        'name' => _squeaky_clean('(init)'),
 | 
			
		||||
+                    tie my %case_attrs, 'Tie::IxHash';
 | 
			
		||||
+                    %case_attrs = (
 | 
			
		||||
                         'time' => $duration,
 | 
			
		||||
-                    } );
 | 
			
		||||
+                        'name' => _squeaky_clean('(init)'),
 | 
			
		||||
+                    );
 | 
			
		||||
+                    my $case     = $xml->testcase( \%case_attrs );
 | 
			
		||||
                     $self->add_testcase($case);
 | 
			
		||||
                     $t_last_test = $result->time;
 | 
			
		||||
                 }
 | 
			
		||||
@@ -136,22 +139,23 @@
 | 
			
		||||
             if ($bogosity) {
 | 
			
		||||
                 my $cdata = $self->_cdata($content);
 | 
			
		||||
                 my $level = $bogosity->{level};
 | 
			
		||||
-                $failure  = $xml->$level( {
 | 
			
		||||
+                tie my %error_attrs, 'Tie::IxHash';
 | 
			
		||||
+                %error_attrs = (
 | 
			
		||||
                     type    => $bogosity->{type},
 | 
			
		||||
                     message => $bogosity->{message},
 | 
			
		||||
-                }, $cdata );
 | 
			
		||||
+                );
 | 
			
		||||
+                $failure  = $xml->$level( \%error_attrs, $cdata );
 | 
			
		||||
             }
 | 
			
		||||
 
 | 
			
		||||
             # add this test to the XML stream
 | 
			
		||||
-            my $case = $xml->testcase(
 | 
			
		||||
-                {
 | 
			
		||||
-                    'name' => _get_testcase_name($result),
 | 
			
		||||
+            tie my %case_attrs, 'Tie::IxHash';
 | 
			
		||||
+            %case_attrs = (
 | 
			
		||||
                     (
 | 
			
		||||
                         $timer_enabled ? ('time' => $duration) : ()
 | 
			
		||||
                     ),
 | 
			
		||||
-                },
 | 
			
		||||
-                $failure,
 | 
			
		||||
+                    'name' => _get_testcase_name($result),
 | 
			
		||||
             );
 | 
			
		||||
+            my $case = $xml->testcase( \%case_attrs, $failure, );
 | 
			
		||||
             $self->add_testcase($case);
 | 
			
		||||
 
 | 
			
		||||
             # update time of last test seen
 | 
			
		||||
@@ -162,10 +166,12 @@
 | 
			
		||||
     # track time for teardown, if needed
 | 
			
		||||
     if ($timer_enabled) {
 | 
			
		||||
         my $duration = $self->parser->end_time - $queue->[-1]->time;
 | 
			
		||||
-        my $case     = $xml->testcase( {
 | 
			
		||||
-            'name' => _squeaky_clean('(teardown)'),
 | 
			
		||||
+        tie my %case_attrs, 'Tie::IxHash';
 | 
			
		||||
+        %case_attrs  = (
 | 
			
		||||
             'time' => $duration,
 | 
			
		||||
-        } );
 | 
			
		||||
+            'name' => _squeaky_clean('(teardown)'),
 | 
			
		||||
+        );
 | 
			
		||||
+        my $case     = $xml->testcase( \%case_attrs );
 | 
			
		||||
         $self->add_testcase($case);
 | 
			
		||||
     }
 | 
			
		||||
 
 | 
			
		||||
@@ -225,11 +231,12 @@
 | 
			
		||||
     }
 | 
			
		||||
 
 | 
			
		||||
     my @tests = @{$self->testcases()};
 | 
			
		||||
-    my %attrs = (
 | 
			
		||||
-        'name'     => _get_testsuite_name($self),
 | 
			
		||||
-        'tests'    => $testsrun,
 | 
			
		||||
+    tie my %attrs, 'Tie::IxHash';
 | 
			
		||||
+    %attrs = (
 | 
			
		||||
         'failures' => $failures,
 | 
			
		||||
         'errors'   => $num_errors,
 | 
			
		||||
+        'tests'    => $testsrun,
 | 
			
		||||
+        'name'     => _get_testsuite_name($self),
 | 
			
		||||
         (
 | 
			
		||||
             $timer_enabled ? ('time' => $time) : ()
 | 
			
		||||
         ),
 | 
			
		||||
							
								
								
									
										3
									
								
								TAP-Formatter-JUnit-0.09.tar.gz
									
									
									
									
									
										Normal file
									
								
							
							
						
						
									
										3
									
								
								TAP-Formatter-JUnit-0.09.tar.gz
									
									
									
									
									
										Normal file
									
								
							@@ -0,0 +1,3 @@
 | 
			
		||||
version https://git-lfs.github.com/spec/v1
 | 
			
		||||
oid sha256:40e4501da7fda90e0804e58d313f6debf4518b9007509b113fa355dd88678a22
 | 
			
		||||
size 22650
 | 
			
		||||
@@ -1,5 +1,16 @@
 | 
			
		||||
-------------------------------------------------------------------
 | 
			
		||||
Tue Jan 28 22:36:39 UTC 2014 - mlatimer@suse.com
 | 
			
		||||
 | 
			
		||||
- Update to version 0.09
 | 
			
		||||
- Implement Tie::IxHash to resolve testcase failures due to randomized hashes
 | 
			
		||||
  in perl 5.18 (https://rt.cpan.org/Public/Bug/Display.html?id=81552)
 | 
			
		||||
 * TAP-Formatter-JUnit-0.09-hashorder.patch 
 | 
			
		||||
- Add perl-Moose, perl-MooseX-NonMoose, and perl-Tie-IxHash as required
 | 
			
		||||
  packages for both build and runtime
 | 
			
		||||
 | 
			
		||||
-------------------------------------------------------------------
 | 
			
		||||
Thu Oct 10 17:19:51 UTC 2013 - mlatimer@suse.com
 | 
			
		||||
 | 
			
		||||
- Add BuildRequires: perl-Test-Harness to spec file to resolve SLE_11 build failures.
 | 
			
		||||
- Add BuildRequires: perl-Test-Harness to spec file to resolve SLE_11 build
 | 
			
		||||
  failures.
 | 
			
		||||
 | 
			
		||||
 
 | 
			
		||||
@@ -1,7 +1,7 @@
 | 
			
		||||
#
 | 
			
		||||
# spec file for package perl-TAP-Formatter-JUnit
 | 
			
		||||
#
 | 
			
		||||
# Copyright (c) 2013 SUSE LINUX Products GmbH, Nuernberg, Germany.
 | 
			
		||||
# Copyright (c) 2014 SUSE LINUX Products GmbH, Nuernberg, Germany.
 | 
			
		||||
#
 | 
			
		||||
# All modifications and additions to the file contributed by third parties
 | 
			
		||||
# remain the property of their copyright owners, unless otherwise agreed
 | 
			
		||||
@@ -19,25 +19,30 @@
 | 
			
		||||
%define cpan_name TAP-Formatter-JUnit
 | 
			
		||||
 | 
			
		||||
Name:           perl-%cpan_name
 | 
			
		||||
Version:        0.08
 | 
			
		||||
Version:        0.09
 | 
			
		||||
Release:        0
 | 
			
		||||
Summary:        Harness output delegate for JUnit output
 | 
			
		||||
License:        Perl
 | 
			
		||||
Group:          Development/Libraries/Perl
 | 
			
		||||
Provides:       %cpan_name
 | 
			
		||||
Source:         %cpan_name-%{version}.tar.gz
 | 
			
		||||
Patch0:         TAP-Formatter-JUnit-0.09-hashorder.patch
 | 
			
		||||
BuildArch:      noarch
 | 
			
		||||
BuildRoot:      %{_tmppath}/%{name}-%{version}-build
 | 
			
		||||
BuildRequires:  perl
 | 
			
		||||
BuildRequires:  perl-Class-Field
 | 
			
		||||
BuildRequires:  perl-File-Slurp
 | 
			
		||||
BuildRequires:  perl-IO-stringy
 | 
			
		||||
BuildRequires:  perl-Moose
 | 
			
		||||
BuildRequires:  perl-MooseX-NonMoose
 | 
			
		||||
BuildRequires:  perl-Test-Differences
 | 
			
		||||
BuildRequires:  perl-Test-Harness
 | 
			
		||||
BuildRequires:  perl-Tie-IxHash
 | 
			
		||||
BuildRequires:  perl-XML-Generator
 | 
			
		||||
BuildRequires:  perl-macros
 | 
			
		||||
Requires:       perl-Class-Field
 | 
			
		||||
Requires:       perl-File-Slurp
 | 
			
		||||
Requires:       perl-Moose
 | 
			
		||||
Requires:       perl-MooseX-NonMoose
 | 
			
		||||
Requires:       perl-Tie-IxHash
 | 
			
		||||
Requires:       perl-XML-Generator
 | 
			
		||||
%{perl_requires}
 | 
			
		||||
 | 
			
		||||
@@ -51,6 +56,8 @@ Authors:
 | 
			
		||||
%prep
 | 
			
		||||
%setup -q -n %cpan_name-%{version}
 | 
			
		||||
 | 
			
		||||
%patch0 -p0
 | 
			
		||||
 | 
			
		||||
%build
 | 
			
		||||
%{__perl} Build.PL installdirs=vendor
 | 
			
		||||
./Build build flags=%{?_smp_mflags}
 | 
			
		||||
 
 | 
			
		||||
		Reference in New Issue
	
	Block a user