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/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} 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/rigsync.spec b/rigsync.spec index ff25bb7..547e848 100644 --- a/rigsync.spec +++ b/rigsync.spec @@ -6,12 +6,14 @@ Name: rigsync Version: 0~%{git_suffix} -Release: 1%{?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} Source0: %{url}/archive/%{git_commit}/%{name}-%{git_suffix}.tar.gz +ExcludeArch: i686 + BuildRequires: gcc BuildRequires: make BuildRequires: coreutils @@ -37,5 +39,26 @@ 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. + +* 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. + +* 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 + +* 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 diff --git a/tests/Sanity/sync-emulated-radios/main.fmf b/tests/Sanity/sync-emulated-radios/main.fmf new file mode 100644 index 0000000..4f90151 --- /dev/null +++ b/tests/Sanity/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/Sanity/sync-emulated-radios/test.sh b/tests/Sanity/sync-emulated-radios/test.sh new file mode 100755 index 0000000..ccb13b7 --- /dev/null +++ b/tests/Sanity/sync-emulated-radios/test.sh @@ -0,0 +1,47 @@ +#!/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" + +PORT1=8881 +PORT2=8882 + +rlJournalStart + rlPhaseStartSetup + rlAssertRpm $PACKAGE + rlRun "rigctld -m 1 -t $PORT1 &" 0 "Emulate radio 1" + rlRun "PID1=$!" + rlRun "rigctld -m 1 -t $PORT2 &" 0 "Emulate radio 2" + rlRun "PID2=$!" + rlPhaseEnd + + rlPhaseStartTest + sleep 1 + rlRun "rigsync -m 2 -r localhost:$PORT1 -m 2 -r localhost:$PORT2 &" 0 "Synchronize the radios" + rlRun "PIDSYNC=$!" + 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" + 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 + + rlPhaseStartCleanup + rlRun "kill $PID1 $PID2" 0 "Terminate both radios" + rlPhaseEnd +rlJournalPrintText +rlJournalEnd +