packaging: fix testsuite build.
authorAndrey Drobyshev <a.drobyshev@partner.samsung.com>
Mon, 1 Oct 2018 13:35:47 +0000 (16:35 +0300)
committerDongkyun Son <dongkyun.s@samsung.com>
Fri, 28 Dec 2018 10:45:59 +0000 (10:45 +0000)
 * Add list of dependent packages needed to build & run tests along with
corresponding macro run_tests;
 * Add %check section.

Signed-off-by: Andrey Drobyshev <a.drobyshev@partner.samsung.com>
Change-Id: I2cc277d6855247747025a4d3b744a5c7804f4fca

packaging/binutils-aarch64.spec
packaging/binutils-armv7hl.spec
packaging/binutils-armv7l.spec
packaging/binutils.spec

index 059ddf4..4c3e55f 100644 (file)
 
 %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
index 4bbe3aa..c1b09e3 100644 (file)
 
 %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
index f7d99d5..422c453 100644 (file)
 
 %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
index 96c4d55..7f2479d 100644 (file)
 
 %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