File perl-TAP-Formatter-JUnit.spec of Package perl-TAP-Formatter-JUnit

#
# spec file for package perl-TAP-Formatter-JUnit
#
# Copyright (c) 2017 SUSE LINUX GmbH, Nuernberg, Germany.
#
# All modifications and additions to the file contributed by third parties
# remain the property of their copyright owners, unless otherwise agreed
# upon. The license for this file, and modifications and additions to the
# file, is the same license as for the pristine package itself (unless the
# license for the pristine package is not an Open Source License, in which
# case the license is the MIT License). An "Open Source License" is a
# license that conforms to the Open Source Definition (Version 1.9)
# published by the Open Source Initiative.

# Please submit bugfixes or comments via http://bugs.opensuse.org/
#


Name:           perl-TAP-Formatter-JUnit
Version:        0.11
Release:        0
%define cpan_name TAP-Formatter-JUnit
Summary:        Harness output delegate for JUnit output
License:        Artistic-1.0 or GPL-1.0+
Group:          Development/Libraries/Perl
Url:            http://search.cpan.org/dist/TAP-Formatter-JUnit/
Source0:        https://cpan.metacpan.org/authors/id/G/GT/GTERMARS/%{cpan_name}-%{version}.tar.gz
BuildArch:      noarch
BuildRoot:      %{_tmppath}/%{name}-%{version}-build
BuildRequires:  perl
BuildRequires:  perl-macros
BuildRequires:  perl(File::Slurp)
BuildRequires:  perl(IO::Scalar)
BuildRequires:  perl(IPC::Run)
BuildRequires:  perl(Module::Build) >= 0.400000
BuildRequires:  perl(Moose)
BuildRequires:  perl(MooseX::NonMoose)
BuildRequires:  perl(TAP::Harness) >= 3.12
BuildRequires:  perl(Test::XML)
BuildRequires:  perl(XML::Generator)
Requires:       perl(File::Slurp)
Requires:       perl(Moose)
Requires:       perl(MooseX::NonMoose)
Requires:       perl(TAP::Harness) >= 3.12
Requires:       perl(XML::Generator)
%{perl_requires}

%description
*This code is currently in alpha state and is subject to change.*

'TAP::Formatter::JUnit' provides JUnit output formatting for
'TAP::Harness'.

By default (e.g. when run with _prove_), the _entire_ test suite is
gathered together into a single JUnit XML document, which is then displayed
on 'STDOUT'. You can, however, have individual JUnit XML files dumped for
each individual test, by setting c<PERL_TEST_HARNESS_DUMP_TAP> to a
directory that you would like the JUnit XML dumped to. Note, that this will
*also* cause 'TAP::Harness' to dump the original TAP output into that
directory as well (but IMHO that's ok as you've now got the data in two
parsable formats).

Timing information is included in the JUnit XML, _if_ you specified
'--timer' when you ran _prove_.

In standard use, "passing TODOs" are treated as failure conditions (and are
reported as such in the generated JUnit). If you wish to treat these as a
"pass" and not a "fail" condition, setting 'ALLOW_PASSING_TODOS' in your
environment will turn these into pass conditions.

The JUnit output generated is partial to being grokked by Hudson
(http://hudson.dev.java.net/). That's the build tool I'm using at the
moment and needed to be able to generate JUnit output for.

%prep
%setup -q -n %{cpan_name}-%{version}

%build
%{__perl} Build.PL installdirs=vendor
./Build build flags=%{?_smp_mflags}

%check
./Build test

%install
./Build install destdir=%{buildroot} create_packlist=0
%perl_gen_filelist

%files -f %{name}.files
%defattr(-,root,root,755)
%doc Changes README

%changelog