mirror of
https://gitlab.com/buildroot.org/buildroot.git
synced 2026-08-08 08:30:47 -09:00
support/testing: add flac runtime test
Signed-off-by: Julien Olivain <ju.o@free.fr> Signed-off-by: Thomas Petazzoni <thomas.petazzoni@bootlin.com>
This commit is contained in:
committed by
Thomas Petazzoni
parent
9e779d6e57
commit
8e76564b0e
@@ -1899,6 +1899,7 @@ F: support/testing/tests/package/test_exfatprogs.py
|
||||
F: support/testing/tests/package/test_exfatprogs/
|
||||
F: support/testing/tests/package/test_file.py
|
||||
F: support/testing/tests/package/test_file/
|
||||
F: support/testing/tests/package/test_flac.py
|
||||
F: support/testing/tests/package/test_fluidsynth.py
|
||||
F: support/testing/tests/package/test_fluidsynth/
|
||||
F: support/testing/tests/package/test_fping.py
|
||||
|
||||
20
support/testing/tests/package/test_flac.py
Normal file
20
support/testing/tests/package/test_flac.py
Normal file
@@ -0,0 +1,20 @@
|
||||
from tests.package.test_audio_codec_base import TestAudioCodecBase
|
||||
|
||||
|
||||
class TestFlac(TestAudioCodecBase):
|
||||
__test__ = True
|
||||
config = TestAudioCodecBase.config + \
|
||||
"""
|
||||
BR2_PACKAGE_FLAC=y
|
||||
"""
|
||||
encoded_file = "encoded.flac"
|
||||
|
||||
def encode_test(self, input_filename):
|
||||
cmd = "flac"
|
||||
cmd += f" -o {self.encoded_file} {input_filename}"
|
||||
self.assertRunOk(cmd)
|
||||
|
||||
def decode_test(self, output_filename):
|
||||
cmd = "flac -d"
|
||||
cmd += f" -o {output_filename} {self.encoded_file}"
|
||||
self.assertRunOk(cmd)
|
||||
Reference in New Issue
Block a user