Просмотр исходного кода

support/testing: add opus-tools runtime test

Signed-off-by: Julien Olivain <ju.o@free.fr>
Signed-off-by: Thomas Petazzoni <thomas.petazzoni@bootlin.com>
Julien Olivain 3 недель назад
Родитель
Сommit
7f1c2b9d69
2 измененных файлов с 19 добавлено и 0 удалено
  1. 1 0
      DEVELOPERS
  2. 18 0
      support/testing/tests/package/test_opus_tools.py

+ 1 - 0
DEVELOPERS

@@ -1985,6 +1985,7 @@ F:	support/testing/tests/package/test_oath_toolkit.py
 F:	support/testing/tests/package/test_octave.py
 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/

+ 18 - 0
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)