From 4b561c5e98a3205985823dcf9bb9040fdc69d103 Mon Sep 17 00:00:00 2001 From: Andrey Drobyshev Date: Mon, 1 Oct 2018 16:35:47 +0300 Subject: [PATCH] packaging: fix testsuite build. * Add list of dependent packages needed to build & run tests along with corresponding macro run_tests; * Add %check section. Signed-off-by: Andrey Drobyshev Change-Id: I2cc277d6855247747025a4d3b744a5c7804f4fca --- packaging/binutils-aarch64.spec | 14 ++++++++++++++ packaging/binutils-armv7hl.spec | 14 ++++++++++++++ packaging/binutils-armv7l.spec | 14 ++++++++++++++ packaging/binutils.spec | 14 ++++++++++++++ 4 files changed, 56 insertions(+) diff --git a/packaging/binutils-aarch64.spec b/packaging/binutils-aarch64.spec index 059ddf4..4c3e55f 100644 --- a/packaging/binutils-aarch64.spec +++ b/packaging/binutils-aarch64.spec @@ -26,6 +26,10 @@ %define target_arch %{target_cpu}-tizen-linux-gnu%{?target_abi} +%if 0%{?run_tests} +%define binutils_run_tests 1 +%endif + Name: binutils%{?cross:-%{cross}} BuildRequires: makeinfo BuildRequires: bison @@ -33,6 +37,11 @@ BuildRequires: flex BuildRequires: ncurses-devel BuildRequires: zlib-devel BuildRequires: gcc-c++ +%if 0%{?binutils_run_tests} +BuildRequires: dejagnu +BuildRequires: gdb +BuildRequires: glibc-devel-static +%endif Version: 2.27 Release: 0 Url: http://www.gnu.org/software/binutils/ @@ -109,6 +118,11 @@ cd build-dir make %{?_smp_mflags} +%check +%{?binutils_run_tests: + make %{?_smp_mflags} -C build-dir check -k +} + %install cd build-dir make DESTDIR=$RPM_BUILD_ROOT install diff --git a/packaging/binutils-armv7hl.spec b/packaging/binutils-armv7hl.spec index 4bbe3aa..c1b09e3 100644 --- a/packaging/binutils-armv7hl.spec +++ b/packaging/binutils-armv7hl.spec @@ -26,6 +26,10 @@ %define target_arch %{target_cpu}-tizen-linux-gnu%{?target_abi} +%if 0%{?run_tests} +%define binutils_run_tests 1 +%endif + Name: binutils%{?cross:-%{cross}} BuildRequires: makeinfo BuildRequires: bison @@ -33,6 +37,11 @@ BuildRequires: flex BuildRequires: ncurses-devel BuildRequires: zlib-devel BuildRequires: gcc-c++ +%if 0%{?binutils_run_tests} +BuildRequires: dejagnu +BuildRequires: gdb +BuildRequires: glibc-devel-static +%endif Version: 2.27 Release: 0 Url: http://www.gnu.org/software/binutils/ @@ -109,6 +118,11 @@ cd build-dir make %{?_smp_mflags} +%check +%{?binutils_run_tests: + make %{?_smp_mflags} -C build-dir check -k +} + %install cd build-dir make DESTDIR=$RPM_BUILD_ROOT install diff --git a/packaging/binutils-armv7l.spec b/packaging/binutils-armv7l.spec index f7d99d5..422c453 100644 --- a/packaging/binutils-armv7l.spec +++ b/packaging/binutils-armv7l.spec @@ -26,6 +26,10 @@ %define target_arch %{target_cpu}-tizen-linux-gnu%{?target_abi} +%if 0%{?run_tests} +%define binutils_run_tests 1 +%endif + Name: binutils%{?cross:-%{cross}} BuildRequires: makeinfo BuildRequires: bison @@ -33,6 +37,11 @@ BuildRequires: flex BuildRequires: ncurses-devel BuildRequires: zlib-devel BuildRequires: gcc-c++ +%if 0%{?binutils_run_tests} +BuildRequires: dejagnu +BuildRequires: gdb +BuildRequires: glibc-devel-static +%endif Version: 2.27 Release: 0 Url: http://www.gnu.org/software/binutils/ @@ -109,6 +118,11 @@ cd build-dir make %{?_smp_mflags} +%check +%{?binutils_run_tests: + make %{?_smp_mflags} -C build-dir check -k +} + %install cd build-dir make DESTDIR=$RPM_BUILD_ROOT install diff --git a/packaging/binutils.spec b/packaging/binutils.spec index 96c4d55..7f2479d 100644 --- a/packaging/binutils.spec +++ b/packaging/binutils.spec @@ -23,6 +23,10 @@ %define target_arch %{target_cpu}-tizen-linux-gnu%{?target_abi} +%if 0%{?run_tests} +%define binutils_run_tests 1 +%endif + Name: binutils%{?cross:-%{cross}} BuildRequires: makeinfo BuildRequires: bison @@ -30,6 +34,11 @@ BuildRequires: flex BuildRequires: ncurses-devel BuildRequires: zlib-devel BuildRequires: gcc-c++ +%if 0%{?binutils_run_tests} +BuildRequires: dejagnu +BuildRequires: gdb +BuildRequires: glibc-devel-static +%endif Version: 2.27 Release: 0 Url: http://www.gnu.org/software/binutils/ @@ -106,6 +115,11 @@ cd build-dir make %{?_smp_mflags} +%check +%{?binutils_run_tests: + make %{?_smp_mflags} -C build-dir check -k +} + %install cd build-dir make DESTDIR=$RPM_BUILD_ROOT install -- 2.7.4