Explorar o código

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 hai 1 ano
pai
achega
fc4a727609
Modificáronse 2 ficheiros con 21 adicións e 0 borrados
  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_trace_cmd/
 F:	support/testing/tests/package/test_usbutils.py
 F:	support/testing/tests/package/test_usbutils.py
 F:	support/testing/tests/package/test_usbutils/
 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.py
 F:	support/testing/tests/package/test_weston/
 F:	support/testing/tests/package/test_weston/
 F:	support/testing/tests/package/test_wine.py
 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)