From 307ee23607f889961cb105fb4bae4236f2a6da07 Mon Sep 17 00:00:00 2001 From: Julien Olivain Date: Thu, 18 Dec 2025 22:46:35 +0100 Subject: [PATCH] support/testing: add opus-tools runtime test Signed-off-by: Julien Olivain Signed-off-by: Thomas Petazzoni (cherry picked from commit 7f1c2b9d693b2d54151d6b72ea55d7f55a8fdaa7) Signed-off-by: Thomas Perale --- DEVELOPERS | 1 + .../testing/tests/package/test_opus_tools.py | 18 ++++++++++++++++++ 2 files changed, 19 insertions(+) create mode 100644 support/testing/tests/package/test_opus_tools.py diff --git a/DEVELOPERS b/DEVELOPERS index aff9f6668b..1adf9c93dd 100644 --- a/DEVELOPERS +++ b/DEVELOPERS @@ -1947,6 +1947,7 @@ F: support/testing/tests/package/test_ola.py F: support/testing/tests/package/test_ola/ F: support/testing/tests/package/test_openblas.py F: support/testing/tests/package/test_openocd.py +F: support/testing/tests/package/test_opus_tools.py F: support/testing/tests/package/test_parted.py F: support/testing/tests/package/test_patch.py F: support/testing/tests/package/test_patch/ diff --git a/support/testing/tests/package/test_opus_tools.py b/support/testing/tests/package/test_opus_tools.py new file mode 100644 index 0000000000..89b76fb954 --- /dev/null +++ b/support/testing/tests/package/test_opus_tools.py @@ -0,0 +1,18 @@ +from tests.package.test_audio_codec_base import TestAudioCodecBase + + +class TestOpusTools(TestAudioCodecBase): + __test__ = True + config = TestAudioCodecBase.config + \ + """ + BR2_PACKAGE_OPUS_TOOLS=y + """ + encoded_file = "encoded.opus" + + def encode_test(self, input_filename): + cmd = f"opusenc {input_filename} {self.encoded_file}" + self.assertRunOk(cmd) + + def decode_test(self, output_filename): + cmd = f"opusdec {self.encoded_file} {output_filename}" + self.assertRunOk(cmd)