[{"id":83,"web_url":"https://patchwork.libcamera.org/comment/83/","msgid":"<20181228023445.GM19796@bigcity.dyn.berto.se>","date":"2018-12-28T02:34:45","subject":"Re: [libcamera-devel] [PATCH] test: Use foreach iterators to\n\tsimplify definitions","submitter":{"id":5,"url":"https://patchwork.libcamera.org/api/people/5/","name":"Niklas Söderlund","email":"niklas.soderlund@ragnatech.se"},"content":"Hi Kieran,\n\nThanks for your patch.\n\nOn 2018-12-21 09:08:04 +0000, Kieran Bingham wrote:\n> Create two arrays, to contain public and internal test targets, and use\n> the foreach iterators to automatically generate test output targets for\n> each entry in each array.\n> \n> The public tests array is linked only against public libcamera headers,\n> while tests declared in the internal_tests will have access to\n> non-public API headers from within the libcamera sources.\n> \n> Signed-off-by: Kieran Bingham <kieran.bingham@ideasonboard.com>\n\nReviewed-by: Niklas Söderlund <niklas.soderlund@ragnatech.se>\n\n> ---\n> \n> This patch applies on top of the series \"[PATCH 0/5] test: Define\n> libtest\" just posted.\n> \n> \n>  test/meson.build | 26 ++++++++++++++++++++++----\n>  1 file changed, 22 insertions(+), 4 deletions(-)\n> \n> diff --git a/test/meson.build b/test/meson.build\n> index 50ec11853203..754527324c7d 100644\n> --- a/test/meson.build\n> +++ b/test/meson.build\n> @@ -12,8 +12,26 @@ test_includes_internal = [\n>    libcamera_internal_includes,\n>  ]\n>  \n> -test_init = executable('test_init', 'init.cpp',\n> -                       link_with : test_libraries,\n> -                       include_directories : test_includes_public)\n> +public_tests = [\n> +  [ 'test_init',      'init.cpp' ],\n> +]\n> +\n> +internal_tests = [\n> +\n> +]\n> +\n> +foreach t : public_tests\n> +  exe = executable(t[0], t[1],\n> +                   link_with : test_libraries,\n> +                   include_directories : test_includes_public)\n> +\n> +  test(t[0], exe)\n> +endforeach\n> +\n> +foreach t : internal_tests\n> +  exe = executable(t[0], t[1],\n> +                   link_with : test_libraries,\n> +                   include_directories : test_includes_internal)\n>  \n> -test('Initialisation test', test_init)\n> +  test(t[0], exe)\n> +endforeach\n> -- \n> 2.17.1\n> \n> _______________________________________________\n> libcamera-devel mailing list\n> libcamera-devel@lists.libcamera.org\n> https://lists.libcamera.org/listinfo/libcamera-devel","headers":{"Return-Path":"<niklas.soderlund@ragnatech.se>","Received":["from mail-lf1-x142.google.com (mail-lf1-x142.google.com\n\t[IPv6:2a00:1450:4864:20::142])\n\tby lancelot.ideasonboard.com (Postfix) with ESMTPS id 6B9AA600CC\n\tfor <libcamera-devel@lists.libcamera.org>;\n\tFri, 28 Dec 2018 03:34:48 +0100 (CET)","by mail-lf1-x142.google.com with SMTP id p86so13736383lfg.5\n\tfor <libcamera-devel@lists.libcamera.org>;\n\tThu, 27 Dec 2018 18:34:48 -0800 (PST)","from localhost (89-233-230-99.cust.bredband2.com. [89.233.230.99])\n\tby smtp.gmail.com with ESMTPSA id\n\t85-v6sm8407443lja.16.2018.12.27.18.34.46\n\t(version=TLS1_2 cipher=ECDHE-RSA-CHACHA20-POLY1305 bits=256/256);\n\tThu, 27 Dec 2018 18:34:46 -0800 (PST)"],"DKIM-Signature":"v=1; a=rsa-sha256; c=relaxed/relaxed;\n\td=ragnatech-se.20150623.gappssmtp.com; s=20150623;\n\th=date:from:to:cc:subject:message-id:references:mime-version\n\t:content-disposition:content-transfer-encoding:in-reply-to\n\t:user-agent; bh=jz2Z5bbXWaDsnEEe4oum1LmkjGJ1kkYeguIFXpaDu6M=;\n\tb=uTGJykLnzs8pRr3ofHgsSfhCzoh9ajfuqbXxIE7f0LuCXMsmmNB0wXryjwznaJmK9Q\n\t/0zhVoDRKO68/wdh6fFoxD/CUV4mDfouvTzOsFCKbB7gsZTZMmLexELPuYmC51SVHyRK\n\t66jQU8f6nHFMiYYnl/Qfheyxkd4J7zm+f0+rC/wi1JGqjE+Gb0m5KpJEWiAXAMoo5WOZ\n\tzsyMkIcZnjaV0mtrLKDPkztiBE0p/k23jVOleH7XT583xsYZETwyLYgtZ/u3ui+GOYj0\n\tamq4xdHxNLEi8gTEBDTIENNfE3WiHnc/Os6i07vertcn397mXuVi3uGd4CN1gOalwFE5\n\tw1rw==","X-Google-DKIM-Signature":"v=1; a=rsa-sha256; c=relaxed/relaxed;\n\td=1e100.net; s=20161025;\n\th=x-gm-message-state:date:from:to:cc:subject:message-id:references\n\t:mime-version:content-disposition:content-transfer-encoding\n\t:in-reply-to:user-agent;\n\tbh=jz2Z5bbXWaDsnEEe4oum1LmkjGJ1kkYeguIFXpaDu6M=;\n\tb=DOcpyat5/P20i6Xez2tMQQwcVCDiNFjCOu8NM7HdSfLR7up566RAf+ZgsXGoBANa/m\n\tulwckhqfmoZcF/hCJhkBMWXEVtd0KR3lu3A45kKEiIkF8SCLhZSpE0wBO/b9sLNSf0kj\n\tC51q0uloe8dhFdKY0koEbUWJIwqI+r5sz8XYVeHSTgcZuol6YndAzFUunesO/XGXOFCx\n\tFnzNqVnsCSvfpjIGs3WeKXJq5dJhbVtwLiBg8bhh2ZJcjexkW/9UX+FeXcEjdtksTg7N\n\tnx97CrDj1RGC5CoxsDwUiDhnexmcGuvr4wn1DerqBh0ygJSqcgt3kqJjjk4Nji4OY16/\n\tdhOQ==","X-Gm-Message-State":"AA+aEWajvwU9UJwmp2bctmAFIh9rq4yHihc2RXLSgzJzLo2uPBLMGOY7\n\tWBKqx6YceN4XhaOQMQ3dE7Ao7Q==","X-Google-Smtp-Source":"AFSGD/WIJT5YourXDJNtWCedW7ovihqLqubvMBrM0HRh2QOdN85AuqIq0gbsyVNKka5Mnq8/V0r6TA==","X-Received":"by 2002:a19:df41:: with SMTP id q1mr13666689lfj.25.1545964487438;\n\tThu, 27 Dec 2018 18:34:47 -0800 (PST)","Date":"Fri, 28 Dec 2018 03:34:45 +0100","From":"Niklas =?iso-8859-1?q?S=F6derlund?= <niklas.soderlund@ragnatech.se>","To":"Kieran Bingham <kieran.bingham@ideasonboard.com>","Cc":"LibCamera Devel <libcamera-devel@lists.libcamera.org>","Message-ID":"<20181228023445.GM19796@bigcity.dyn.berto.se>","References":"<20181221090804.8208-1-kieran.bingham@ideasonboard.com>","MIME-Version":"1.0","Content-Type":"text/plain; charset=iso-8859-1","Content-Disposition":"inline","Content-Transfer-Encoding":"8bit","In-Reply-To":"<20181221090804.8208-1-kieran.bingham@ideasonboard.com>","User-Agent":"Mutt/1.10.1 (2018-07-13)","Subject":"Re: [libcamera-devel] [PATCH] test: Use foreach iterators to\n\tsimplify definitions","X-BeenThere":"libcamera-devel@lists.libcamera.org","X-Mailman-Version":"2.1.23","Precedence":"list","List-Id":"<libcamera-devel.lists.libcamera.org>","List-Unsubscribe":"<https://lists.libcamera.org/options/libcamera-devel>,\n\t<mailto:libcamera-devel-request@lists.libcamera.org?subject=unsubscribe>","List-Archive":"<https://lists.libcamera.org/pipermail/libcamera-devel/>","List-Post":"<mailto:libcamera-devel@lists.libcamera.org>","List-Help":"<mailto:libcamera-devel-request@lists.libcamera.org?subject=help>","List-Subscribe":"<https://lists.libcamera.org/listinfo/libcamera-devel>,\n\t<mailto:libcamera-devel-request@lists.libcamera.org?subject=subscribe>","X-List-Received-Date":"Fri, 28 Dec 2018 02:34:48 -0000"}},{"id":159,"web_url":"https://patchwork.libcamera.org/comment/159/","msgid":"<1924990.X47Qy02nQ6@avalon>","date":"2018-12-31T09:12:06","subject":"Re: [libcamera-devel] [PATCH] test: Use foreach iterators to\n\tsimplify definitions","submitter":{"id":2,"url":"https://patchwork.libcamera.org/api/people/2/","name":"Laurent Pinchart","email":"laurent.pinchart@ideasonboard.com"},"content":"Hi Kieran,\n\nThank you for the patch.\n\nOn Friday, 21 December 2018 11:08:04 EET Kieran Bingham wrote:\n> Create two arrays, to contain public and internal test targets, and use\n> the foreach iterators to automatically generate test output targets for\n> each entry in each array.\n> \n> The public tests array is linked only against public libcamera headers,\n> while tests declared in the internal_tests will have access to\n> non-public API headers from within the libcamera sources.\n> \n> Signed-off-by: Kieran Bingham <kieran.bingham@ideasonboard.com>\n> ---\n> \n> This patch applies on top of the series \"[PATCH 0/5] test: Define\n> libtest\" just posted.\n> \n> \n>  test/meson.build | 26 ++++++++++++++++++++++----\n>  1 file changed, 22 insertions(+), 4 deletions(-)\n> \n> diff --git a/test/meson.build b/test/meson.build\n> index 50ec11853203..754527324c7d 100644\n> --- a/test/meson.build\n> +++ b/test/meson.build\n> @@ -12,8 +12,26 @@ test_includes_internal = [\n>    libcamera_internal_includes,\n>  ]\n> \n> -test_init = executable('test_init', 'init.cpp',\n> -                       link_with : test_libraries,\n> -                       include_directories : test_includes_public)\n> +public_tests = [\n> +  [ 'test_init',      'init.cpp' ],\n\nIndentation.\n\n> +]\n> +\n> +internal_tests = [\n> +\n\nExtraneous blank line.\n\nWith this fixed,\n\nReviewed-by: Laurent Pinchart <laurent.pinchart@ideasonboard.com>\n\n> +]\n> +\n> +foreach t : public_tests\n> +  exe = executable(t[0], t[1],\n> +                   link_with : test_libraries,\n> +                   include_directories : test_includes_public)\n> +\n> +  test(t[0], exe)\n> +endforeach\n> +\n> +foreach t : internal_tests\n> +  exe = executable(t[0], t[1],\n> +                   link_with : test_libraries,\n> +                   include_directories : test_includes_internal)\n> \n> -test('Initialisation test', test_init)\n> +  test(t[0], exe)\n> +endforeach","headers":{"Return-Path":"<laurent.pinchart@ideasonboard.com>","Received":["from perceval.ideasonboard.com (perceval.ideasonboard.com\n\t[IPv6:2001:4b98:dc2:55:216:3eff:fef7:d647])\n\tby lancelot.ideasonboard.com (Postfix) with ESMTPS id 83DCD60B2E\n\tfor <libcamera-devel@lists.libcamera.org>;\n\tMon, 31 Dec 2018 10:11:09 +0100 (CET)","from avalon.localnet (233.56-78-194.adsl-static.isp.belgacom.be\n\t[194.78.56.233])\n\tby perceval.ideasonboard.com (Postfix) with ESMTPSA id 010A150A;\n\tMon, 31 Dec 2018 10:11:08 +0100 (CET)"],"DKIM-Signature":"v=1; a=rsa-sha256; c=relaxed/simple; d=ideasonboard.com;\n\ts=mail; t=1546247469;\n\tbh=ncU61A1MjSRhI+njawzAC7m5d4SodN2o7nu1nEWMU7A=;\n\th=From:To:Cc:Subject:Date:In-Reply-To:References:From;\n\tb=cmuFywCX8FWED+6Nl1hOmtFm1Kbb7mMagwhYoIDlsQ8T1TsvVaGxTSwhKQhNNDabR\n\tZi4soKbIJwl0oH0RF8/hSUxPDUr351CcT2aa4rKt+soii8S8FJvq7evKFBzIXEc4Kr\n\tDscBaH6uBz6rN/EjOUL/1as8qLsr6P8KOxW5d/yY=","From":"Laurent Pinchart <laurent.pinchart@ideasonboard.com>","To":"libcamera-devel@lists.libcamera.org","Date":"Mon, 31 Dec 2018 11:12:06 +0200","Message-ID":"<1924990.X47Qy02nQ6@avalon>","Organization":"Ideas on Board Oy","In-Reply-To":"<20181221090804.8208-1-kieran.bingham@ideasonboard.com>","References":"<20181221090804.8208-1-kieran.bingham@ideasonboard.com>","MIME-Version":"1.0","Content-Transfer-Encoding":"7Bit","Content-Type":"text/plain; charset=\"us-ascii\"","Subject":"Re: [libcamera-devel] [PATCH] test: Use foreach iterators to\n\tsimplify definitions","X-BeenThere":"libcamera-devel@lists.libcamera.org","X-Mailman-Version":"2.1.23","Precedence":"list","List-Id":"<libcamera-devel.lists.libcamera.org>","List-Unsubscribe":"<https://lists.libcamera.org/options/libcamera-devel>,\n\t<mailto:libcamera-devel-request@lists.libcamera.org?subject=unsubscribe>","List-Archive":"<https://lists.libcamera.org/pipermail/libcamera-devel/>","List-Post":"<mailto:libcamera-devel@lists.libcamera.org>","List-Help":"<mailto:libcamera-devel-request@lists.libcamera.org?subject=help>","List-Subscribe":"<https://lists.libcamera.org/listinfo/libcamera-devel>,\n\t<mailto:libcamera-devel-request@lists.libcamera.org?subject=subscribe>","X-List-Received-Date":"Mon, 31 Dec 2018 09:11:09 -0000"}}]