From 8f237a60709408ea45f4e709942612ac851891ab Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?Pavol=20=C5=BD=C3=A1=C4=8Dik?= Date: Mon, 23 Oct 2023 11:17:18 +0200 Subject: [PATCH 01/13] Add a test plan with a single test --- .fmf/version | 1 + plans/all.fmf | 5 ++++ tests/sync-emulated-radios/main.fmf | 5 ++++ tests/sync-emulated-radios/test.sh | 40 +++++++++++++++++++++++++++++ 4 files changed, 51 insertions(+) create mode 100644 .fmf/version create mode 100644 plans/all.fmf create mode 100644 tests/sync-emulated-radios/main.fmf create mode 100755 tests/sync-emulated-radios/test.sh diff --git a/.fmf/version b/.fmf/version new file mode 100644 index 0000000..d00491f --- /dev/null +++ b/.fmf/version @@ -0,0 +1 @@ +1 diff --git a/plans/all.fmf b/plans/all.fmf new file mode 100644 index 0000000..b686166 --- /dev/null +++ b/plans/all.fmf @@ -0,0 +1,5 @@ +summary: All tests +discover: + how: fmf +execute: + how: tmt diff --git a/tests/sync-emulated-radios/main.fmf b/tests/sync-emulated-radios/main.fmf new file mode 100644 index 0000000..4f90151 --- /dev/null +++ b/tests/sync-emulated-radios/main.fmf @@ -0,0 +1,5 @@ +summary: Verify that the synchronization of 2 emulated radios works as expected +contact: Pavol Žáčik +test: ./test.sh +framework: beakerlib +require: rigsync diff --git a/tests/sync-emulated-radios/test.sh b/tests/sync-emulated-radios/test.sh new file mode 100755 index 0000000..ccf605d --- /dev/null +++ b/tests/sync-emulated-radios/test.sh @@ -0,0 +1,40 @@ +#!/bin/bash +# vim: dict+=/usr/share/beakerlib/dictionary.vim cpt=.,w,b,u,t,i,k +. /usr/share/beakerlib/beakerlib.sh || exit 1 + +PACKAGE="rigsync" + +rlJournalStart + rlPhaseStartSetup + rlAssertRpm $PACKAGE + rlRun "rigctld -m 1 -t 8881 &" 0 "Emulate radio 1" + rlRun "PID1=$!" + rlRun "rigctld -m 1 -t 8882 &" 0 "Emulate radio 2" + rlRun "PID2=$!" + rlPhaseEnd + + rlPhaseStartTest + rlRun "sleep 1" + rlRun "rigsync -m 2 -r localhost:8881 -m 2 -r localhost:8882 &" 0 "Synchronize the radios" + rlRun "PIDSYNC=$!" + rlRun "sleep 1" + rlRun "rigctl -m 2 -r localhost:8882 F 146000000" 0 "Set frequency of radio 2 to 146Mhz" + rlRun "sleep 1" + rlRun "rigctl -m 2 -r localhost:8881 F 147000000" 0 "Set frequency of radio 1 to 147Mhz" + rlRun "sleep 1" + rlRun "FREQ=$(rigctl -m 2 -r localhost:8882 f)" + rlAssertEquals "Check that the frequency of radio 2 is 147Mhz" $FREQ "147000000" + rlRun "kill $PIDSYNC" 0 "Stop the synchronization" + rlRun "sleep 1" + rlRun "rigctl -m 2 -r localhost:8881 F 145000000" 0 "Set frequency of radio 1 to 145Mhz" + rlRun "sleep 1" + rlRun "FREQ=$(rigctl -m 2 -r localhost:8882 f)" + rlAssertEquals "Check that the frequency of radio 2 stays at 147Mhz" $FREQ "147000000" + rlPhaseEnd + + rlPhaseStartCleanup + rlRun "kill $PID1 $PID2" 0 "Terminate both radios" + rlPhaseEnd +rlJournalPrintText +rlJournalEnd + From cc2dcd1643234d589178f36368618aaf01c6cc5b Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?Pavol=20=C5=BD=C3=A1=C4=8Dik?= Date: Mon, 23 Oct 2023 11:23:49 +0200 Subject: [PATCH 02/13] Enable gating --- gating.yaml | 14 ++++++++++++++ 1 file changed, 14 insertions(+) create mode 100644 gating.yaml diff --git a/gating.yaml b/gating.yaml new file mode 100644 index 0000000..bb1d8ee --- /dev/null +++ b/gating.yaml @@ -0,0 +1,14 @@ +--- !Policy +product_versions: + - fedora-* +decision_contexts: [bodhi_update_push_testing] +subject_type: koji_build +rules: + - !PassingTestCaseRule {test_case_name: fedora-ci.koji-build.tier0.functional} +--- !Policy +product_versions: + - fedora-* +decision_contexts: [bodhi_update_push_stable] +subject_type: koji_build +rules: + - !PassingTestCaseRule {test_case_name: fedora-ci.koji-build.tier0.functional} From 39f8f8d532b2a1ba43d49d941f110bbe5f5a7346 Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?Pavol=20=C5=BD=C3=A1=C4=8Dik?= Date: Wed, 25 Oct 2023 09:34:30 +0200 Subject: [PATCH 03/13] Move the test into a Sanity directory --- tests/{ => Sanity}/sync-emulated-radios/main.fmf | 0 tests/{ => Sanity}/sync-emulated-radios/test.sh | 0 2 files changed, 0 insertions(+), 0 deletions(-) rename tests/{ => Sanity}/sync-emulated-radios/main.fmf (100%) rename tests/{ => Sanity}/sync-emulated-radios/test.sh (100%) diff --git a/tests/sync-emulated-radios/main.fmf b/tests/Sanity/sync-emulated-radios/main.fmf similarity index 100% rename from tests/sync-emulated-radios/main.fmf rename to tests/Sanity/sync-emulated-radios/main.fmf diff --git a/tests/sync-emulated-radios/test.sh b/tests/Sanity/sync-emulated-radios/test.sh similarity index 100% rename from tests/sync-emulated-radios/test.sh rename to tests/Sanity/sync-emulated-radios/test.sh From 17db725eadd6a9486a7dfaef3a59c4e5f16a8cf2 Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?Pavol=20=C5=BD=C3=A1=C4=8Dik?= Date: Wed, 25 Oct 2023 09:40:22 +0200 Subject: [PATCH 04/13] Refactor the test --- tests/Sanity/sync-emulated-radios/test.sh | 31 +++++++++++++---------- 1 file changed, 17 insertions(+), 14 deletions(-) diff --git a/tests/Sanity/sync-emulated-radios/test.sh b/tests/Sanity/sync-emulated-radios/test.sh index ccf605d..33c7ed8 100755 --- a/tests/Sanity/sync-emulated-radios/test.sh +++ b/tests/Sanity/sync-emulated-radios/test.sh @@ -4,31 +4,34 @@ PACKAGE="rigsync" +PORT1=8881 +PORT2=8882 + rlJournalStart rlPhaseStartSetup rlAssertRpm $PACKAGE - rlRun "rigctld -m 1 -t 8881 &" 0 "Emulate radio 1" + rlRun "rigctld -m 1 -t $PORT1 &" 0 "Emulate radio 1" rlRun "PID1=$!" - rlRun "rigctld -m 1 -t 8882 &" 0 "Emulate radio 2" + rlRun "rigctld -m 1 -t $PORT2 &" 0 "Emulate radio 2" rlRun "PID2=$!" rlPhaseEnd rlPhaseStartTest - rlRun "sleep 1" - rlRun "rigsync -m 2 -r localhost:8881 -m 2 -r localhost:8882 &" 0 "Synchronize the radios" + sleep 1 + rlRun "rigsync -m 2 -r localhost:$PORT1 -m 2 -r localhost:$PORT2 &" 0 "Synchronize the radios" rlRun "PIDSYNC=$!" - rlRun "sleep 1" - rlRun "rigctl -m 2 -r localhost:8882 F 146000000" 0 "Set frequency of radio 2 to 146Mhz" - rlRun "sleep 1" - rlRun "rigctl -m 2 -r localhost:8881 F 147000000" 0 "Set frequency of radio 1 to 147Mhz" - rlRun "sleep 1" - rlRun "FREQ=$(rigctl -m 2 -r localhost:8882 f)" + sleep 1 + rlRun "rigctl -m 2 -r localhost:$PORT2 F 146000000" 0 "Set frequency of radio 2 to 146Mhz" + sleep 1 + rlRun "rigctl -m 2 -r localhost:$PORT1 F 147000000" 0 "Set frequency of radio 1 to 147Mhz" + sleep 1 + rlRun "FREQ=$(rigctl -m 2 -r localhost:$PORT2 f)" rlAssertEquals "Check that the frequency of radio 2 is 147Mhz" $FREQ "147000000" rlRun "kill $PIDSYNC" 0 "Stop the synchronization" - rlRun "sleep 1" - rlRun "rigctl -m 2 -r localhost:8881 F 145000000" 0 "Set frequency of radio 1 to 145Mhz" - rlRun "sleep 1" - rlRun "FREQ=$(rigctl -m 2 -r localhost:8882 f)" + sleep 1 + rlRun "rigctl -m 2 -r localhost:$PORT1 F 145000000" 0 "Set frequency of radio 1 to 145Mhz" + sleep 1 + rlRun "FREQ=$(rigctl -m 2 -r localhost:$PORT2 f)" rlAssertEquals "Check that the frequency of radio 2 stays at 147Mhz" $FREQ "147000000" rlPhaseEnd From 175f2efbdeba137399969e6e212d4ed72b1fd5d0 Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?Pavol=20=C5=BD=C3=A1=C4=8Dik?= Date: Wed, 25 Oct 2023 09:58:31 +0200 Subject: [PATCH 05/13] Include a license identifier in the test --- tests/Sanity/sync-emulated-radios/test.sh | 4 ++++ 1 file changed, 4 insertions(+) diff --git a/tests/Sanity/sync-emulated-radios/test.sh b/tests/Sanity/sync-emulated-radios/test.sh index 33c7ed8..ccb13b7 100755 --- a/tests/Sanity/sync-emulated-radios/test.sh +++ b/tests/Sanity/sync-emulated-radios/test.sh @@ -1,5 +1,9 @@ #!/bin/bash # vim: dict+=/usr/share/beakerlib/dictionary.vim cpt=.,w,b,u,t,i,k +# ~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~ +# Copyright (c) 2023 Red Hat +# SPDX-License-Identifier: LGPL-2.1-or-later +# ~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~ . /usr/share/beakerlib/beakerlib.sh || exit 1 PACKAGE="rigsync" From 1d28cea60dc46ed153d948ad0451696bff343250 Mon Sep 17 00:00:00 2001 From: Fedora Release Engineering Date: Mon, 22 Jan 2024 11:35:09 +0000 Subject: [PATCH 06/13] Rebuilt for https://fedoraproject.org/wiki/Fedora_40_Mass_Rebuild --- rigsync.spec | 5 ++++- 1 file changed, 4 insertions(+), 1 deletion(-) diff --git a/rigsync.spec b/rigsync.spec index ff25bb7..ee4420f 100644 --- a/rigsync.spec +++ b/rigsync.spec @@ -6,7 +6,7 @@ Name: rigsync Version: 0~%{git_suffix} -Release: 1%{?dist} +Release: 2%{?dist} Summary: Rigsync keeps multiple rigs frequency and mode in sync using Hamlib License: LGPL-2.1-only URL: https://github.com/daveriesz/%{name} @@ -37,5 +37,8 @@ install -Dp %{name} %{buildroot}%{_bindir}/%{name} %{_bindir}/rigsync %changelog +* Mon Jan 22 2024 Fedora Release Engineering - 0~20230612gitb320c4d9-2 +- Rebuilt for https://fedoraproject.org/wiki/Fedora_40_Mass_Rebuild + * Mon Oct 2 2023 Jaroslav Škarvada - 0-20230612gitb320c4d9-1 - Initial version From 8461b23340dcaaaaea12a5ac3e3f39c0b9318721 Mon Sep 17 00:00:00 2001 From: Fedora Release Engineering Date: Fri, 26 Jan 2024 15:24:22 +0000 Subject: [PATCH 07/13] Rebuilt for https://fedoraproject.org/wiki/Fedora_40_Mass_Rebuild --- rigsync.spec | 5 ++++- 1 file changed, 4 insertions(+), 1 deletion(-) diff --git a/rigsync.spec b/rigsync.spec index ee4420f..8af4a7b 100644 --- a/rigsync.spec +++ b/rigsync.spec @@ -6,7 +6,7 @@ Name: rigsync Version: 0~%{git_suffix} -Release: 2%{?dist} +Release: 3%{?dist} Summary: Rigsync keeps multiple rigs frequency and mode in sync using Hamlib License: LGPL-2.1-only URL: https://github.com/daveriesz/%{name} @@ -37,6 +37,9 @@ install -Dp %{name} %{buildroot}%{_bindir}/%{name} %{_bindir}/rigsync %changelog +* Fri Jan 26 2024 Fedora Release Engineering - 0~20230612gitb320c4d9-3 +- Rebuilt for https://fedoraproject.org/wiki/Fedora_40_Mass_Rebuild + * Mon Jan 22 2024 Fedora Release Engineering - 0~20230612gitb320c4d9-2 - Rebuilt for https://fedoraproject.org/wiki/Fedora_40_Mass_Rebuild From b300a9a11247ca0fdce9be87f5941466b04d1858 Mon Sep 17 00:00:00 2001 From: Fedora Release Engineering Date: Fri, 19 Jul 2024 18:35:46 +0000 Subject: [PATCH 08/13] Rebuilt for https://fedoraproject.org/wiki/Fedora_41_Mass_Rebuild --- rigsync.spec | 5 ++++- 1 file changed, 4 insertions(+), 1 deletion(-) diff --git a/rigsync.spec b/rigsync.spec index 8af4a7b..bb236a2 100644 --- a/rigsync.spec +++ b/rigsync.spec @@ -6,7 +6,7 @@ Name: rigsync Version: 0~%{git_suffix} -Release: 3%{?dist} +Release: 4%{?dist} Summary: Rigsync keeps multiple rigs frequency and mode in sync using Hamlib License: LGPL-2.1-only URL: https://github.com/daveriesz/%{name} @@ -37,6 +37,9 @@ install -Dp %{name} %{buildroot}%{_bindir}/%{name} %{_bindir}/rigsync %changelog +* Fri Jul 19 2024 Fedora Release Engineering - 0~20230612gitb320c4d9-4 +- Rebuilt for https://fedoraproject.org/wiki/Fedora_41_Mass_Rebuild + * Fri Jan 26 2024 Fedora Release Engineering - 0~20230612gitb320c4d9-3 - Rebuilt for https://fedoraproject.org/wiki/Fedora_40_Mass_Rebuild From 9ea8818a9b99804abd0e5bf5547a016f8d72a32d Mon Sep 17 00:00:00 2001 From: Richard Shaw Date: Tue, 31 Dec 2024 10:26:07 -0600 Subject: [PATCH 09/13] Rebuild for Hamlib 4.6. --- rigsync.spec | 5 ++++- 1 file changed, 4 insertions(+), 1 deletion(-) diff --git a/rigsync.spec b/rigsync.spec index bb236a2..493c0f9 100644 --- a/rigsync.spec +++ b/rigsync.spec @@ -6,7 +6,7 @@ Name: rigsync Version: 0~%{git_suffix} -Release: 4%{?dist} +Release: 5%{?dist} Summary: Rigsync keeps multiple rigs frequency and mode in sync using Hamlib License: LGPL-2.1-only URL: https://github.com/daveriesz/%{name} @@ -37,6 +37,9 @@ install -Dp %{name} %{buildroot}%{_bindir}/%{name} %{_bindir}/rigsync %changelog +* Tue Dec 31 2024 Richard Shaw - 0~20230612gitb320c4d9-5 +- Rebuild for Hamlib 4.6. + * Fri Jul 19 2024 Fedora Release Engineering - 0~20230612gitb320c4d9-4 - Rebuilt for https://fedoraproject.org/wiki/Fedora_41_Mass_Rebuild From 4158799e8661f6940de3e60ac5e19d7d6d6a2ef3 Mon Sep 17 00:00:00 2001 From: Richard Shaw Date: Tue, 31 Dec 2024 10:44:37 -0600 Subject: [PATCH 10/13] Hamlib no longer builds for i686. --- rigsync.spec | 2 ++ 1 file changed, 2 insertions(+) diff --git a/rigsync.spec b/rigsync.spec index 493c0f9..9f8a19c 100644 --- a/rigsync.spec +++ b/rigsync.spec @@ -12,6 +12,8 @@ License: LGPL-2.1-only URL: https://github.com/daveriesz/%{name} Source0: %{url}/archive/%{git_commit}/%{name}-%{git_suffix}.tar.gz +ExcludeArch: i686 + BuildRequires: gcc BuildRequires: make BuildRequires: coreutils From e25ea3412214cb6af2a06709c8ad96aba334230c Mon Sep 17 00:00:00 2001 From: Fedora Release Engineering Date: Sat, 18 Jan 2025 22:28:11 +0000 Subject: [PATCH 11/13] Rebuilt for https://fedoraproject.org/wiki/Fedora_42_Mass_Rebuild --- rigsync.spec | 5 ++++- 1 file changed, 4 insertions(+), 1 deletion(-) diff --git a/rigsync.spec b/rigsync.spec index 9f8a19c..9ab54b6 100644 --- a/rigsync.spec +++ b/rigsync.spec @@ -6,7 +6,7 @@ Name: rigsync Version: 0~%{git_suffix} -Release: 5%{?dist} +Release: 6%{?dist} Summary: Rigsync keeps multiple rigs frequency and mode in sync using Hamlib License: LGPL-2.1-only URL: https://github.com/daveriesz/%{name} @@ -39,6 +39,9 @@ install -Dp %{name} %{buildroot}%{_bindir}/%{name} %{_bindir}/rigsync %changelog +* Sat Jan 18 2025 Fedora Release Engineering - 0~20230612gitb320c4d9-6 +- Rebuilt for https://fedoraproject.org/wiki/Fedora_42_Mass_Rebuild + * Tue Dec 31 2024 Richard Shaw - 0~20230612gitb320c4d9-5 - Rebuild for Hamlib 4.6. From 671ea064e1fb3aad6fbeb73f27a8988f7401e4c9 Mon Sep 17 00:00:00 2001 From: Richard Shaw Date: Wed, 5 Feb 2025 20:54:27 -0600 Subject: [PATCH 12/13] Rebuild for hamlib 4.6. --- rigsync.spec | 5 ++++- 1 file changed, 4 insertions(+), 1 deletion(-) diff --git a/rigsync.spec b/rigsync.spec index 9ab54b6..9989405 100644 --- a/rigsync.spec +++ b/rigsync.spec @@ -6,7 +6,7 @@ Name: rigsync Version: 0~%{git_suffix} -Release: 6%{?dist} +Release: 7%{?dist} Summary: Rigsync keeps multiple rigs frequency and mode in sync using Hamlib License: LGPL-2.1-only URL: https://github.com/daveriesz/%{name} @@ -39,6 +39,9 @@ install -Dp %{name} %{buildroot}%{_bindir}/%{name} %{_bindir}/rigsync %changelog +* Thu Feb 06 2025 Richard Shaw - 0~20230612gitb320c4d9-7 +- Rebuild for hamlib 4.6. + * Sat Jan 18 2025 Fedora Release Engineering - 0~20230612gitb320c4d9-6 - Rebuilt for https://fedoraproject.org/wiki/Fedora_42_Mass_Rebuild From c3a829cbdf7fdf355816ff1d823af60acd9f1495 Mon Sep 17 00:00:00 2001 From: Fedora Release Engineering Date: Fri, 25 Jul 2025 11:58:18 +0000 Subject: [PATCH 13/13] Rebuilt for https://fedoraproject.org/wiki/Fedora_43_Mass_Rebuild --- rigsync.spec | 5 ++++- 1 file changed, 4 insertions(+), 1 deletion(-) diff --git a/rigsync.spec b/rigsync.spec index 9989405..547e848 100644 --- a/rigsync.spec +++ b/rigsync.spec @@ -6,7 +6,7 @@ Name: rigsync Version: 0~%{git_suffix} -Release: 7%{?dist} +Release: 8%{?dist} Summary: Rigsync keeps multiple rigs frequency and mode in sync using Hamlib License: LGPL-2.1-only URL: https://github.com/daveriesz/%{name} @@ -39,6 +39,9 @@ install -Dp %{name} %{buildroot}%{_bindir}/%{name} %{_bindir}/rigsync %changelog +* Fri Jul 25 2025 Fedora Release Engineering - 0~20230612gitb320c4d9-8 +- Rebuilt for https://fedoraproject.org/wiki/Fedora_43_Mass_Rebuild + * Thu Feb 06 2025 Richard Shaw - 0~20230612gitb320c4d9-7 - Rebuild for hamlib 4.6.