From 4ec318c2b50402c26b5ba47c02c87b6e0761e08e Mon Sep 17 00:00:00 2001 From: Adam Williamson Date: Mar 30 2017 03:31:07 +0000 Subject: BR Mojo::File and run fullstack test only on F >24 --- diff --git a/os-autoinst.spec b/os-autoinst.spec index 318e4b4..d86930c 100644 --- a/os-autoinst.spec +++ b/os-autoinst.spec @@ -8,6 +8,15 @@ %global with_tests 1 %endif +# Full stack test only runs reliably on x86, and requires a Mojo +# component which isn't available on Fedora < 25 +%ifnarch %{ix86} x86_64 +%global no_fullstack 1 +%endif +%if 0%{?fedora} < 25 +%global no_fullstack 1 +%endif + # os-autoinst has a bunch of annoyingly-badly-named private modules, # we do not want automatic provides or requires for these # ref https://fedoraproject.org/wiki/Packaging:AutoProvidesAndRequiresFiltering#Perl @@ -59,7 +68,6 @@ BuildRequires: pkgconfig(theoraenc) BuildRequires: systemd %if 0%{?with_tests} BuildRequires: perl(Devel::Cover) -BuildRequires: perl(Mojo::File) BuildRequires: perl(Pod::Coverage) # The OO interface to Test::Compile only appeared in 1.1.0 BuildRequires: perl(Test::Compile) >= 1.1.0 @@ -73,6 +81,10 @@ BuildRequires: perl(Try::Tiny) # 'fullstack' test uses these BuildRequires: /usr/bin/qemu-system-i386 BuildRequires: /usr/bin/qemu-img +%if 0%{?no_fullstack} +%else +BuildRequires: perl(Mojo::File) +%endif # no_fullstack %endif # with_tests Requires: /usr/bin/qemu-img Requires: optipng @@ -121,8 +133,7 @@ This package contains Open vSwitch support for os-autoinst. %prep %autosetup -n %{github_name}-%{github_commit} -p1 -# the full-stack test only really runs reliably on x86_64 and i386 -%ifnarch %{ix86} x86_64 +%if 0%{?no_fullstack} rm -f t/99-full-stack.t sed -i -e 's, 99-full-stack.t,,g' t/Makefile.am %endif