Files
perl-TAP-Formatter-HTML/perl-TAP-Formatter-HTML.spec
2025-08-12 18:17:24 +02:00

117 lines
4.0 KiB
RPMSpec

#
# spec file for package perl-TAP-Formatter-HTML
#
# Copyright (c) 2024 SUSE LLC
#
# 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 https://bugs.opensuse.org/
#
%define cpan_name TAP-Formatter-HTML
Name: perl-TAP-Formatter-HTML
Version: 0.130.0
Release: 0
%define cpan_version 0.13
License: Artistic-1.0 OR GPL-1.0-or-later
Summary: TAP Test Harness output delegate for html output
URL: https://metacpan.org/release/%{cpan_name}
Source0: https://cpan.metacpan.org/authors/id/S/SC/SCHWIGON/%{cpan_name}-%{cpan_version}.tar.gz
Source100: README.md
BuildArch: noarch
BuildRequires: perl
BuildRequires: perl-macros
BuildRequires: perl(File::Temp) >= 0.17
BuildRequires: perl(Module::Build) >= 0.42
BuildRequires: perl(TAP::Parser) >= 3.10
BuildRequires: perl(Template) >= 2.14
BuildRequires: perl(Test::Harness) >= 3.17
BuildRequires: perl(URI) >= 1.35
BuildRequires: perl(accessors) >= 0.02
Requires: perl(File::Temp) >= 0.17
Requires: perl(TAP::Parser) >= 3.10
Requires: perl(Template) >= 2.14
Requires: perl(Test::Harness) >= 3.17
Requires: perl(URI) >= 1.35
Requires: perl(accessors) >= 0.02
Provides: perl(App::Prove::Plugin::HTML) = 0.130.0
Provides: perl(TAP::Formatter::HTML) = 0.130.0
Provides: perl(TAP::Formatter::HTML::Session) = 0.130.0
%undefine __perllib_provides
%{perl_requires}
%description
This module provides HTML output formatting for TAP::Harness (a replacement
for Test::Harness. It is largely based on ideas from TAP::Test::HTMLMatrix
(which was built on Test::Harness and thus had a few limitations - hence
this module). For sample output, see:
http://www.spurkis.org/TAP-Formatter-HTML/test-output.html
This module is targeted at all users of automated test suites. It's meant
to make reading test results easier, giving you a visual summary of your
test suite and letting you drill down into individual failures (which will
hopefully make testing more likely to happen at your organization ;-).
The design goals are:
* _easy to use_
Once you've got your test report, it should be obvious how to use it.
* _helpful_
It should be helpful by pointing out _where_ & _why_ your test suite is
breaking. If you've written your tests well, it should give you enough info
to start tracking down the issue.
* _easy to install_
Eg: should be a clean install from CPAN, and you shouldn't need to modify
your existing test suite to get up & running, though _you will need to stop
using Test::Harness unfortunately_.
* _work out of the box_
You shouldn't need to do any custom-coding to get it working - the default
configuration & templates should be enough to get started with. Once
installed it should be a matter of running:
% prove -m -Q --formatter=TAP::Formatter::HTML >output.html
From your project's home dir, and opening the resulting file.
* _easy to configure_
You should be able to configure & customize it to suit your needs. As such,
css, javascript and templates are all configurable.
%prep
%autosetup -n %{cpan_name}-%{cpan_version}
find . -type f ! -path "*/t/*" ! -name "*.pl" ! -path "*/bin/*" ! -path "*/script/*" ! -path "*/scripts/*" ! -name "configure" -print0 | xargs -0 chmod 644
%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
%doc Changes examples README Todo
%changelog