From patchwork Thu Aug 8 21:06:03 2024 Content-Type: text/plain; charset="utf-8" MIME-Version: 1.0 Content-Transfer-Encoding: 7bit X-Patchwork-Submitter: Julien Olivain X-Patchwork-Id: 1970711 Return-Path: X-Original-To: incoming-buildroot@patchwork.ozlabs.org Delivered-To: patchwork-incoming-buildroot@legolas.ozlabs.org Authentication-Results: legolas.ozlabs.org; spf=pass (sender SPF authorized) smtp.mailfrom=buildroot.org (client-ip=2605:bc80:3010::138; helo=smtp1.osuosl.org; envelope-from=buildroot-bounces@buildroot.org; receiver=patchwork.ozlabs.org) Received: from smtp1.osuosl.org (smtp1.osuosl.org [IPv6:2605:bc80:3010::138]) (using TLSv1.3 with cipher TLS_AES_256_GCM_SHA384 (256/256 bits) key-exchange X25519 server-signature ECDSA (secp384r1) server-digest SHA384) (No client certificate requested) by legolas.ozlabs.org (Postfix) with ESMTPS id 4Wg02l0mt5z1yYl for ; Fri, 9 Aug 2024 07:06:23 +1000 (AEST) Received: from localhost (localhost [127.0.0.1]) by smtp1.osuosl.org (Postfix) with ESMTP id 5620781E5E; Thu, 8 Aug 2024 21:06:21 +0000 (UTC) X-Virus-Scanned: amavis at osuosl.org Received: from smtp1.osuosl.org ([127.0.0.1]) by localhost (smtp1.osuosl.org [127.0.0.1]) (amavis, port 10024) with ESMTP id X8UQg2wQe6hJ; Thu, 8 Aug 2024 21:06:20 +0000 (UTC) X-Comment: SPF check N/A for local connections - client-ip=140.211.166.34; helo=ash.osuosl.org; envelope-from=buildroot-bounces@buildroot.org; receiver= DKIM-Filter: OpenDKIM Filter v2.11.0 smtp1.osuosl.org 5866781E65 Received: from ash.osuosl.org (ash.osuosl.org [140.211.166.34]) by smtp1.osuosl.org (Postfix) with ESMTP id 5866781E65; Thu, 8 Aug 2024 21:06:20 +0000 (UTC) X-Original-To: buildroot@lists.busybox.net Delivered-To: buildroot@osuosl.org Received: from smtp2.osuosl.org (smtp2.osuosl.org [140.211.166.133]) by ash.osuosl.org (Postfix) with ESMTP id 3351D1BF380 for ; Thu, 8 Aug 2024 21:06:18 +0000 (UTC) Received: from localhost (localhost [127.0.0.1]) by smtp2.osuosl.org (Postfix) with ESMTP id 20A1C40BFE for ; Thu, 8 Aug 2024 21:06:18 +0000 (UTC) X-Virus-Scanned: amavis at osuosl.org Received: from smtp2.osuosl.org ([127.0.0.1]) by localhost (smtp2.osuosl.org [127.0.0.1]) (amavis, port 10024) with ESMTP id AD6vBnhhp0HA for ; Thu, 8 Aug 2024 21:06:17 +0000 (UTC) Received-SPF: Pass (mailfrom) identity=mailfrom; client-ip=212.27.42.1; helo=smtp1-g21.free.fr; envelope-from=ju.o@free.fr; receiver= DMARC-Filter: OpenDMARC Filter v1.4.2 smtp2.osuosl.org E8A9340226 DKIM-Filter: OpenDKIM Filter v2.11.0 smtp2.osuosl.org E8A9340226 Received: from smtp1-g21.free.fr (smtp1-g21.free.fr [212.27.42.1]) by smtp2.osuosl.org (Postfix) with ESMTPS id E8A9340226 for ; Thu, 8 Aug 2024 21:06:16 +0000 (UTC) Received: from home.juju.sh (unknown [IPv6:2a01:e0a:485:b220:8213:2270:4a8d:a1d5]) (Authenticated sender: ju.o@free.fr) by smtp1-g21.free.fr (Postfix) with ESMTPSA id BF3ABB0053E; Thu, 8 Aug 2024 23:06:13 +0200 (CEST) From: Julien Olivain To: buildroot@buildroot.org Date: Thu, 8 Aug 2024 23:06:03 +0200 Message-ID: <20240808210603.185284-1-ju.o@free.fr> X-Mailer: git-send-email 2.46.0 MIME-Version: 1.0 X-Mailman-Original-DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/simple; d=free.fr; s=smtp-20201208; t=1723151175; bh=VTuUUkbF3/m6w97xlfT8pD+gHbd0p5D+33cJWkVoOSU=; h=From:To:Cc:Subject:Date:From; b=DxqkpPoZcy7jqvAZWma15ypSWSdRzjr5uy+FSTc4qlJ8HrEK/EHl5YJT9A/S36tOH JqFMlnnqUu4mckRbIweID3MZcAiwDLJYgi8pZz2d09ItK461W3bKwlwqeylCTFR48Q oQPEeJmW+nb7zCkQlfNoKj2fNm9s3Frffe3c5n4yG9US9MFWWBQ4MvVzWpgpK53o+s 3UfpHQbz0qDCaIPdOtz6mbmlbSzhTRc6dOPclCvJxExjx8Z+g084B6qabTwcSiSji2 m1mia0L79xK6rc1hzRJz4xlaVUgI1D2gTQGqd9QSYbaPN8SZV98rPlrraZmoDabBow 28tbhkx3hjagQ== X-Mailman-Original-Authentication-Results: smtp2.osuosl.org; dmarc=pass (p=none dis=none) header.from=free.fr X-Mailman-Original-Authentication-Results: smtp2.osuosl.org; dkim=pass (2048-bit key, unprotected) header.d=free.fr header.i=@free.fr header.a=rsa-sha256 header.s=smtp-20201208 header.b=DxqkpPoZ Subject: [Buildroot] [PATCH 1/1] support/testing: add flac runtime test X-BeenThere: buildroot@buildroot.org X-Mailman-Version: 2.1.29 Precedence: list List-Id: Discussion and development of buildroot List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , Cc: Julien Olivain Errors-To: buildroot-bounces@buildroot.org Sender: "buildroot" Signed-off-by: Julien Olivain --- Patch tested in: https://gitlab.com/jolivain/buildroot/-/jobs/7540310064 --- DEVELOPERS | 1 + support/testing/tests/package/test_flac.py | 20 ++++++++++++++++++++ 2 files changed, 21 insertions(+) create mode 100644 support/testing/tests/package/test_flac.py diff --git a/DEVELOPERS b/DEVELOPERS index d7d0af3543..1255993b39 100644 --- a/DEVELOPERS +++ b/DEVELOPERS @@ -1857,6 +1857,7 @@ F: support/testing/tests/package/test_ethtool.py F: support/testing/tests/package/test_ethtool/ 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 diff --git a/support/testing/tests/package/test_flac.py b/support/testing/tests/package/test_flac.py new file mode 100644 index 0000000000..9ee7bc1c0d --- /dev/null +++ b/support/testing/tests/package/test_flac.py @@ -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)