From 4266f011a57a62e88bb6fb6a6c14cbfc74188c66 Mon Sep 17 00:00:00 2001 From: Fedora Release Engineering Date: Wed, 19 Jul 2023 16:30:34 +0000 Subject: [PATCH 01/10] Rebuilt for https://fedoraproject.org/wiki/Fedora_39_Mass_Rebuild Signed-off-by: Fedora Release Engineering From beaea53af79581ab031e258ae73dd5637c861932 Mon Sep 17 00:00:00 2001 From: Mattia Verga Date: Thu, 24 Aug 2023 08:51:48 +0200 Subject: [PATCH 02/10] Backport patch to run tests in deterministic order --- cppunit.spec | 4 +++ run-tests-in-deterministic-order.patch | 43 ++++++++++++++++++++++++++ 2 files changed, 47 insertions(+) create mode 100644 run-tests-in-deterministic-order.patch diff --git a/cppunit.spec b/cppunit.spec index 88c5f4a..4a994fe 100644 --- a/cppunit.spec +++ b/cppunit.spec @@ -10,6 +10,10 @@ License: LGPL-2.1-or-later Url: https://www.freedesktop.org/wiki/Software/cppunit/ Source: http://dev-www.libreoffice.org/src/%{name}-%{version}.tar.gz +# Backport patch to run tests in deterministic order +# https://gerrit.libreoffice.org/c/cppunit/+/123963 +Patch: run-tests-in-deterministic-order.patch + BuildRequires: doxygen BuildRequires: gcc-c++ BuildRequires: graphviz diff --git a/run-tests-in-deterministic-order.patch b/run-tests-in-deterministic-order.patch new file mode 100644 index 0000000..2942e42 --- /dev/null +++ b/run-tests-in-deterministic-order.patch @@ -0,0 +1,43 @@ +From 64eaa35c2de99581e522608e841defffb4b2923b Mon Sep 17 00:00:00 2001 +From: Stephan Bergmann +Date: Thu, 21 Oct 2021 11:14:34 +0200 +Subject: [PATCH] Run tests in deterministic order + +LibreOffice already benefits from this (see + +"external/cppunit: Run tests in deterministic order", especially as otherwise +the order in which tests happened to get run differed between --disable-lto and +--enable-lto builds. + +Change-Id: I87d6d7cb0f4c2f6a0ea1ac3ba3d48b4e089eb5c7 +Reviewed-on: https://gerrit.libreoffice.org/c/cppunit/+/123963 +Tested-by: Stephan Bergmann +Reviewed-by: Stephan Bergmann +--- + +diff --git a/src/cppunit/TestFactoryRegistry.cpp b/src/cppunit/TestFactoryRegistry.cpp +index 35448a6..3b68d58 100644 +--- a/src/cppunit/TestFactoryRegistry.cpp ++++ b/src/cppunit/TestFactoryRegistry.cpp +@@ -143,12 +143,20 @@ + void + TestFactoryRegistry::addTestToSuite( TestSuite *suite ) + { ++ std::multimap sorted; + for ( Factories::iterator it = m_factories.begin(); + it != m_factories.end(); + ++it ) + { + TestFactory *factory = *it; +- suite->addTest( factory->makeTest() ); ++ Test *test = factory->makeTest(); ++ sorted.insert({test->getName(), test}); ++ } ++ // In the unlikely case of multiple Tests with identical names, those will ++ // still be added in random order: ++ for (auto const &i: sorted) ++ { ++ suite->addTest( i.second ); + } + } + From 80c2931f5caa403972c1a99b3b3f0adb67983c77 Mon Sep 17 00:00:00 2001 From: Fedora Release Engineering Date: Fri, 19 Jan 2024 16:17:28 +0000 Subject: [PATCH 03/10] Rebuilt for https://fedoraproject.org/wiki/Fedora_40_Mass_Rebuild From 55a0dd2157b1db8986b4d422cbe9200e16db78d5 Mon Sep 17 00:00:00 2001 From: Fedora Release Engineering Date: Wed, 24 Jan 2024 08:17:23 +0000 Subject: [PATCH 04/10] Rebuilt for https://fedoraproject.org/wiki/Fedora_40_Mass_Rebuild From 902beef5607257cd1e3db100f75b7b8d6ca0d9e0 Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?Petr=20P=C3=ADsa=C5=99?= Date: Tue, 30 Apr 2024 14:25:28 +0200 Subject: [PATCH 05/10] tests: Fix TMT dependencies Those are hard dependencies and they were incomplete. --- tests/Sanity/basic-test/main.fmf | 5 +++-- 1 file changed, 3 insertions(+), 2 deletions(-) diff --git a/tests/Sanity/basic-test/main.fmf b/tests/Sanity/basic-test/main.fmf index 0c92a73..ed785d1 100644 --- a/tests/Sanity/basic-test/main.fmf +++ b/tests/Sanity/basic-test/main.fmf @@ -5,9 +5,10 @@ component: - cppunit test: ./runtest.sh framework: beakerlib -recommend: +require: + - bash + - coreutils - gcc-c++ - - cppunit - cppunit-devel duration: 1h extra-summary: /tools/cppunit/Sanity/basic-test From 989836a857e9efaf0e7ee59118852eca99556849 Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?Petr=20P=C3=ADsa=C5=99?= Date: Tue, 30 Apr 2024 14:34:21 +0200 Subject: [PATCH 06/10] Refer to sources with HTTPS --- cppunit.spec | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/cppunit.spec b/cppunit.spec index 4a994fe..e45bbca 100644 --- a/cppunit.spec +++ b/cppunit.spec @@ -8,7 +8,7 @@ Summary: C++ unit testing framework # no license in files License: LGPL-2.1-or-later Url: https://www.freedesktop.org/wiki/Software/cppunit/ -Source: http://dev-www.libreoffice.org/src/%{name}-%{version}.tar.gz +Source: https://dev-www.libreoffice.org/src/%{name}-%{version}.tar.gz # Backport patch to run tests in deterministic order # https://gerrit.libreoffice.org/c/cppunit/+/123963 From ddce20592fcf29465716c15275e1873874759d83 Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?Petr=20P=C3=ADsa=C5=99?= Date: Fri, 3 May 2024 14:16:43 +0200 Subject: [PATCH 07/10] tests: Remove unused remnants of Beaker The Makefile and PURPOSE files are remnants of a RHEL Beaker test system which was converted into TMT test system as a main.fmf file. The two files are not used anymore and can be removed. --- tests/Sanity/basic-test/Makefile | 63 -------------------------------- tests/Sanity/basic-test/PURPOSE | 3 -- 2 files changed, 66 deletions(-) delete mode 100644 tests/Sanity/basic-test/Makefile delete mode 100644 tests/Sanity/basic-test/PURPOSE diff --git a/tests/Sanity/basic-test/Makefile b/tests/Sanity/basic-test/Makefile deleted file mode 100644 index 7575c1a..0000000 --- a/tests/Sanity/basic-test/Makefile +++ /dev/null @@ -1,63 +0,0 @@ -# ~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~ -# -# Makefile of /tools/cppunit/Sanity/basic-test -# Description: cppunit basic test -# Author: Edjunior Machado -# -# ~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~ -# -# 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/cppunit/Sanity/basic-test -export TESTVERSION=1.0 - -BUILT_FILES= - -FILES=$(METADATA) runtest.sh Makefile PURPOSE hello.cpp - -.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: Edjunior Machado " > $(METADATA) - @echo "Name: $(TEST)" >> $(METADATA) - @echo "TestVersion: $(TESTVERSION)" >> $(METADATA) - @echo "Path: $(TEST_DIR)" >> $(METADATA) - @echo "Description: cppunit basic test" >> $(METADATA) - @echo "Type: Sanity" >> $(METADATA) - @echo "TestTime: 1h" >> $(METADATA) - @echo "RunFor: cppunit" >> $(METADATA) - @echo "Requires: gcc-c++ cppunit cppunit-devel" >> $(METADATA) - @echo "Priority: Normal" >> $(METADATA) - @echo "License: GPLv2+" >> $(METADATA) - @echo "Confidential: no" >> $(METADATA) - @echo "Destructive: no" >> $(METADATA) - @echo "Releases: -RHEL4 -RHELClient5 -RHELServer5" >> $(METADATA) - - rhts-lint $(METADATA) diff --git a/tests/Sanity/basic-test/PURPOSE b/tests/Sanity/basic-test/PURPOSE deleted file mode 100644 index 82f79dd..0000000 --- a/tests/Sanity/basic-test/PURPOSE +++ /dev/null @@ -1,3 +0,0 @@ -PURPOSE of /tools/cppunit/Sanity/basic-test -Description: cppunit basic test -Author: Edjunior Machado From 514c60ea82052dfc2f2241d22d773a6178896a9e Mon Sep 17 00:00:00 2001 From: Fedora Release Engineering Date: Wed, 17 Jul 2024 20:07:03 +0000 Subject: [PATCH 08/10] Rebuilt for https://fedoraproject.org/wiki/Fedora_41_Mass_Rebuild From 361280b7ca4ebc99c2c3437e858de5f779ee8454 Mon Sep 17 00:00:00 2001 From: Fedora Release Engineering Date: Thu, 16 Jan 2025 14:44:21 +0000 Subject: [PATCH 09/10] Rebuilt for https://fedoraproject.org/wiki/Fedora_42_Mass_Rebuild From 87f035d1fa3a022b13e3bc412c95ff4e2cc91dc8 Mon Sep 17 00:00:00 2001 From: Fedora Release Engineering Date: Wed, 23 Jul 2025 18:45:58 +0000 Subject: [PATCH 10/10] Rebuilt for https://fedoraproject.org/wiki/Fedora_43_Mass_Rebuild