浏览代码

support/testing: add vorbis-tools runtime test

Signed-off-by: Julien Olivain <ju.o@free.fr>
Signed-off-by: Thomas Petazzoni <thomas.petazzoni@bootlin.com>
Julien Olivain 1 年之前
父节点
当前提交
fc4a727609
共有 2 个文件被更改,包括 21 次插入0 次删除
  1. 1 0
      DEVELOPERS
  2. 20 0
      support/testing/tests/package/test_vorbis_tools.py

+ 1 - 0
DEVELOPERS

@@ -1976,6 +1976,7 @@ F:	support/testing/tests/package/test_trace_cmd.py
 F:	support/testing/tests/package/test_trace_cmd/
 F:	support/testing/tests/package/test_usbutils.py
 F:	support/testing/tests/package/test_usbutils/
+F:	support/testing/tests/package/test_vorbis_tools.py
 F:	support/testing/tests/package/test_weston.py
 F:	support/testing/tests/package/test_weston/
 F:	support/testing/tests/package/test_wine.py

+ 20 - 0
support/testing/tests/package/test_vorbis_tools.py

@@ -0,0 +1,20 @@
+from tests.package.test_audio_codec_base import TestAudioCodecBase
+
+
+class TestVorbisTools(TestAudioCodecBase):
+    __test__ = True
+    config = TestAudioCodecBase.config + \
+        """
+        BR2_PACKAGE_VORBIS_TOOLS=y
+        """
+    encoded_file = "encoded.ogg"
+
+    def encode_test(self, input_filename):
+        cmd = "oggenc"
+        cmd += f" -o {self.encoded_file} {input_filename}"
+        self.assertRunOk(cmd)
+
+    def decode_test(self, output_filename):
+        cmd = "oggdec"
+        cmd += f" -o {output_filename} {self.encoded_file}"
+        self.assertRunOk(cmd)