From: Mikhail Kashkarov Date: Fri, 20 Sep 2019 15:54:52 +0000 (+0300) Subject: Add rpm with testresults X-Git-Tag: accepted/tizen/base/tool/dev/20230608.110732~46 X-Git-Url: http://review.tizen.org/git/?a=commitdiff_plain;h=4b012839299a9af3ef1abd1b011b75fd68c40f10;p=platform%2Fupstream%2Fglibc.git Add rpm with testresults Define "run_tests" or "glibc_run_tests" to enable it. Change-Id: I14376885661f99efe001d3b86e57d5370475559e --- diff --git a/packaging/glibc.spec b/packaging/glibc.spec index 6e8739f..8630731 100644 --- a/packaging/glibc.spec +++ b/packaging/glibc.spec @@ -12,6 +12,10 @@ # 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 @@ -204,6 +208,13 @@ binaries working, but since this libraries are not supported and there 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 @@ -378,6 +389,16 @@ $BuildCC -static %{optflags} -Os $RPM_SOURCE_DIR/glibc_post_upgrade.c -o glibc_p '-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 +} + ####################################################################### ### @@ -546,6 +567,13 @@ cp $ASAN_BUILD/libc.so %{buildroot}/%{_lib}/libc-2.24-asan.so %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 @@ -795,5 +823,11 @@ done %{_bindir}/makedb /var/db/Makefile +%{?glibc_run_tests: +%files testresults +%defattr(-,root,root) +%doc testresults/check.log +%doc testresults/* +} %docs_package