diff --git a/.gitignore b/.gitignore index e54ccfa..bfec4c1 100644 --- a/.gitignore +++ b/.gitignore @@ -37,3 +37,12 @@ /libabigail-2.1.tar.gz /libabigail-2.2.tar.xz /libabigail-2.3.tar.xz +/0001-ir-Remove-redundant-virtual-member-functions.patch +/libabigail-2.4.tar.xz +/0001-Bug-31045-Don-t-try-setting-translation-unit-for-uni.patch +/0002-suppression-Add-has_strict_flexible_array_data_membe.patch +/libabigail-2.5.tar.xz +/libabigail-2.6.tar.xz +/libabigail-2.7.tar.xz +/libabigail-2.8.tar.xz +/libabigail-2.9.tar.xz diff --git a/0001-Fix-fedabipkgdiff-configure-check-for-Python-3.12.patch b/0001-Fix-fedabipkgdiff-configure-check-for-Python-3.12.patch deleted file mode 100644 index 4c2daa4..0000000 --- a/0001-Fix-fedabipkgdiff-configure-check-for-Python-3.12.patch +++ /dev/null @@ -1,40 +0,0 @@ -From 020f008cc58f9cb61baaa175ae1fcb6c4faca55b Mon Sep 17 00:00:00 2001 -From: Yaakov Selkowitz -Date: Fri, 7 Jul 2023 13:57:28 -0400 -Subject: [PATCH] Fix fedabipkgdiff configure check for Python 3.12 - -importlib is the Python 3 replacement to imp, which was deprecated in -Python 3.4 and removed in 3.12. - - * configure.ac (REQUIRED_PYTHON_MODULES_FOR_FEDABIPKGDIFF): - Test for importlib.machinery instead of imp with python3. - -Signed-off-by: Yaakov Selkowitz ---- - configure.ac | 4 +++- - 1 file changed, 3 insertions(+), 1 deletion(-) - -diff --git a/configure.ac b/configure.ac -index b4e7e38e..b3f97ba2 100644 ---- a/configure.ac -+++ b/configure.ac -@@ -739,13 +739,15 @@ if test x$CHECK_DEPS_FOR_FEDABIPKGDIFF = xyes; then - # urllib.parse. Oh well. - if test x$PYTHON = xpython3; then - URLPARSE_MODULE=urllib.parse -+ IMPORT_MODULE=importlib.machinery - else - URLPARSE_MODULE=urlparse -+ IMPORT_MODULE=imp - fi - - REQUIRED_PYTHON_MODULES_FOR_FEDABIPKGDIFF="\ - argparse logging os re subprocess sys $URLPARSE_MODULE \ -- xdg koji mock rpm imp tempfile mimetypes shutil six" -+ xdg koji mock rpm $IMPORT_MODULE tempfile mimetypes shutil six" - - AX_CHECK_PYTHON_MODULES([$REQUIRED_PYTHON_MODULES_FOR_FEDABIPKGDIFF], - [$PYTHON], --- -2.41.0 - diff --git a/0003-Replace-deprecated-mock-with-unittest.mock.patch b/0003-Replace-deprecated-mock-with-unittest.mock.patch new file mode 100644 index 0000000..f5d21d4 --- /dev/null +++ b/0003-Replace-deprecated-mock-with-unittest.mock.patch @@ -0,0 +1,26 @@ +From 8602d3c36dad05ada68feedc80926afadff448a2 Mon Sep 17 00:00:00 2001 +From: Maxwell G +Date: Sat, 13 Jan 2024 05:50:39 +0000 +Subject: [PATCH] Replace deprecated mock with unittest.mock + +Relates: https://fedoraproject.org/wiki/Changes/RemovePythonMockUsage +--- + tests/mockfedabipkgdiff.in | 2 +- + 1 file changed, 1 insertion(+), 1 deletion(-) + +diff --git a/tests/mockfedabipkgdiff.in b/tests/mockfedabipkgdiff.in +index 1e56266..863cf7f 100644 +--- a/tests/mockfedabipkgdiff.in ++++ b/tests/mockfedabipkgdiff.in +@@ -42,7 +42,7 @@ import tempfile + import six + + try: +- from mock import patch ++ from unittest.mock import patch + except ImportError: + import sys + six.print_('mock is required to run tests. Please install before running' +-- +2.43.0 + diff --git a/libabigail.spec b/libabigail.spec index 90c913b..19dded8 100644 --- a/libabigail.spec +++ b/libabigail.spec @@ -1,28 +1,37 @@ +# dependencies are not available in RHEL +%bcond abidb %{undefined rhel} + %global tarball_revision 1 %global tarball_name %{name}-%{version} Name: libabigail -Version: 2.3 -Release: 2%{?dist} +Version: 2.9 +Release: 1%{?dist} Summary: Set of ABI analysis tools -License: ASL 2.0 +License: Apache-2.0 WITH LLVM-exception URL: https://sourceware.org/libabigail/ Source0: http://mirrors.kernel.org/sourceware/libabigail/%{tarball_name}.tar.xz -# fix configure for removal of 'imp' in Python 3.12; code already fixed -# https://sourceware.org/pipermail/libabigail/2023q3/005581.html -Patch0: 0001-Fix-fedabipkgdiff-configure-check-for-Python-3.12.patch - +BuildRequires: git +BuildRequires: libbpf-devel BuildRequires: binutils-devel BuildRequires: gcc-c++ BuildRequires: libtool BuildRequires: elfutils-devel BuildRequires: libxml2-devel +BuildRequires: xxhash-devel +BuildRequires: xz-devel >= 5.2.0 BuildRequires: doxygen BuildRequires: python3-sphinx BuildRequires: texinfo -%if 0%{?fedora} +%if %{with abidb} +BuildRequires: python3-GitPython +BuildRequires: python3-libarchive-c +Requires: python3-GitPython +Requires: python3-libarchive-c +%endif +%if 0%{?fedora} || 0%{?epel} BuildRequires: dpkg BuildRequires: koji BuildRequires: python3-koji @@ -65,12 +74,11 @@ This package contains documentation for the libabigail tools in the form of man pages, texinfo documentation and API documentation in html format. -%if 0%{?fedora} +%if 0%{?fedora} || 0%{?epel} %package fedora Summary: Utility to compare the ABI of Fedora packages BuildRequires: python3-devel BuildRequires: python3-koji -BuildRequires: python3-mock BuildRequires: python3-rpm BuildRequires: python3-pyxdg #For x-rpm mimetype definition! @@ -94,11 +102,10 @@ them manually. %endif %prep -%setup -n %{tarball_name} -%patch -P 0 -p1 +%autosetup -v -S git %build -%configure --enable-ctf --disable-silent-rules --disable-zip-archive --disable-static +%configure %{?with_abidb:--enable-abidb} --enable-ctf --enable-btf --disable-silent-rules --disable-zip-archive --disable-static make %{?_smp_mflags} pushd doc make html-doc @@ -117,7 +124,7 @@ find %{buildroot} -name '*.la' -exec rm -f {} ';' # default 'install' target of the makefile. make -C doc/manuals install-man-and-info-doc DESTDIR=%{buildroot} -%if 0%{?fedora} +%if 0%{?fedora} || 0%{?epel} # Explicitly use Python 3 as the interpreter %py3_shebang_fix %{buildroot}%{_bindir}/fedabipkgdiff %endif @@ -125,10 +132,6 @@ make -C doc/manuals install-man-and-info-doc DESTDIR=%{buildroot} %check time make %{?_smp_mflags} check check-self-compare || (cat tests/test-suite.log && exit 2) -if test $? -ne 0; then - cat tests/tests-suite.log -fi - %ldconfig_scriptlets %files @@ -138,8 +141,11 @@ fi %{_bindir}/abilint %{_bindir}/abipkgdiff %{_bindir}/kmidiff -%{_libdir}/libabigail.so.2 -%{_libdir}/libabigail.so.2.0.0 +%if %{with abidb} +%{_bindir}/abidb +%endif +%{_libdir}/libabigail.so.8 +%{_libdir}/libabigail.so.8.0.0 %{_libdir}/libabigail/default.abignore %doc README AUTHORS ChangeLog %license LICENSE.txt license-change-2020.txt @@ -157,12 +163,104 @@ fi %license LICENSE.txt license-change-2020.txt %doc doc/manuals/html/* -%if 0%{?fedora} +%if 0%{?fedora} || 0%{?epel} %files fedora %{_bindir}/fedabipkgdiff %endif %changelog +* Thu Nov 06 2025 Dodji Seketeli - 2.9-1 +- Update to upstream 2.9 tarball +- Support new libabigail.so.8.0.0 SONAME +- Run 'make check check-self-compare' instead of two separate make invocations. + +* Thu Jul 24 2025 Fedora Release Engineering - 2.8-2 +- Rebuilt for https://fedoraproject.org/wiki/Fedora_43_Mass_Rebuild + +* Fri Jul 04 2025 Dodji Seketeli - 2.8-1 +- Update to usptream 2.8 tarball +- Support new libabigail.so.7.0.0 SONAME + +* Fri Apr 11 2025 Dodji Seketeli - 2.7-1 +- Update to upstream 2.7 tarball +- Do not build with by default XXH_INLINE_ALL anymore +- Drop xxhash-static dependency +- Add xz-devel >= 5.2.0 dependency to support reading xz-compressed binaries +- Support new libabigail.so.6.0.0 SONAME + +* Tue Feb 04 2025 Yaakov Selkowitz - 2.6-3 +- Limit fedabipkgdiff to Fedora and EPEL + +* Fri Jan 17 2025 Fedora Release Engineering - 2.6-2 +- Rebuilt for https://fedoraproject.org/wiki/Fedora_42_Mass_Rebuild + +* Fri Nov 1 2024 Dodji Seketeli - 2.6-1 +- Update to upstream 2.6 tarball +- Add xxhash-devel as BuildRequires +- Update library to libabigail.so.5.0.0 + +* Fri Jul 26 2024 Yaakov Selkowitz - 2.5-4 +- Add runtime dependencies of abidb +- Disable abidb on RHEL + +* Thu Jul 18 2024 Fedora Release Engineering - 2.5-3 +- Rebuilt for https://fedoraproject.org/wiki/Fedora_41_Mass_Rebuild + +* Thu May 16 2024 Adam Williamson - 2.5-2 +- Rebuild with fixed CI metadata + +* Thu Apr 18 2024 Dodji Seketeli - 2.5-1 +- Update to upstream 2.5 tarball +- Drop patches + 0001-Bug-31045-Don-t-try-setting-translation-unit-for-uni.patch + 0002-suppression-Add-has_strict_flexible_array_data_membe.patch + 0003-Replace-deprecated-mock-with-unittest.mock.patch +- Package libabigail.so.4 rather than the previous libabigail.so.3. +- Add abidb to the package + Added BuildRequires: python3-GitPython, python3-libarchive-c +- Better handle error handling when tests fails. + +* Fri Jan 26 2024 Maxwell G - 2.4-7 +- Remove python3-mock dependency +- Apply patch 0003-Replace-deprecated-mock-with-unittest.mock.patch + +* Thu Jan 25 2024 Fedora Release Engineering - 2.4-6 +- Rebuilt for https://fedoraproject.org/wiki/Fedora_40_Mass_Rebuild + +* Sun Jan 21 2024 Fedora Release Engineering - 2.4-5 +- Rebuilt for https://fedoraproject.org/wiki/Fedora_40_Mass_Rebuild + +* Mon Nov 20 2023 Dodji Seketeli - 2.4-4 +- Fix SPDX licensing string + +* Wed Nov 15 2023 Dodji Seketeli - 2.4-3 +- Fix sourceware.org/PR31017 + "Support Flex array conversion suppression" + Apply patch 0002-suppression-Add-has_strict_flexible_array_data_membe.patch + +* Tue Nov 14 2023 Dodji Seketeli - 2.4-2 +- Fix sourceware.org/PR31045 + "Don't try setting translation unit for unique types" + Apply patch + 0001-Bug-31045-Don-t-try-setting-translation-unit-for-uni.patch. + That patch is applied in upstream mainline and will be available in + libabigail 2.5. +- Use %%autosetup instead of the previous %%setup and %%patch macros. +- Add git as a build requirement + +* Fri Oct 20 2023 Dodji Seketeli - 2.4-1 +- Update to upstream 2.4 tarball +- Drop patches + 0001-Fix-fedabipkgdiff-configure-check-for-Python-3.12.patch and + 0001-Fix-fedabipkgdiff-configure-check-for-Python-3.12.patch +- Enable build with support for BTF +- Added BuildRequires: libbpf-devel +- Support soname bumped to libabigail.so.3.0.0 + +* Thu Oct 12 2023 Dodji Seketeli - 2.3-3 +- Use the SPDX format to express the license of the package +- Fix a compilation warning + * Thu Jul 20 2023 Fedora Release Engineering - 2.3-2 - Rebuilt for https://fedoraproject.org/wiki/Fedora_39_Mass_Rebuild diff --git a/plans/ci.fmf b/plans/ci.fmf index 1ad2c12..3fd3ab7 100644 --- a/plans/ci.fmf +++ b/plans/ci.fmf @@ -1,6 +1,5 @@ summary: CI Gating Plan discover: how: fmf - directory: tests execute: - how: beakerlib + how: tmt diff --git a/sources b/sources index f60b327..ee4135f 100644 --- a/sources +++ b/sources @@ -1 +1 @@ -SHA512 (libabigail-2.3.tar.xz) = fdf0df51e2c262c723c11bef58cd0b89b27e67be196edeb33444fc06e7e61d3c2c227f59cb961aea6fc0c9b7f6f04e08b787a1cbbeb3d5507b968b8ae7630527 +SHA512 (libabigail-2.9.tar.xz) = 5bdf5ec49a5931a61bf28317b41eee583d6277d00ac621b2d2a97bbc0d816c3662bcfe13a5ac7aeee11c947afb69a5a0a9a8015fcebad09965b45af9b1e23606 diff --git a/tests/libabigail-testsuite/Makefile b/tests/libabigail-testsuite/Makefile deleted file mode 100644 index 4d741d5..0000000 --- a/tests/libabigail-testsuite/Makefile +++ /dev/null @@ -1,63 +0,0 @@ -# ~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~ -# -# Makefile of /tools/libabigail/Sanity/libabigail-testsuite -# Description: libabigail testing by upstream testsuite -# Author: Michal Kolar -# -# ~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~ -# -# Copyright (c) 2021 Red Hat, Inc. -# -# This program is free software: you can redistribute it and/or -# modify it under the terms of the GNU General Public License as -# published by the Free Software Foundation, either version 2 of -# the License, or (at your option) any later version. -# -# This program is distributed in the hope that it will be -# useful, but WITHOUT ANY WARRANTY; without even the implied -# warranty of MERCHANTABILITY or FITNESS FOR A PARTICULAR -# PURPOSE. See the GNU General Public License for more details. -# -# You should have received a copy of the GNU General Public License -# along with this program. If not, see http://www.gnu.org/licenses/. -# -# ~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~ - -export TEST=/tools/libabigail/Sanity/libabigail-testsuite -export TESTVERSION=1.0 - -BUILT_FILES= - -FILES=$(METADATA) runtest.sh Makefile PURPOSE - -.PHONY: all install download clean - -run: $(FILES) build - ./runtest.sh - -build: $(BUILT_FILES) - test -x runtest.sh || chmod a+x runtest.sh - -clean: - rm -f *~ $(BUILT_FILES) - - -include /usr/share/rhts/lib/rhts-make.include - -$(METADATA): Makefile - @echo "Owner: Michal Kolar " > $(METADATA) - @echo "Name: $(TEST)" >> $(METADATA) - @echo "TestVersion: $(TESTVERSION)" >> $(METADATA) - @echo "Path: $(TEST_DIR)" >> $(METADATA) - @echo "Description: libabigail testing by upstream testsuite" >> $(METADATA) - @echo "Type: Sanity" >> $(METADATA) - @echo "TestTime: 1h" >> $(METADATA) - @echo "RunFor: libabigail" >> $(METADATA) - @echo "Requires: libabigail rpm-build yum-utils gcc-c++" >> $(METADATA) - @echo "Priority: Normal" >> $(METADATA) - @echo "License: GPLv2+" >> $(METADATA) - @echo "Confidential: no" >> $(METADATA) - @echo "Destructive: no" >> $(METADATA) - @echo "Releases: -RHEL4 -RHELClient5 -RHELServer5 -RHEL6 -RHEL7" >> $(METADATA) - - rhts-lint $(METADATA) diff --git a/tests/libabigail-testsuite/PURPOSE b/tests/libabigail-testsuite/PURPOSE deleted file mode 100644 index 52e213c..0000000 --- a/tests/libabigail-testsuite/PURPOSE +++ /dev/null @@ -1,3 +0,0 @@ -PURPOSE of /tools/libabigail/Sanity/libabigail-testsuite -Description: libabigail testing by upstream testsuite -Author: Michal Kolar diff --git a/tests/libabigail-testsuite/main.fmf b/tests/libabigail-testsuite/main.fmf index 23d68bb..a21b94e 100644 --- a/tests/libabigail-testsuite/main.fmf +++ b/tests/libabigail-testsuite/main.fmf @@ -1,15 +1,13 @@ summary: libabigail testing by upstream testsuite -description: '' -contact: Michal Kolar component: - libabigail -test: ./runtest.sh +test: ./test.sh +tier: 1 framework: beakerlib -recommend: +require+: - libabigail - rpm-build - yum-utils - gcc-c++ +- coreutils duration: 1h -extra-summary: /tools/libabigail/Sanity/libabigail-testsuite -extra-task: /tools/libabigail/Sanity/libabigail-testsuite diff --git a/tests/libabigail-testsuite/runtest.sh b/tests/libabigail-testsuite/runtest.sh deleted file mode 100755 index 4b69b8b..0000000 --- a/tests/libabigail-testsuite/runtest.sh +++ /dev/null @@ -1,83 +0,0 @@ -#!/bin/bash -# vim: dict+=/usr/share/beakerlib/dictionary.vim cpt=.,w,b,u,t,i,k -# ~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~ -# -# runtest.sh of /tools/libabigail/Sanity/libabigail-testsuite -# Description: libabigail testing by upstream testsuite -# Author: Michal Kolar -# -# ~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~ -# -# Copyright (c) 2021 Red Hat, Inc. -# -# This program is free software: you can redistribute it and/or -# modify it under the terms of the GNU General Public License as -# published by the Free Software Foundation, either version 2 of -# the License, or (at your option) any later version. -# -# This program is distributed in the hope that it will be -# useful, but WITHOUT ANY WARRANTY; without even the implied -# warranty of MERCHANTABILITY or FITNESS FOR A PARTICULAR -# PURPOSE. See the GNU General Public License for more details. -# -# You should have received a copy of the GNU General Public License -# along with this program. If not, see http://www.gnu.org/licenses/. -# -# ~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~ - -# Include Beaker environment -. /usr/share/beakerlib/beakerlib.sh || exit 1 - -BUILD_USER=${BUILD_USER:-lbbglbld} -TESTS_COUNT_MIN=${TESTS_COUNT_MIN:-10} -PACKAGE="libabigail" -REQUIRES="$PACKAGE rpm-build gcc-c++" -if rlIsFedora; then - REQUIRES="$REQUIRES dnf-utils" -else - REQUIRES="$REQUIRES yum-utils" -fi - -rlJournalStart - rlPhaseStartSetup - rlShowRunningKernel - rlAssertRpm --all - rlRun "TmpDir=`mktemp -d /home/libabigail.XXXXXXXXXX`" # work in /home due to high demands on disk space - rlRun "pushd $TmpDir" - rlFetchSrcForInstalled $PACKAGE - rlRun "useradd -m -N $BUILD_USER" 0,9 - [ "$?" == "0" ] && rlRun "del=yes" - rlRun "chown -R $BUILD_USER:users $TmpDir" - rlPhaseEnd - - rlPhaseStartSetup "build libabigail" - rlRun "rpm -D \"_topdir $TmpDir\" -U *.src.rpm" - rlRun "yum-builddep -y $TmpDir/SPECS/*.spec" - rlRun "su -c 'rpmbuild -D \"_topdir $TmpDir\" -bc $TmpDir/SPECS/*.spec &>$TmpDir/rpmbuild.log' $BUILD_USER" - rlRun "rlFileSubmit $TmpDir/rpmbuild.log" - rlRun "cd $TmpDir/BUILD/libabigail-*" - rlPhaseEnd - - rlPhaseStartTest "run testsuite" - rlRun "su -c 'make -k check |& tee -a $TmpDir/testsuite.log' $BUILD_USER" - rlRun "cp tests/test-suite.log $TmpDir/make-check.log" - rlRun "rlFileSubmit $TmpDir/make-check.log" - rlRun "su -c 'make -k check-self-compare |& tee -a $TmpDir/testsuite.log' $BUILD_USER" - rlRun "cp tests/test-suite.log $TmpDir/make-check-self-compare.log" - rlRun "rlFileSubmit $TmpDir/make-check-self-compare.log" - rlPhaseEnd - - rlPhaseStartTest "evaluate results" - rlRun "cd $TmpDir" - rlRun "cat make-*.log | grep -E '^# FAIL:|^# XPASS:|^# ERROR:' | grep -vqE ':\s*0$'" 1 - rlRun "tests_count=\$(grep -E '^PASS:' $TmpDir/testsuite.log | wc -l)" - [ "$tests_count" -ge "$TESTS_COUNT_MIN" ] && rlLogInfo "Test counter: $tests_count" || rlFail "Test counter $tests_count should be greater than or equal to $TESTS_COUNT_MIN" - rlPhaseEnd - - rlPhaseStartCleanup - rlRun "popd" - rlRun "rm -r $TmpDir" - [ "$del" == "yes" ] && rlRun "userdel -f -r $BUILD_USER" - rlPhaseEnd -rlJournalPrintText -rlJournalEnd diff --git a/tests/libabigail-testsuite/test.sh b/tests/libabigail-testsuite/test.sh new file mode 100755 index 0000000..c29f398 --- /dev/null +++ b/tests/libabigail-testsuite/test.sh @@ -0,0 +1,59 @@ +#!/bin/bash +. /usr/share/beakerlib/beakerlib.sh || exit 1 + +BUILD_USER=${BUILD_USER:-lbbglbld} +TESTS_COUNT_MIN=${TESTS_COUNT_MIN:-10} +PACKAGE="libabigail" +REQUIRES="$PACKAGE rpm-build gcc-c++" +if rlIsFedora; then + REQUIRES="$REQUIRES dnf-utils" +else + REQUIRES="$REQUIRES yum-utils" +fi + +# variables needed for 'make check' +export RPM_PACKAGE_NAME=$(rpm -q --qf='%{NAME}\n' $PACKAGE) +export RPM_PACKAGE_VERSION=$(rpm -q --qf='%{VERSION}\n' $PACKAGE) +export RPM_PACKAGE_RELEASE=$(rpm -q --qf='%{RELEASE}\n' $PACKAGE) +export RPM_ARCH=$(rpm -q --qf='%{ARCH}\n' $PACKAGE) + +rlJournalStart + rlPhaseStartSetup + rlShowRunningKernel + rlAssertRpm --all + rlRun "TmpDir=\$(mktemp -d /home/libabigail.XXXXXXXXXX)" # work in /home due to high demands on disk space + rlRun "pushd $TmpDir" + rlFetchSrcForInstalled $PACKAGE + rlRun "useradd -N $BUILD_USER" 0,9 + [ "$?" == "0" ] && rlRun "del=yes" + rlRun "chown -R $BUILD_USER:users $TmpDir" + rlPhaseEnd + + rlPhaseStartSetup "build libabigail" + rlRun "rpm -D \"_topdir $TmpDir\" -U *.src.rpm" + rlRun "yum-builddep -y $TmpDir/SPECS/*.spec &>$TmpDir/yum-builddep.log" + rlRun "rlFileSubmit $TmpDir/yum-builddep.log yum-builddep.log" + rlRun "su -c 'rpmbuild -D \"_topdir $TmpDir\" -bc $TmpDir/SPECS/*.spec &>$TmpDir/rpmbuild.log' $BUILD_USER" + rlRun "rlFileSubmit $TmpDir/rpmbuild.log rpmbuild.log" + rlRun "cd $(dirname `find $TmpDir -name configure -type f`)" + rlPhaseEnd + + rlPhaseStartTest "run testsuite" + rlRun "su -c 'make check |& tee $TmpDir/testsuite.log' $BUILD_USER" + rlRun "rlFileSubmit tests/test-suite.log test-suite.log" + rlRun "rlFileSubmit $TmpDir/testsuite.log testsuite.log" + rlPhaseEnd + + rlPhaseStartTest "evaluate results" + rlRun "grep -E '^# FAIL:|^# XPASS:|^# ERROR:' $TmpDir/testsuite.log | grep -vqE ':\s*0$'" 1 + rlRun "tests_count=\$(grep -E '^PASS:' $TmpDir/testsuite.log | wc -l)" + [ "$tests_count" -ge "$TESTS_COUNT_MIN" ] && rlLogInfo "Test counter: $tests_count" || rlFail "Test counter $tests_count should be greater than or equal to $TESTS_COUNT_MIN" + rlPhaseEnd + + rlPhaseStartCleanup + rlRun "popd" + rlRun "rm -r $TmpDir" + [ "$del" == "yes" ] && rlRun "userdel -f -r $BUILD_USER" + rlPhaseEnd +rlJournalPrintText +rlJournalEnd