SHA256
1
0
forked from pool/bats
bats/bats.spec
Olav Reinert 3f85e900a0 Accepting request 933599 from home:dirkmueller:Factory
- update to 1.5.0:
  * new command line flags
    * `--verbose-run`: Make `run` print `$output` by default
    * `-x`, `--trace`: Print test commands as they are executed (like `set -x`)`
    * `--show-output-of-passing-tests`: Print output of passing tests
    * `--print-output-on-failure`: Automatically print the value of  `$output` on
      failed tests
    * `--gather-test-outputs-in <directory>`: Gather the output of failing **and**
      passing tests as files in directory
  * Experimental: add return code checks to `run` via `!`/`-<N>`
  * `install.sh` and `uninstall.sh` take an optional second parameter for the lib
    folder name to allow for multilib install, e.g. into lib64
  * add `run` flag `--keep-empty-lines` to retain empty lines in `${lines[@]}`
  * add `run` flag `--separate-stderr` which also fills `$stderr` and
    `$stderr_lines`
  * don't glob `run`'s `$output` when splitting into `${lines[@]}`
  * remove empty line after test with pretty formatter on some terminals
  * don't run setup_file/teardown_file on files without tests, e.g. due to
    filtering
  * print final line without newline on Bash 3.2 for midtest (ERREXIT) failures
  * abort with error on missing flock/shlock when running in parallel mode
  * improved `set -u` test and fixed some unset variable accesses
  * shorten suite/file/test temporary folder paths to leave enough space even on
    restricted systems
  * added BATS_TEST_TMPDIR, BATS_FILE_TMPDIR, BATS_SUITE_TMPDIR
  * added checks and improved documentation for `$BATS_TMPDIR`
  * the docker container now uses [tini](https://github.com/krallin/tini) as the
    container entrypoint to improve signal forwarding
  * script to uninstall bats from a given prefix
  * replace preprocessed file path (e.g. `/tmp/bats-run-22908-NP0f9h/bats.23102.src`)

OBS-URL: https://build.opensuse.org/request/show/933599
OBS-URL: https://build.opensuse.org/package/show/devel:tools/bats?expand=0&rev=23
2021-11-28 15:06:21 +00:00

73 lines
2.1 KiB
RPMSpec

#
# spec file for package bats
#
# Copyright (c) 2021 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 pname %{name}-core
Name: bats
Version: 1.5.0
Release: 0
Summary: Bash Automated Testing System
License: MIT
Group: Development/Tools/Other
URL: https://github.com/%{pname}/%{pname}/
Source: https://github.com/%{pname}/%{pname}/archive/v%{version}.tar.gz#/%{pname}-%{version}.tar.gz
BuildRequires: ncurses-utils
Requires: gnu_parallel
BuildArch: noarch
%description
Bats is a TAP-compliant (http://testanything.org/) testing framework for Bash.
It provides a simple and repeatable way to verify that the UNIX programs you
write behave as expected.
A Bats test file is a Bash script with special syntax for defining test cases.
Under the hood, each test case is just a function with a description.
Bats is most useful when testing software written in Bash, but you can use it
to test any UNIX program.
%prep
%setup -q -n %{pname}-%{version}
sed -i '1s|#!%{_bindir}/env bash|#!/bin/bash|' ./lib{,exec}/%{pname}/* ./bin/bats
%if 0%{?suse_version} <= 1500
mv -v libexec/%{pname}/* lib/%{pname}/
sed -i 's|libexec|lib|g' install.sh ./lib/%{pname}/* ./bin/bats
%endif
%build
%install
./install.sh %{buildroot}%{_prefix}
%check
./bin/bats test/bats.bats
./bin/bats test/suite.bats
%files
%license LICENSE.md
%doc README.md
%{_bindir}/bats
%{_prefix}/lib/%{pname}
%if 0%{?suse_version} > 1500
%{_libexecdir}/%{pname}
%endif
%{_mandir}/man1/bats.1%{?ext_man}
%{_mandir}/man7/bats.7%{?ext_man}
%changelog