]> git.pld-linux.org Git - packages/mold.git/commitdiff
add tests invocation
authorJan Palus <atler@pld-linux.org>
Wed, 29 Jun 2022 10:30:56 +0000 (12:30 +0200)
committerJan Palus <atler@pld-linux.org>
Wed, 29 Jun 2022 10:30:56 +0000 (12:30 +0200)
mold.spec

index 669b3db7e9b03ea956ac10c7e6be3935fcea880c..f39009b6718ef90fc6b2bc1be642e1c65e60cc86 100644 (file)
--- a/mold.spec
+++ b/mold.spec
@@ -1,3 +1,7 @@
+#
+# Conditional build:
+%bcond_without tests           # build without tests
+
 Summary:       mold: A Modern Linker
 Name:          mold
 Version:       1.3.0
@@ -9,10 +13,12 @@ Source0:     https://github.com/rui314/mold/archive/v%{version}/%{name}-%{version}.t
 Patch0:                atomic.patch
 Patch1:                arm32-reloc.patch
 URL:           https://github.com/rui314/mold
+%{?with_tests:BuildRequires:   glibc-static}
 %ifarch %{armv6} riscv64
 BuildRequires: libatomic-devel
 %endif
 BuildRequires: libstdc++-devel >= 6:10
+%{?with_tests:BuildRequires:   libstdc++-static >= 6:10}
 BuildRequires: mimalloc-devel >= 1.7
 BuildRequires: openssl-devel
 BuildRequires: rpmbuild(macros) >= 2.007
@@ -52,6 +58,17 @@ especially in rapid debug-edit-rebuild cycles.
        LIBDIR="%{_libdir}" \
        MANDIR="%{_mandir}"
 
+%if %{with tests}
+%{__make} check \
+       MACHINE="%{_target_cpu}" \
+       TEST_CC="%{__cc}" \
+       TEST_GCC="%{__cc}" \
+       TEST_CXX="%{__cxx}" \
+       TEST_GXX="%{__cxx}" \
+       SYSTEM_MIMALLOC=1 \
+       SYSTEM_TBB=1
+%endif
+
 %install
 rm -rf $RPM_BUILD_ROOT
 
This page took 0.26238 seconds and 4 git commands to generate.