From patchwork Wed Oct 5 19:39:43 2022 Content-Type: text/plain; charset="utf-8" MIME-Version: 1.0 Content-Transfer-Encoding: 7bit X-Patchwork-Submitter: Laurent Pinchart X-Patchwork-Id: 17532 Return-Path: X-Original-To: parsemail@patchwork.libcamera.org Delivered-To: parsemail@patchwork.libcamera.org Received: from lancelot.ideasonboard.com (lancelot.ideasonboard.com [92.243.16.209]) by patchwork.libcamera.org (Postfix) with ESMTPS id 57A03C327C for ; Wed, 5 Oct 2022 19:39:52 +0000 (UTC) Received: from lancelot.ideasonboard.com (localhost [IPv6:::1]) by lancelot.ideasonboard.com (Postfix) with ESMTP id 1C97562CEE; Wed, 5 Oct 2022 21:39:51 +0200 (CEST) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/simple; d=libcamera.org; s=mail; t=1664998791; bh=JLfZjbhU+7DJ9Eq3yHsNNOKMtV1B86MryVTMaDXZmiE=; h=To:Date:In-Reply-To:References:Subject:List-Id:List-Unsubscribe: List-Archive:List-Post:List-Help:List-Subscribe:From:Reply-To: From; b=FOFNThdgLNWI/1AJv9AXzmjvSPbdXQCEYcYRSSJnRSgB8yqV5Li8YcTWci8MfGO6v oVEOJB4OKJcBsC2bmH3oZMtN+p0FgH2uSN9060RrOIqu/jMlchM9ItEQtx6wtrgwX0 ijnijDoeCFa7ghqvXlpHe+sGuClwOhf4v7p6JM9+dD56z27d52OC/4f28DL8Di7F4C VsnC0akwgKmMmtQAVWW/+VQzHlulDeC3KkJ7mcOEjKowF106+syBulgNv3boP9AIw1 QdvRnTKopBm6AiAlt2R5uK7w2qvk2uHcTmml7Fc9+NhF9gP9H/ZcZWpqSbQS70r+LM ONNeKZzgy41Ng== Received: from perceval.ideasonboard.com (perceval.ideasonboard.com [IPv6:2001:4b98:dc2:55:216:3eff:fef7:d647]) by lancelot.ideasonboard.com (Postfix) with ESMTPS id AF9BF62CB1 for ; Wed, 5 Oct 2022 21:39:49 +0200 (CEST) Authentication-Results: lancelot.ideasonboard.com; dkim=pass (1024-bit key; unprotected) header.d=ideasonboard.com header.i=@ideasonboard.com header.b="V8gt/Bfx"; dkim-atps=neutral Received: from pendragon.ideasonboard.com (62-78-145-57.bb.dnainternet.fi [62.78.145.57]) by perceval.ideasonboard.com (Postfix) with ESMTPSA id 3A10D415 for ; Wed, 5 Oct 2022 21:39:49 +0200 (CEST) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/simple; d=ideasonboard.com; s=mail; t=1664998789; bh=JLfZjbhU+7DJ9Eq3yHsNNOKMtV1B86MryVTMaDXZmiE=; h=From:To:Subject:Date:In-Reply-To:References:From; b=V8gt/BfxdBIU8ObYgduDODfACYdyfcY6peqWJ6Q80A5wFiXfVKLIysCVtKf1PVy2M qzD+fRMUnI8DxinTacMKmB/WyBbSizly1FZ3d3ZB+RP4ONX2EplcnRfuQzxosp1x9V LbkosZS6dqhUUHergLzC9R+NklJiT1bRmNURQ44g= To: libcamera-devel@lists.libcamera.org Date: Wed, 5 Oct 2022 22:39:43 +0300 Message-Id: <20221005193944.16383-2-laurent.pinchart@ideasonboard.com> X-Mailer: git-send-email 2.35.1 In-Reply-To: <20221005193944.16383-1-laurent.pinchart@ideasonboard.com> References: <20221005193944.16383-1-laurent.pinchart@ideasonboard.com> MIME-Version: 1.0 Subject: [libcamera-devel] [PATCH 1/2] test: Rename 't' to 'test' in meson.build X-BeenThere: libcamera-devel@lists.libcamera.org X-Mailman-Version: 2.1.29 Precedence: list List-Id: List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , X-Patchwork-Original-From: Laurent Pinchart via libcamera-devel From: Laurent Pinchart Reply-To: Laurent Pinchart Errors-To: libcamera-devel-bounces@lists.libcamera.org Sender: "libcamera-devel" The 't' name is very short and not very explicit. Rename it to 'test' instead. Signed-off-by: Laurent Pinchart Reviewed-by: Jacopo Mondi Reviewed-by: Umang Jain --- test/camera/meson.build | 6 +++--- test/controls/meson.build | 6 +++--- test/gstreamer/meson.build | 6 +++--- test/ipa/meson.build | 6 +++--- test/ipc/meson.build | 6 +++--- test/log/meson.build | 6 +++--- test/media_device/meson.build | 6 +++--- test/meson.build | 30 +++++++++++++++--------------- test/pipeline/ipu3/meson.build | 6 +++--- test/pipeline/rkisp1/meson.build | 6 +++--- test/process/meson.build | 6 +++--- test/serialization/meson.build | 6 +++--- test/stream/meson.build | 6 +++--- test/v4l2_subdevice/meson.build | 6 +++--- test/v4l2_videodevice/meson.build | 6 +++--- 15 files changed, 57 insertions(+), 57 deletions(-) diff --git a/test/camera/meson.build b/test/camera/meson.build index 668d5c03fb6e..df0520293bdb 100644 --- a/test/camera/meson.build +++ b/test/camera/meson.build @@ -11,10 +11,10 @@ camera_tests = [ ['camera_reconfigure', 'camera_reconfigure.cpp'], ] -foreach t : camera_tests - exe = executable(t[0], t[1], +foreach test : camera_tests + exe = executable(test[0], test[1], dependencies : libcamera_private, link_with : test_libraries, include_directories : test_includes_internal) - test(t[0], exe, suite : 'camera', is_parallel : false) + test(test[0], exe, suite : 'camera', is_parallel : false) endforeach diff --git a/test/controls/meson.build b/test/controls/meson.build index 0103543e1fc2..8cf23be6487c 100644 --- a/test/controls/meson.build +++ b/test/controls/meson.build @@ -7,10 +7,10 @@ control_tests = [ ['control_value', 'control_value.cpp'], ] -foreach t : control_tests - exe = executable(t[0], t[1], +foreach test : control_tests + exe = executable(test[0], test[1], dependencies : libcamera_public, link_with : test_libraries, include_directories : test_includes_internal) - test(t[0], exe, suite : 'controls', is_parallel : false) + test(test[0], exe, suite : 'controls', is_parallel : false) endforeach diff --git a/test/gstreamer/meson.build b/test/gstreamer/meson.build index 10058fc5206f..46f6a77a771e 100644 --- a/test/gstreamer/meson.build +++ b/test/gstreamer/meson.build @@ -10,11 +10,11 @@ gstreamer_tests = [ ] gstreamer_dep = dependency('gstreamer-1.0', required: true) -foreach t : gstreamer_tests - exe = executable(t[0], t[1], 'gstreamer_test.cpp', +foreach test : gstreamer_tests + exe = executable(test[0], test[1], 'gstreamer_test.cpp', dependencies : [libcamera_private, gstreamer_dep], link_with : test_libraries, include_directories : test_includes_internal) - test(t[0], exe, suite : 'gstreamer', is_parallel : false) + test(test[0], exe, suite : 'gstreamer', is_parallel : false) endforeach diff --git a/test/ipa/meson.build b/test/ipa/meson.build index 7938633e54ab..295807fd8a45 100644 --- a/test/ipa/meson.build +++ b/test/ipa/meson.build @@ -5,11 +5,11 @@ ipa_test = [ ['ipa_interface_test', 'ipa_interface_test.cpp'], ] -foreach t : ipa_test - exe = executable(t[0], [t[1], libcamera_generated_ipa_headers], +foreach test : ipa_test + exe = executable(test[0], [test[1], libcamera_generated_ipa_headers], dependencies : libcamera_private, link_with : [libipa, test_libraries], include_directories : [libipa_includes, test_includes_internal]) - test(t[0], exe, suite : 'ipa') + test(test[0], exe, suite : 'ipa') endforeach diff --git a/test/ipc/meson.build b/test/ipc/meson.build index 2a6cd7fb8433..ce21135b701d 100644 --- a/test/ipc/meson.build +++ b/test/ipc/meson.build @@ -5,11 +5,11 @@ ipc_tests = [ ['unixsocket', 'unixsocket.cpp'], ] -foreach t : ipc_tests - exe = executable(t[0], t[1], +foreach test : ipc_tests + exe = executable(test[0], test[1], dependencies : libcamera_private, link_with : test_libraries, include_directories : test_includes_internal) - test(t[0], exe, suite : 'ipc') + test(test[0], exe, suite : 'ipc') endforeach diff --git a/test/log/meson.build b/test/log/meson.build index ac87841a24e1..d2d51e471d52 100644 --- a/test/log/meson.build +++ b/test/log/meson.build @@ -5,11 +5,11 @@ log_test = [ ['log_process', 'log_process.cpp'], ] -foreach t : log_test - exe = executable(t[0], t[1], +foreach test : log_test + exe = executable(test[0], test[1], dependencies : libcamera_private, link_with : test_libraries, include_directories : test_includes_internal) - test(t[0], exe, suite : 'log') + test(test[0], exe, suite : 'log') endforeach diff --git a/test/media_device/meson.build b/test/media_device/meson.build index 83dfe8f11d2f..7d34509d6797 100644 --- a/test/media_device/meson.build +++ b/test/media_device/meson.build @@ -14,11 +14,11 @@ lib_mdev_test = static_library('lib_mdev_test', lib_mdev_test_sources, dependencies : libcamera_private, include_directories : test_includes_internal) -foreach t : media_device_tests - exe = executable(t[0], t[1], +foreach test : media_device_tests + exe = executable(test[0], test[1], dependencies : libcamera_private, link_with : [test_libraries, lib_mdev_test], include_directories : test_includes_internal) - test(t[0], exe, suite : 'media_device', is_parallel : false) + test(test[0], exe, suite : 'media_device', is_parallel : false) endforeach diff --git a/test/meson.build b/test/meson.build index 9bf7bf34e796..4bc01d78f4e6 100644 --- a/test/meson.build +++ b/test/meson.build @@ -64,44 +64,44 @@ internal_non_parallel_tests = [ ['mapped-buffer', 'mapped-buffer.cpp'], ] -foreach t : public_tests +foreach test : public_tests deps = [libcamera_public] - if t.length() > 2 - deps += t[2] + if test.length() > 2 + deps += test[2] endif - exe = executable(t[0], t[1], + exe = executable(test[0], test[1], dependencies : deps, link_with : test_libraries, include_directories : test_includes_public) - test(t[0], exe) + test(test[0], exe) endforeach -foreach t : internal_tests +foreach test : internal_tests deps = [libcamera_private] - if t.length() > 2 - deps += t[2] + if test.length() > 2 + deps += test[2] endif - exe = executable(t[0], t[1], + exe = executable(test[0], test[1], dependencies : deps, link_with : test_libraries, include_directories : test_includes_internal) - test(t[0], exe) + test(test[0], exe) endforeach -foreach t : internal_non_parallel_tests +foreach test : internal_non_parallel_tests deps = [libcamera_private] - if t.length() > 2 - deps += t[2] + if test.length() > 2 + deps += test[2] endif - exe = executable(t[0], t[1], + exe = executable(test[0], test[1], dependencies : deps, link_with : test_libraries, include_directories : test_includes_internal) - test(t[0], exe, is_parallel : false) + test(test[0], exe, is_parallel : false) endforeach diff --git a/test/pipeline/ipu3/meson.build b/test/pipeline/ipu3/meson.build index 16701080ca2b..5fcf5730b0b0 100644 --- a/test/pipeline/ipu3/meson.build +++ b/test/pipeline/ipu3/meson.build @@ -4,11 +4,11 @@ ipu3_test = [ ['ipu3_pipeline_test', 'ipu3_pipeline_test.cpp'], ] -foreach t : ipu3_test - exe = executable(t[0], t[1], +foreach test : ipu3_test + exe = executable(test[0], test[1], dependencies : libcamera_private, link_with : test_libraries, include_directories : test_includes_internal) - test(t[0], exe, suite : 'ipu3', is_parallel : false) + test(test[0], exe, suite : 'ipu3', is_parallel : false) endforeach diff --git a/test/pipeline/rkisp1/meson.build b/test/pipeline/rkisp1/meson.build index 364b5711a0f9..c82cc78972f6 100644 --- a/test/pipeline/rkisp1/meson.build +++ b/test/pipeline/rkisp1/meson.build @@ -4,11 +4,11 @@ rkisp1_test = [ ['rkisp1_pipeline_test', 'rkisp1_pipeline_test.cpp'], ] -foreach t : rkisp1_test - exe = executable(t[0], t[1], +foreach test : rkisp1_test + exe = executable(test[0], test[1], dependencies : libcamera_private, link_with : test_libraries, include_directories : test_includes_internal) - test(t[0], exe, suite : 'rkisp1', is_parallel : false) + test(test[0], exe, suite : 'rkisp1', is_parallel : false) endforeach diff --git a/test/process/meson.build b/test/process/meson.build index af86b277db63..c656d7343e54 100644 --- a/test/process/meson.build +++ b/test/process/meson.build @@ -4,11 +4,11 @@ process_tests = [ ['process_test', 'process_test.cpp'], ] -foreach t : process_tests - exe = executable(t[0], t[1], +foreach test : process_tests + exe = executable(test[0], test[1], dependencies : libcamera_private, link_with : test_libraries, include_directories : test_includes_internal) - test(t[0], exe, suite : 'process', is_parallel : false) + test(test[0], exe, suite : 'process', is_parallel : false) endforeach diff --git a/test/serialization/meson.build b/test/serialization/meson.build index 26e42b150b40..c4206cb3632b 100644 --- a/test/serialization/meson.build +++ b/test/serialization/meson.build @@ -7,10 +7,10 @@ serialization_tests = [ ['ipa_data_serializer_test', 'ipa_data_serializer_test.cpp'], ] -foreach t : serialization_tests - exe = executable(t[0], [t[1], 'serialization_test.cpp'], +foreach test : serialization_tests + exe = executable(test[0], [test[1], 'serialization_test.cpp'], dependencies : libcamera_private, link_with : test_libraries, include_directories : test_includes_internal) - test(t[0], exe, suite : 'serialization', is_parallel : false) + test(test[0], exe, suite : 'serialization', is_parallel : false) endforeach diff --git a/test/stream/meson.build b/test/stream/meson.build index 89f51c18a63e..3a97868bce1c 100644 --- a/test/stream/meson.build +++ b/test/stream/meson.build @@ -5,10 +5,10 @@ stream_tests = [ ['stream_formats', 'stream_formats.cpp'], ] -foreach t : stream_tests - exe = executable(t[0], t[1], +foreach test : stream_tests + exe = executable(test[0], test[1], dependencies : libcamera_public, link_with : test_libraries, include_directories : test_includes_internal) - test(t[0], exe, suite: 'stream') + test(test[0], exe, suite: 'stream') endforeach diff --git a/test/v4l2_subdevice/meson.build b/test/v4l2_subdevice/meson.build index d82be3c60b75..4e607d41fc54 100644 --- a/test/v4l2_subdevice/meson.build +++ b/test/v4l2_subdevice/meson.build @@ -5,10 +5,10 @@ v4l2_subdevice_tests = [ ['test_formats', 'test_formats.cpp'], ] -foreach t : v4l2_subdevice_tests - exe = executable(t[0], [t[1], 'v4l2_subdevice_test.cpp'], +foreach test : v4l2_subdevice_tests + exe = executable(test[0], [test[1], 'v4l2_subdevice_test.cpp'], dependencies : libcamera_private, link_with : test_libraries, include_directories : test_includes_internal) - test(t[0], exe, suite : 'v4l2_subdevice', is_parallel : false) + test(test[0], exe, suite : 'v4l2_subdevice', is_parallel : false) endforeach diff --git a/test/v4l2_videodevice/meson.build b/test/v4l2_videodevice/meson.build index 7a26f53d106a..f85374854c48 100644 --- a/test/v4l2_videodevice/meson.build +++ b/test/v4l2_videodevice/meson.build @@ -15,10 +15,10 @@ v4l2_videodevice_tests = [ ['v4l2_m2mdevice', 'v4l2_m2mdevice.cpp'], ] -foreach t : v4l2_videodevice_tests - exe = executable(t[0], [t[1], 'v4l2_videodevice_test.cpp'], +foreach test : v4l2_videodevice_tests + exe = executable(test[0], [test[1], 'v4l2_videodevice_test.cpp'], dependencies : libcamera_private, link_with : test_libraries, include_directories : test_includes_internal) - test(t[0], exe, suite : 'v4l2_videodevice', is_parallel : false) + test(test[0], exe, suite : 'v4l2_videodevice', is_parallel : false) endforeach From patchwork Wed Oct 5 19:39:44 2022 Content-Type: text/plain; charset="utf-8" MIME-Version: 1.0 Content-Transfer-Encoding: 7bit X-Patchwork-Submitter: Laurent Pinchart X-Patchwork-Id: 17533 Return-Path: X-Original-To: parsemail@patchwork.libcamera.org Delivered-To: parsemail@patchwork.libcamera.org Received: from lancelot.ideasonboard.com (lancelot.ideasonboard.com [92.243.16.209]) by patchwork.libcamera.org (Postfix) with ESMTPS id 282C0BD16B for ; Wed, 5 Oct 2022 19:39:54 +0000 (UTC) Received: from lancelot.ideasonboard.com (localhost [IPv6:::1]) by lancelot.ideasonboard.com (Postfix) with ESMTP id C26C762CF4; Wed, 5 Oct 2022 21:39:53 +0200 (CEST) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/simple; d=libcamera.org; s=mail; t=1664998793; bh=Z8jU+JkqjKqjvsAxsn2a5Ni2u+iKO9ZsaxsmxRdNkDc=; h=To:Date:In-Reply-To:References:Subject:List-Id:List-Unsubscribe: List-Archive:List-Post:List-Help:List-Subscribe:From:Reply-To: From; b=MrjPMIjEcqw2PBYaDS5wEOsV+LpcWJV7rymfOkkAGnTucSOreQKcOl+KLM94aeVdl KQNmk5DiKTUmuBGF0mUuNmIitkOLd3481lIRWXEoAqgNTfC6zWJ2Zv4dfUNxLeBP2C 07QZcrCiqwLBR7zDpj3YoV2g8uvGeZDFRA898CNAZvO2B99KEr9xHFpI0OHpaFmOaI HbJEVAxL5+FZ82/ZzQFVnV+EqmUeAMl+xzKiY/Uj86MFnHT91kMFpyS830SU7jLBS+ FLPTHJiT+n2hoW1hVEv722Lk8kMDTdmjOrvke5rfgpuySS7AVy4ze0Ok6NdcG+hkp7 pA9axnBVf8nsA== Received: from perceval.ideasonboard.com (perceval.ideasonboard.com [IPv6:2001:4b98:dc2:55:216:3eff:fef7:d647]) by lancelot.ideasonboard.com (Postfix) with ESMTPS id 3632F62CF1 for ; Wed, 5 Oct 2022 21:39:51 +0200 (CEST) Authentication-Results: lancelot.ideasonboard.com; dkim=pass (1024-bit key; unprotected) header.d=ideasonboard.com header.i=@ideasonboard.com header.b="IiezXSrF"; dkim-atps=neutral Received: from pendragon.ideasonboard.com (62-78-145-57.bb.dnainternet.fi [62.78.145.57]) by perceval.ideasonboard.com (Postfix) with ESMTPSA id 9EA6B415 for ; Wed, 5 Oct 2022 21:39:50 +0200 (CEST) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/simple; d=ideasonboard.com; s=mail; t=1664998790; bh=Z8jU+JkqjKqjvsAxsn2a5Ni2u+iKO9ZsaxsmxRdNkDc=; h=From:To:Subject:Date:In-Reply-To:References:From; b=IiezXSrFjSeCI3GAjC7Jhs9vjpJeVmeljJbsHdv5sEoGfUeSGRJ28FSaONziLUVH3 8MEiyT7YbDuliU2nD5NUtdvr6JjnIXk8WaklW4Jc4mgfWT+rZBo58/r1D1KqPNki8Q auXAR96is6Yicwpk7yVodDvg72EOj2DlTkUmOjMg= To: libcamera-devel@lists.libcamera.org Date: Wed, 5 Oct 2022 22:39:44 +0300 Message-Id: <20221005193944.16383-3-laurent.pinchart@ideasonboard.com> X-Mailer: git-send-email 2.35.1 In-Reply-To: <20221005193944.16383-1-laurent.pinchart@ideasonboard.com> References: <20221005193944.16383-1-laurent.pinchart@ideasonboard.com> MIME-Version: 1.0 Subject: [libcamera-devel] [PATCH 2/2] test: meson: Use dictionaries instead of arrays to store test information X-BeenThere: libcamera-devel@lists.libcamera.org X-Mailman-Version: 2.1.29 Precedence: list List-Id: List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , X-Patchwork-Original-From: Laurent Pinchart via libcamera-devel From: Laurent Pinchart Reply-To: Laurent Pinchart Errors-To: libcamera-devel-bounces@lists.libcamera.org Sender: "libcamera-devel" Tests are listed in meson.build using arrays that contain the test name and source files at fixed positions. This isn't very readable, leading to code using test[0], test[1] and test[2]. Replace the arrays with dictionaries to improve readability. Signed-off-by: Laurent Pinchart Reviewed-by: Jacopo Mondi Reviewed-by: Umang Jain --- test/camera/meson.build | 16 +++--- test/controls/meson.build | 12 ++--- test/gstreamer/meson.build | 8 +-- test/ipa/meson.build | 8 +-- test/ipc/meson.build | 8 +-- test/log/meson.build | 8 +-- test/media_device/meson.build | 10 ++-- test/meson.build | 84 +++++++++++++++---------------- test/pipeline/ipu3/meson.build | 6 +-- test/pipeline/rkisp1/meson.build | 6 +-- test/process/meson.build | 6 +-- test/serialization/meson.build | 8 +-- test/stream/meson.build | 8 +-- test/v4l2_subdevice/meson.build | 8 +-- test/v4l2_videodevice/meson.build | 24 ++++----- 15 files changed, 110 insertions(+), 110 deletions(-) diff --git a/test/camera/meson.build b/test/camera/meson.build index df0520293bdb..4f9f8c8c4784 100644 --- a/test/camera/meson.build +++ b/test/camera/meson.build @@ -3,18 +3,18 @@ # Tests are listed in order of complexity. # They are not alphabetically sorted. camera_tests = [ - ['configuration_default', 'configuration_default.cpp'], - ['configuration_set', 'configuration_set.cpp'], - ['buffer_import', 'buffer_import.cpp'], - ['statemachine', 'statemachine.cpp'], - ['capture', 'capture.cpp'], - ['camera_reconfigure', 'camera_reconfigure.cpp'], + {'name': 'configuration_default', 'sources': ['configuration_default.cpp']}, + {'name': 'configuration_set', 'sources': ['configuration_set.cpp']}, + {'name': 'buffer_import', 'sources': ['buffer_import.cpp']}, + {'name': 'statemachine', 'sources': ['statemachine.cpp']}, + {'name': 'capture', 'sources': ['capture.cpp']}, + {'name': 'camera_reconfigure', 'sources': ['camera_reconfigure.cpp']}, ] foreach test : camera_tests - exe = executable(test[0], test[1], + exe = executable(test['name'], test['sources'], dependencies : libcamera_private, link_with : test_libraries, include_directories : test_includes_internal) - test(test[0], exe, suite : 'camera', is_parallel : false) + test(test['name'], exe, suite : 'camera', is_parallel : false) endforeach diff --git a/test/controls/meson.build b/test/controls/meson.build index 8cf23be6487c..763f8905e7c1 100644 --- a/test/controls/meson.build +++ b/test/controls/meson.build @@ -1,16 +1,16 @@ # SPDX-License-Identifier: CC0-1.0 control_tests = [ - ['control_info', 'control_info.cpp'], - ['control_info_map', 'control_info_map.cpp'], - ['control_list', 'control_list.cpp'], - ['control_value', 'control_value.cpp'], + {'name': 'control_info', 'sources': ['control_info.cpp']}, + {'name': 'control_info_map', 'sources': ['control_info_map.cpp']}, + {'name': 'control_list', 'sources': ['control_list.cpp']}, + {'name': 'control_value', 'sources': ['control_value.cpp']}, ] foreach test : control_tests - exe = executable(test[0], test[1], + exe = executable(test['name'], test['sources'], dependencies : libcamera_public, link_with : test_libraries, include_directories : test_includes_internal) - test(test[0], exe, suite : 'controls', is_parallel : false) + test(test['name'], exe, suite : 'controls', is_parallel : false) endforeach diff --git a/test/gstreamer/meson.build b/test/gstreamer/meson.build index 46f6a77a771e..745725864eef 100644 --- a/test/gstreamer/meson.build +++ b/test/gstreamer/meson.build @@ -5,16 +5,16 @@ if not gst_enabled endif gstreamer_tests = [ - ['single_stream_test', 'gstreamer_single_stream_test.cpp'], - ['multi_stream_test', 'gstreamer_multi_stream_test.cpp'], + {'name': 'single_stream_test', 'sources': ['gstreamer_single_stream_test.cpp']}, + {'name': 'multi_stream_test', 'sources': ['gstreamer_multi_stream_test.cpp']}, ] gstreamer_dep = dependency('gstreamer-1.0', required: true) foreach test : gstreamer_tests - exe = executable(test[0], test[1], 'gstreamer_test.cpp', + exe = executable(test['name'], test['sources'], 'gstreamer_test.cpp', dependencies : [libcamera_private, gstreamer_dep], link_with : test_libraries, include_directories : test_includes_internal) - test(test[0], exe, suite : 'gstreamer', is_parallel : false) + test(test['name'], exe, suite : 'gstreamer', is_parallel : false) endforeach diff --git a/test/ipa/meson.build b/test/ipa/meson.build index 295807fd8a45..180b0da0a51a 100644 --- a/test/ipa/meson.build +++ b/test/ipa/meson.build @@ -1,15 +1,15 @@ # SPDX-License-Identifier: CC0-1.0 ipa_test = [ - ['ipa_module_test', 'ipa_module_test.cpp'], - ['ipa_interface_test', 'ipa_interface_test.cpp'], + {'name': 'ipa_module_test', 'sources': ['ipa_module_test.cpp']}, + {'name': 'ipa_interface_test', 'sources': ['ipa_interface_test.cpp']}, ] foreach test : ipa_test - exe = executable(test[0], [test[1], libcamera_generated_ipa_headers], + exe = executable(test['name'], test['sources'], libcamera_generated_ipa_headers, dependencies : libcamera_private, link_with : [libipa, test_libraries], include_directories : [libipa_includes, test_includes_internal]) - test(test[0], exe, suite : 'ipa') + test(test['name'], exe, suite : 'ipa') endforeach diff --git a/test/ipc/meson.build b/test/ipc/meson.build index ce21135b701d..8e447d228201 100644 --- a/test/ipc/meson.build +++ b/test/ipc/meson.build @@ -1,15 +1,15 @@ # SPDX-License-Identifier: CC0-1.0 ipc_tests = [ - ['unixsocket_ipc', 'unixsocket_ipc.cpp'], - ['unixsocket', 'unixsocket.cpp'], + {'name': 'unixsocket_ipc', 'sources': ['unixsocket_ipc.cpp']}, + {'name': 'unixsocket', 'sources': ['unixsocket.cpp']}, ] foreach test : ipc_tests - exe = executable(test[0], test[1], + exe = executable(test['name'], test['sources'], dependencies : libcamera_private, link_with : test_libraries, include_directories : test_includes_internal) - test(test[0], exe, suite : 'ipc') + test(test['name'], exe, suite : 'ipc') endforeach diff --git a/test/log/meson.build b/test/log/meson.build index d2d51e471d52..2298ff84ee62 100644 --- a/test/log/meson.build +++ b/test/log/meson.build @@ -1,15 +1,15 @@ # SPDX-License-Identifier: CC0-1.0 log_test = [ - ['log_api', 'log_api.cpp'], - ['log_process', 'log_process.cpp'], + {'name': 'log_api', 'sources': ['log_api.cpp']}, + {'name': 'log_process', 'sources': ['log_process.cpp']}, ] foreach test : log_test - exe = executable(test[0], test[1], + exe = executable(test['name'], test['sources'], dependencies : libcamera_private, link_with : test_libraries, include_directories : test_includes_internal) - test(test[0], exe, suite : 'log') + test(test['name'], exe, suite : 'log') endforeach diff --git a/test/media_device/meson.build b/test/media_device/meson.build index 7d34509d6797..84966c976192 100644 --- a/test/media_device/meson.build +++ b/test/media_device/meson.build @@ -5,9 +5,9 @@ lib_mdev_test_sources = files([ ]) media_device_tests = [ - ['media_device_acquire', 'media_device_acquire.cpp'], - ['media_device_print_test', 'media_device_print_test.cpp'], - ['media_device_link_test', 'media_device_link_test.cpp'], + {'name': 'media_device_acquire', 'sources': ['media_device_acquire.cpp']}, + {'name': 'media_device_print_test', 'sources': ['media_device_print_test.cpp']}, + {'name': 'media_device_link_test', 'sources': ['media_device_link_test.cpp']}, ] lib_mdev_test = static_library('lib_mdev_test', lib_mdev_test_sources, @@ -15,10 +15,10 @@ lib_mdev_test = static_library('lib_mdev_test', lib_mdev_test_sources, include_directories : test_includes_internal) foreach test : media_device_tests - exe = executable(test[0], test[1], + exe = executable(test['name'], test['sources'], dependencies : libcamera_private, link_with : [test_libraries, lib_mdev_test], include_directories : test_includes_internal) - test(test[0], exe, suite : 'media_device', is_parallel : false) + test(test['name'], exe, suite : 'media_device', is_parallel : false) endforeach diff --git a/test/meson.build b/test/meson.build index 4bc01d78f4e6..05a54d5cad2f 100644 --- a/test/meson.build +++ b/test/meson.build @@ -26,82 +26,82 @@ subdir('v4l2_subdevice') subdir('v4l2_videodevice') public_tests = [ - ['color-space', 'color-space.cpp'], - ['geometry', 'geometry.cpp'], - ['public-api', 'public-api.cpp'], - ['signal', 'signal.cpp'], - ['span', 'span.cpp'], + {'name': 'color-space', 'sources': ['color-space.cpp']}, + {'name': 'geometry', 'sources': ['geometry.cpp']}, + {'name': 'public-api', 'sources': ['public-api.cpp']}, + {'name': 'signal', 'sources': ['signal.cpp']}, + {'name': 'span', 'sources': ['span.cpp']}, ] internal_tests = [ - ['bayer-format', 'bayer-format.cpp'], - ['byte-stream-buffer', 'byte-stream-buffer.cpp'], - ['camera-sensor', 'camera-sensor.cpp'], - ['delayed_controls', 'delayed_controls.cpp'], - ['event', 'event.cpp'], - ['event-dispatcher', 'event-dispatcher.cpp'], - ['event-thread', 'event-thread.cpp'], - ['file', 'file.cpp'], - ['flags', 'flags.cpp'], - ['hotplug-cameras', 'hotplug-cameras.cpp'], - ['message', 'message.cpp'], - ['object', 'object.cpp'], - ['object-delete', 'object-delete.cpp'], - ['object-invoke', 'object-invoke.cpp'], - ['pixel-format', 'pixel-format.cpp'], - ['shared-fd', 'shared-fd.cpp'], - ['signal-threads', 'signal-threads.cpp'], - ['threads', 'threads.cpp', [libthreads]], - ['timer', 'timer.cpp'], - ['timer-thread', 'timer-thread.cpp'], - ['unique-fd', 'unique-fd.cpp'], - ['utils', 'utils.cpp'], - ['yaml-parser', 'yaml-parser.cpp'], + {'name': 'bayer-format', 'sources': ['bayer-format.cpp']}, + {'name': 'byte-stream-buffer', 'sources': ['byte-stream-buffer.cpp']}, + {'name': 'camera-sensor', 'sources': ['camera-sensor.cpp']}, + {'name': 'delayed_controls', 'sources': ['delayed_controls.cpp']}, + {'name': 'event', 'sources': ['event.cpp']}, + {'name': 'event-dispatcher', 'sources': ['event-dispatcher.cpp']}, + {'name': 'event-thread', 'sources': ['event-thread.cpp']}, + {'name': 'file', 'sources': ['file.cpp']}, + {'name': 'flags', 'sources': ['flags.cpp']}, + {'name': 'hotplug-cameras', 'sources': ['hotplug-cameras.cpp']}, + {'name': 'message', 'sources': ['message.cpp']}, + {'name': 'object', 'sources': ['object.cpp']}, + {'name': 'object-delete', 'sources': ['object-delete.cpp']}, + {'name': 'object-invoke', 'sources': ['object-invoke.cpp']}, + {'name': 'pixel-format', 'sources': ['pixel-format.cpp']}, + {'name': 'shared-fd', 'sources': ['shared-fd.cpp']}, + {'name': 'signal-threads', 'sources': ['signal-threads.cpp']}, + {'name': 'threads', 'sources': 'threads.cpp', 'dependencies': [libthreads]}, + {'name': 'timer', 'sources': ['timer.cpp']}, + {'name': 'timer-thread', 'sources': ['timer-thread.cpp']}, + {'name': 'unique-fd', 'sources': ['unique-fd.cpp']}, + {'name': 'utils', 'sources': ['utils.cpp']}, + {'name': 'yaml-parser', 'sources': ['yaml-parser.cpp']}, ] internal_non_parallel_tests = [ - ['fence', 'fence.cpp'], - ['mapped-buffer', 'mapped-buffer.cpp'], + {'name': 'fence', 'sources': ['fence.cpp']}, + {'name': 'mapped-buffer', 'sources': ['mapped-buffer.cpp']}, ] foreach test : public_tests deps = [libcamera_public] - if test.length() > 2 - deps += test[2] + if 'dependencies' in test + deps += test['dependencies'] endif - exe = executable(test[0], test[1], + exe = executable(test['name'], test['sources'], dependencies : deps, link_with : test_libraries, include_directories : test_includes_public) - test(test[0], exe) + test(test['name'], exe) endforeach foreach test : internal_tests deps = [libcamera_private] - if test.length() > 2 - deps += test[2] + if 'dependencies' in test + deps += test['dependencies'] endif - exe = executable(test[0], test[1], + exe = executable(test['name'], test['sources'], dependencies : deps, link_with : test_libraries, include_directories : test_includes_internal) - test(test[0], exe) + test(test['name'], exe) endforeach foreach test : internal_non_parallel_tests deps = [libcamera_private] - if test.length() > 2 - deps += test[2] + if 'dependencies' in test + deps += test['dependencies'] endif - exe = executable(test[0], test[1], + exe = executable(test['name'], test['sources'], dependencies : deps, link_with : test_libraries, include_directories : test_includes_internal) - test(test[0], exe, is_parallel : false) + test(test['name'], exe, is_parallel : false) endforeach diff --git a/test/pipeline/ipu3/meson.build b/test/pipeline/ipu3/meson.build index 5fcf5730b0b0..af075707f505 100644 --- a/test/pipeline/ipu3/meson.build +++ b/test/pipeline/ipu3/meson.build @@ -1,14 +1,14 @@ # SPDX-License-Identifier: CC0-1.0 ipu3_test = [ - ['ipu3_pipeline_test', 'ipu3_pipeline_test.cpp'], + {'name': 'ipu3_pipeline_test', 'sources': ['ipu3_pipeline_test.cpp']}, ] foreach test : ipu3_test - exe = executable(test[0], test[1], + exe = executable(test['name'], test['sources'], dependencies : libcamera_private, link_with : test_libraries, include_directories : test_includes_internal) - test(test[0], exe, suite : 'ipu3', is_parallel : false) + test(test['name'], exe, suite : 'ipu3', is_parallel : false) endforeach diff --git a/test/pipeline/rkisp1/meson.build b/test/pipeline/rkisp1/meson.build index c82cc78972f6..1d178ad9da6f 100644 --- a/test/pipeline/rkisp1/meson.build +++ b/test/pipeline/rkisp1/meson.build @@ -1,14 +1,14 @@ # SPDX-License-Identifier: CC0-1.0 rkisp1_test = [ - ['rkisp1_pipeline_test', 'rkisp1_pipeline_test.cpp'], + {'name': 'rkisp1_pipeline_test', 'sources': ['rkisp1_pipeline_test.cpp']}, ] foreach test : rkisp1_test - exe = executable(test[0], test[1], + exe = executable(test['name'], test['sources'], dependencies : libcamera_private, link_with : test_libraries, include_directories : test_includes_internal) - test(test[0], exe, suite : 'rkisp1', is_parallel : false) + test(test['name'], exe, suite : 'rkisp1', is_parallel : false) endforeach diff --git a/test/process/meson.build b/test/process/meson.build index c656d7343e54..a80dc2d99fdd 100644 --- a/test/process/meson.build +++ b/test/process/meson.build @@ -1,14 +1,14 @@ # SPDX-License-Identifier: CC0-1.0 process_tests = [ - ['process_test', 'process_test.cpp'], + {'name': 'process_test', 'sources': ['process_test.cpp']}, ] foreach test : process_tests - exe = executable(test[0], test[1], + exe = executable(test['name'], test['sources'], dependencies : libcamera_private, link_with : test_libraries, include_directories : test_includes_internal) - test(test[0], exe, suite : 'process', is_parallel : false) + test(test['name'], exe, suite : 'process', is_parallel : false) endforeach diff --git a/test/serialization/meson.build b/test/serialization/meson.build index c4206cb3632b..a6e8d79358d9 100644 --- a/test/serialization/meson.build +++ b/test/serialization/meson.build @@ -3,14 +3,14 @@ subdir('generated_serializer') serialization_tests = [ - ['control_serialization', 'control_serialization.cpp'], - ['ipa_data_serializer_test', 'ipa_data_serializer_test.cpp'], + {'name': 'control_serialization', 'sources': ['control_serialization.cpp']}, + {'name': 'ipa_data_serializer_test', 'sources': ['ipa_data_serializer_test.cpp']}, ] foreach test : serialization_tests - exe = executable(test[0], [test[1], 'serialization_test.cpp'], + exe = executable(test['name'], test['sources'], 'serialization_test.cpp', dependencies : libcamera_private, link_with : test_libraries, include_directories : test_includes_internal) - test(test[0], exe, suite : 'serialization', is_parallel : false) + test(test['name'], exe, suite : 'serialization', is_parallel : false) endforeach diff --git a/test/stream/meson.build b/test/stream/meson.build index 3a97868bce1c..a3b19bf592a5 100644 --- a/test/stream/meson.build +++ b/test/stream/meson.build @@ -1,14 +1,14 @@ # SPDX-License-Identifier: CC0-1.0 stream_tests = [ - ['stream_colorspace', 'stream_colorspace.cpp'], - ['stream_formats', 'stream_formats.cpp'], + {'name': 'stream_colorspace', 'sources': ['stream_colorspace.cpp']}, + {'name': 'stream_formats', 'sources': ['stream_formats.cpp']}, ] foreach test : stream_tests - exe = executable(test[0], test[1], + exe = executable(test['name'], test['sources'], dependencies : libcamera_public, link_with : test_libraries, include_directories : test_includes_internal) - test(test[0], exe, suite: 'stream') + test(test['name'], exe, suite: 'stream') endforeach diff --git a/test/v4l2_subdevice/meson.build b/test/v4l2_subdevice/meson.build index 4e607d41fc54..277f29bbcc41 100644 --- a/test/v4l2_subdevice/meson.build +++ b/test/v4l2_subdevice/meson.build @@ -1,14 +1,14 @@ # SPDX-License-Identifier: CC0-1.0 v4l2_subdevice_tests = [ - ['list_formats', 'list_formats.cpp'], - ['test_formats', 'test_formats.cpp'], + {'name': 'list_formats', 'sources': ['list_formats.cpp']}, + {'name': 'test_formats', 'sources': ['test_formats.cpp']}, ] foreach test : v4l2_subdevice_tests - exe = executable(test[0], [test[1], 'v4l2_subdevice_test.cpp'], + exe = executable(test['name'], test['sources'], 'v4l2_subdevice_test.cpp', dependencies : libcamera_private, link_with : test_libraries, include_directories : test_includes_internal) - test(test[0], exe, suite : 'v4l2_subdevice', is_parallel : false) + test(test['name'], exe, suite : 'v4l2_subdevice', is_parallel : false) endforeach diff --git a/test/v4l2_videodevice/meson.build b/test/v4l2_videodevice/meson.build index f85374854c48..87ea4f966ff1 100644 --- a/test/v4l2_videodevice/meson.build +++ b/test/v4l2_videodevice/meson.build @@ -3,22 +3,22 @@ # Tests are listed in order of complexity. # They are not alphabetically sorted. v4l2_videodevice_tests = [ - ['double_open', 'double_open.cpp'], - ['controls', 'controls.cpp'], - ['formats', 'formats.cpp'], - ['dequeue_watchdog', 'dequeue_watchdog.cpp'], - ['request_buffers', 'request_buffers.cpp'], - ['buffer_cache', 'buffer_cache.cpp'], - ['stream_on_off', 'stream_on_off.cpp'], - ['capture_async', 'capture_async.cpp'], - ['buffer_sharing', 'buffer_sharing.cpp'], - ['v4l2_m2mdevice', 'v4l2_m2mdevice.cpp'], + {'name': 'double_open', 'sources': ['double_open.cpp']}, + {'name': 'controls', 'sources': ['controls.cpp']}, + {'name': 'formats', 'sources': ['formats.cpp']}, + {'name': 'dequeue_watchdog', 'sources': ['dequeue_watchdog.cpp']}, + {'name': 'request_buffers', 'sources': ['request_buffers.cpp']}, + {'name': 'buffer_cache', 'sources': ['buffer_cache.cpp']}, + {'name': 'stream_on_off', 'sources': ['stream_on_off.cpp']}, + {'name': 'capture_async', 'sources': ['capture_async.cpp']}, + {'name': 'buffer_sharing', 'sources': ['buffer_sharing.cpp']}, + {'name': 'v4l2_m2mdevice', 'sources': ['v4l2_m2mdevice.cpp']}, ] foreach test : v4l2_videodevice_tests - exe = executable(test[0], [test[1], 'v4l2_videodevice_test.cpp'], + exe = executable(test['name'], [test['sources'], 'v4l2_videodevice_test.cpp'], dependencies : libcamera_private, link_with : test_libraries, include_directories : test_includes_internal) - test(test[0], exe, suite : 'v4l2_videodevice', is_parallel : false) + test(test['name'], exe, suite : 'v4l2_videodevice', is_parallel : false) endforeach