From: Richard W.M. Jones Date: Tue, 20 Aug 2013 18:34:37 +0000 (+0100) Subject: spec: BR qemu & kernel so the 'make check' rule can run. X-Git-Tag: v1.1.2~4 X-Git-Url: http://git.annexia.org/?a=commitdiff_plain;h=dd43593f207ab1854c903b3233d0cbd606ae8be6;p=qemu-sanity-check.git spec: BR qemu & kernel so the 'make check' rule can run. Also: - Only run the tests on x86, because ARM isn't likely to work. - If make check fails, make sure test-suite.log is printed out. --- diff --git a/configure.ac b/configure.ac index cd5e47b..c4b9dfe 100644 --- a/configure.ac +++ b/configure.ac @@ -20,7 +20,7 @@ AM_INIT_AUTOMAKE([foreign]) dnl Only used temporarily while the spec file is contained in the dnl tarball. We will remove this later. -AC_SUBST([RPM_RELEASE],[1]) +AC_SUBST([RPM_RELEASE],[2]) dnl Check for basic C environment. AC_PROG_CC_STDC diff --git a/qemu-sanity-check.spec.in b/qemu-sanity-check.spec.in index 94dfa0c..f2d3ad0 100644 --- a/qemu-sanity-check.spec.in +++ b/qemu-sanity-check.spec.in @@ -16,6 +16,15 @@ BuildRequires: /usr/bin/perldoc BuildRequires: cpio BuildRequires: glibc-static +# BuildRequire these in order to let 'make check' run. These are +# not required unless you want to run the tests. Note don't run the +# tests on ARM since qemu isn't likely to work. +%ifarch %{ix86} x86-64 +BuildRequires: qemu-system-x86 +%endif + +BuildRequires: kernel + %ifarch %{ix86} x86-64 Requires: qemu-system-x86 %endif @@ -41,7 +50,12 @@ make %{?_smp_mflags} %check -make check +%ifarch %{ix86} x86-64 +make check || { + cat test-suite.log + exit 1 +} +%endif %install