From patchwork Fri Jan 11 13:27:03 2019 Content-Type: text/plain; charset="utf-8" MIME-Version: 1.0 Content-Transfer-Encoding: 7bit X-Patchwork-Submitter: Jacopo Mondi X-Patchwork-Id: 206 Return-Path: Received: from relay8-d.mail.gandi.net (relay8-d.mail.gandi.net [217.70.183.201]) by lancelot.ideasonboard.com (Postfix) with ESMTPS id C9DEA60B34 for ; Fri, 11 Jan 2019 14:27:08 +0100 (CET) X-Originating-IP: 2.224.242.101 Received: from uno.lan (2-224-242-101.ip172.fastwebnet.it [2.224.242.101]) (Authenticated sender: jacopo@jmondi.org) by relay8-d.mail.gandi.net (Postfix) with ESMTPSA id 2D3FA1BF20F; Fri, 11 Jan 2019 13:27:06 +0000 (UTC) From: Jacopo Mondi To: libcamera-devel@lists.libcamera.org Date: Fri, 11 Jan 2019 14:27:03 +0100 Message-Id: <20190111132705.19329-2-jacopo@jmondi.org> X-Mailer: git-send-email 2.20.1 In-Reply-To: <20190111132705.19329-1-jacopo@jmondi.org> References: <20190111132705.19329-1-jacopo@jmondi.org> MIME-Version: 1.0 Subject: [libcamera-devel] [PATCH v2 1/3] test: media_device: Convert to foreach X-BeenThere: libcamera-devel@lists.libcamera.org X-Mailman-Version: 2.1.23 Precedence: list List-Id: List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , X-List-Received-Date: Fri, 11 Jan 2019 13:27:08 -0000 From: Kieran Bingham Prevent duplication of boilerplate code as the suite grows by establishing the foreach pattern in the media_device test suite. Reviewed-by: Jacopo Mondi Signed-off-by: Kieran Bingham --- test/media_device/meson.build | 14 ++++++++++---- 1 file changed, 10 insertions(+), 4 deletions(-) diff --git a/test/media_device/meson.build b/test/media_device/meson.build index a7ebed1..40f9ffa 100644 --- a/test/media_device/meson.build +++ b/test/media_device/meson.build @@ -1,5 +1,11 @@ -media_device_test = executable('media_device_test', 'media_device_test.cpp', - link_with : test_libraries, - include_directories : test_includes_internal) +media_device_tests = [ + ['media_device_test', 'media_device_test.cpp'], +] -test('Media Device Test', media_device_test) +foreach t : media_device_tests + exe = executable(t[0], t[1], + link_with : test_libraries, + include_directories : test_includes_internal) + + test(t[0], exe, suite: 'media_device', is_parallel: false) +endforeach