better tests
OBS-URL: https://build.opensuse.org/package/show/devel:tools/b4?expand=0&rev=44
This commit is contained in:
parent
c91ddfd9fd
commit
5cf478713c
15
b4.spec
15
b4.spec
@ -26,9 +26,13 @@ Group: Development/Tools/Other
|
|||||||
URL: https://git.kernel.org/pub/scm/utils/b4/b4.git
|
URL: https://git.kernel.org/pub/scm/utils/b4/b4.git
|
||||||
Source0: %{name}-%{version}.tar.xz
|
Source0: %{name}-%{version}.tar.xz
|
||||||
BuildArch: noarch
|
BuildArch: noarch
|
||||||
# for checks
|
# SECTION test requirements
|
||||||
BuildRequires: git-core
|
BuildRequires: git-core
|
||||||
|
BuildRequires: python3-dkimpy
|
||||||
|
BuildRequires: python3-dnspython
|
||||||
|
BuildRequires: python3-patatt
|
||||||
BuildRequires: python3-requests
|
BuildRequires: python3-requests
|
||||||
|
# /SECTION
|
||||||
BuildRequires: python3-setuptools
|
BuildRequires: python3-setuptools
|
||||||
Requires: python3-dkimpy >= 1.0.5
|
Requires: python3-dkimpy >= 1.0.5
|
||||||
Requires: python3-dnspython >= 2.0.0
|
Requires: python3-dnspython >= 2.0.0
|
||||||
@ -47,6 +51,9 @@ precursor to Lore and Data in the Star Trek universe.
|
|||||||
%prep
|
%prep
|
||||||
%autosetup -p1
|
%autosetup -p1
|
||||||
|
|
||||||
|
# use the system one
|
||||||
|
rm -rf patatt
|
||||||
|
|
||||||
# ditch shebang from .py files, they are non-executables anyway
|
# ditch shebang from .py files, they are non-executables anyway
|
||||||
sed -i.old '1{/#!.*/d}' b4/*.py
|
sed -i.old '1{/#!.*/d}' b4/*.py
|
||||||
|
|
||||||
@ -60,11 +67,11 @@ mv %{buildroot}/%{_mandir}/man5 %{buildroot}/%{_mandir}/man.5
|
|||||||
%check
|
%check
|
||||||
python3 setup.py check
|
python3 setup.py check
|
||||||
export PYTHONPATH="./"
|
export PYTHONPATH="./"
|
||||||
THEIRS=`python3 ./b4/command.py --version`
|
THEIRS=`%{buildroot}/%{_bindir}/b4 --version`
|
||||||
OURS=`sed -n "s/__VERSION__ = '\(.*\)'/\1/p" b4/__init__.py`
|
OURS=`sed -n "s/__VERSION__ = '\(.*\)'/\1/p" b4/__init__.py`
|
||||||
test "$THEIRS" = "$OURS"
|
test "$THEIRS" = "$OURS"
|
||||||
python3 ./b4/command.py --help |grep -q 'mbox,am,attest'
|
%{buildroot}/%{_bindir}/b4 --help |grep -q 'mbox,am,attest'
|
||||||
python3 ./b4/command.py mbox abc |& grep -q 'Looking up https://lore.kernel.org/r/abc'
|
%{buildroot}/%{_bindir}/b4 mbox abc |& grep -q 'Looking up https://lore.kernel.org/r/abc'
|
||||||
|
|
||||||
%files
|
%files
|
||||||
%doc README.rst
|
%doc README.rst
|
||||||
|
Loading…
Reference in New Issue
Block a user