# license that conforms to the Open Source Definition (Version 1.9)
# published by the Open Source Initiative.
+%if 0%{?run_tests}
+%define glibc_run_tests 1
+%endif
+
# This will avoid building some parts of glibc
%define asan_arch x86_64 armv7l aarch64
%bcond_with fast_build
is no gurantee that they work for you, you should try to get newer
versions of your software.
+%package testresults
+Summary: Testsuite results
+License: LGPL-2.1+
+Group: Development/Languages
+%description testresults
+Results from running the glibc testsuites.
+
%{?asan:
%ifarch %asan_arch
%package asan
'-DREMOVE_TLS_DIRS' '-DREMOVE_PPC_OPTIMIZE_POWER5' \
'-DLIBDIR="/%{_lib}"' '-DGCONV_MODULES_DIR="%{_libdir}/gconv"'
+#
+# Build testsuite
+#
+# #check sections could be redefined/disabled, so keep this inside #build
+
+%{?glibc_run_tests:
+ export LD_AS_NEEDED=0
+ (make %{?_smp_mflags} -C cc-base check || true) 2>&1 | tee check.log
+}
+
#######################################################################
###
%endif
}
+%{?glibc_run_tests:
+ mkdir testresults
+ cp --parents $(find cc-base -name "*tests.sum") testresults/
+ cp check.log testresults/
+ chmod 644 $(find testresults/ -type f)
+}
+
%post -p %{_sbindir}/glibc_post_upgrade
%postun -p /sbin/ldconfig
%{_bindir}/makedb
/var/db/Makefile
+%{?glibc_run_tests:
+%files testresults
+%defattr(-,root,root)
+%doc testresults/check.log
+%doc testresults/*
+}
%docs_package