[{"id":1073,"web_url":"https://patchwork.libcamera.org/comment/1073/","msgid":"<20190320161748.GA11558@bigcity.dyn.berto.se>","date":"2019-03-20T16:17:48","subject":"Re: [libcamera-devel] [PATCH] meson: Provide options to disable\n\ttest/docs","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 work.\n\nOn 2019-03-20 15:47:48 +0000, Kieran Bingham wrote:\n> It can be desirable to disable the compilation and processing of both\n> the test suite and documentation for use cases such as packaging to an\n> embedded target.\n> \n> Provide a new meson_options.txt file to allow disabling either or both\n> of the tests and documentation components of libcamera.\n> \n> These options can be provided at the initial configuration time, for\n> example:\n> \n>   meson build -Dtests=false -Ddocumentation=false\n\nThis seems to work as expected on my system :-)\n\nI'm a bit perplexed that options are enabled by default, my expectations \nlooking at the code would be that they would be disabled if not \nexplicitly enabled. But I assume this is just me struggling with \nwrapping my head around meson ;-P\n\n> \n> or by reconfiguring an existing build tree:\n> \n>   cd build\n>   meson configure -Ddocumentation=false\n>   meson configure -Dtests=false\n> \n> Signed-off-by: Kieran Bingham <kieran.bingham@ideasonboard.com>\n\nReviewed-by: Niklas Söderlund <niklas.soderlund@ragnatech.se>\n\n> ---\n>  meson.build       | 10 ++++++++--\n>  meson_options.txt |  2 ++\n>  2 files changed, 10 insertions(+), 2 deletions(-)\n>  create mode 100644 meson_options.txt\n> \n> diff --git a/meson.build b/meson.build\n> index 4465a3851a30..43d4a57602bb 100644\n> --- a/meson.build\n> +++ b/meson.build\n> @@ -27,9 +27,15 @@ libcamera_includes = include_directories('include')\n>  \n>  subdir('include')\n>  subdir('src')\n> -subdir('test')\n>  subdir('utils')\n> -subdir('Documentation')\n> +\n> +if get_option('tests')\n> +\tsubdir('test')\n> +endif\n> +\n> +if get_option('documentation')\n> +\tsubdir('Documentation')\n> +endif\n>  \n>  pkg_mod = import('pkgconfig')\n>  pkg_mod.generate(libraries : libcamera,\n> diff --git a/meson_options.txt b/meson_options.txt\n> new file mode 100644\n> index 000000000000..c5df661a2286\n> --- /dev/null\n> +++ b/meson_options.txt\n> @@ -0,0 +1,2 @@\n> +option('tests', type : 'boolean')\n> +option('documentation', type : 'boolean')\n> -- \n> 2.19.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-lj1-x242.google.com (mail-lj1-x242.google.com\n\t[IPv6:2a00:1450:4864:20::242])\n\tby lancelot.ideasonboard.com (Postfix) with ESMTPS id B71756110A\n\tfor <libcamera-devel@lists.libcamera.org>;\n\tWed, 20 Mar 2019 17:17:50 +0100 (CET)","by mail-lj1-x242.google.com with SMTP id k8so2768516lja.8\n\tfor <libcamera-devel@lists.libcamera.org>;\n\tWed, 20 Mar 2019 09:17:50 -0700 (PDT)","from localhost (89-233-230-99.cust.bredband2.com. [89.233.230.99])\n\tby smtp.gmail.com with ESMTPSA id\n\tf1sm410268ljf.40.2019.03.20.09.17.49\n\t(version=TLS1_2 cipher=ECDHE-RSA-CHACHA20-POLY1305 bits=256/256);\n\tWed, 20 Mar 2019 09:17:49 -0700 (PDT)"],"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=4HTLHet+cZfsaKjjtuT3EqcgLhmr5/BXANlZm7nSv2U=;\n\tb=bMZdSnOWSjV1k8s6ztg5x9uuWnHEBuubUoGJLIOrka+Hh+9QbpzC4SDBdZG1fXOJCl\n\tXdcAkEisVT7Lq+A5VlO0apvplKG+WjwQR2R7JFTjGAoqZQMc97ZJcTzpIJjbCuHGcklm\n\t5fz3WC4/u84E9B48S4zV6nvENQvDZlPHfmu8tfdYc6BJvYj81D5U8mTIc+QZB9FuyaY7\n\t2102iAQVTrBlGD2lv+9d8SFobX88Kx8+pbfNtVhUFWTYnRXqlj7UdT4yD9JS72Lm+qR+\n\tDfxaQ7ZMgWS0Q9wwY8eQGlM7cz54b5MiHeGcIi+M3niTGsewn1FPU5ZFSxy2afmaNjxf\n\tCVHw==","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=4HTLHet+cZfsaKjjtuT3EqcgLhmr5/BXANlZm7nSv2U=;\n\tb=eVMtBF8xQRUFl5KoVk2OBmFSY2NsuRibGYVh4TCtaGcN4yEKLH/G/+aqZ83sL1Cq2z\n\th9CJ9v2m9dmgOEBrrYEE8M/0iYXdyYvTwEZaJCo+ptnvVyAzYXig7s7VNdZaiQu8qyeK\n\tjLahH8ZJ/JHsiagXoI7sLctItphWPZqopI1ylBQ5vWLg7ZjtBC9YIPrqMWcpSPqILz2Q\n\t3B8v37IGu4BV0crksttah0NIS37lC9Rd5ev+2skNHAqj7bR9lbPYFT9j92NNmoqtHBsz\n\tDg2N/rF00dPSB87mt1tQ94izGqAWGyXIGgg+11h+ttNsxsx0IBGbHBDC+/bepjy1VhnR\n\tXHGw==","X-Gm-Message-State":"APjAAAUe280AAPCmycDdKyWTs68vO9Czo5waqSvEngDjUo5TDJrMmynG\n\to6zTJ0YIJ3CfMi7rvN6mCRuSsd+X9Q0=","X-Google-Smtp-Source":"APXvYqyp25do1CWDkxOr/T5TI5bE5IZ4WBmH2jg6bSFizSYlYxX/NnlZZ/3YImHZ5DY3hn2qo5Kd2w==","X-Received":"by 2002:a2e:6801:: with SMTP id c1mr18762167lja.81.1553098669895;\n\tWed, 20 Mar 2019 09:17:49 -0700 (PDT)","Date":"Wed, 20 Mar 2019 17:17:48 +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":"<20190320161748.GA11558@bigcity.dyn.berto.se>","References":"<20190320154748.27326-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":"<20190320154748.27326-1-kieran.bingham@ideasonboard.com>","User-Agent":"Mutt/1.11.3 (2019-02-01)","Subject":"Re: [libcamera-devel] [PATCH] meson: Provide options to disable\n\ttest/docs","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":"Wed, 20 Mar 2019 16:17:51 -0000"}},{"id":1074,"web_url":"https://patchwork.libcamera.org/comment/1074/","msgid":"<1513bb26-3178-0402-0592-559b6a3607ac@ideasonboard.com>","date":"2019-03-20T16:20:56","subject":"Re: [libcamera-devel] [PATCH] meson: Provide options to disable\n\ttest/docs","submitter":{"id":4,"url":"https://patchwork.libcamera.org/api/people/4/","name":"Kieran Bingham","email":"kieran.bingham@ideasonboard.com"},"content":"Hi Niklas,\n\nOn 20/03/2019 16:17, Niklas Söderlund wrote:\n> Hi Kieran,\n> \n> Thanks for your work.\n> \n> On 2019-03-20 15:47:48 +0000, Kieran Bingham wrote:\n>> It can be desirable to disable the compilation and processing of both\n>> the test suite and documentation for use cases such as packaging to an\n>> embedded target.\n>>\n>> Provide a new meson_options.txt file to allow disabling either or both\n>> of the tests and documentation components of libcamera.\n>>\n>> These options can be provided at the initial configuration time, for\n>> example:\n>>\n>>   meson build -Dtests=false -Ddocumentation=false\n> \n> This seems to work as expected on my system :-)\n> \n> I'm a bit perplexed that options are enabled by default, my expectations \n> looking at the code would be that they would be disabled if not \n> explicitly enabled. But I assume this is just me struggling with \n> wrapping my head around meson ;-P\n\n\nhttps://mesonbuild.com/Build-options.html#booleans\n\n> Booleans may have values of either true or false. If no default value is supplied then true will be used as the default.\n\nI can append a \" value : true\" to the option to make this clearer if you\nprefer?\n\n--\nRegards\n\nKieran\n\n\n>> or by reconfiguring an existing build tree:\n>>\n>>   cd build\n>>   meson configure -Ddocumentation=false\n>>   meson configure -Dtests=false\n>>\n>> Signed-off-by: Kieran Bingham <kieran.bingham@ideasonboard.com>\n> \n> Reviewed-by: Niklas Söderlund <niklas.soderlund@ragnatech.se>\n> \n>> ---\n>>  meson.build       | 10 ++++++++--\n>>  meson_options.txt |  2 ++\n>>  2 files changed, 10 insertions(+), 2 deletions(-)\n>>  create mode 100644 meson_options.txt\n>>\n>> diff --git a/meson.build b/meson.build\n>> index 4465a3851a30..43d4a57602bb 100644\n>> --- a/meson.build\n>> +++ b/meson.build\n>> @@ -27,9 +27,15 @@ libcamera_includes = include_directories('include')\n>>  \n>>  subdir('include')\n>>  subdir('src')\n>> -subdir('test')\n>>  subdir('utils')\n>> -subdir('Documentation')\n>> +\n>> +if get_option('tests')\n>> +\tsubdir('test')\n>> +endif\n>> +\n>> +if get_option('documentation')\n>> +\tsubdir('Documentation')\n>> +endif\n>>  \n>>  pkg_mod = import('pkgconfig')\n>>  pkg_mod.generate(libraries : libcamera,\n>> diff --git a/meson_options.txt b/meson_options.txt\n>> new file mode 100644\n>> index 000000000000..c5df661a2286\n>> --- /dev/null\n>> +++ b/meson_options.txt\n>> @@ -0,0 +1,2 @@\n>> +option('tests', type : 'boolean')\n>> +option('documentation', type : 'boolean')\n>> -- \n>> 2.19.1\n>>\n>> _______________________________________________\n>> libcamera-devel mailing list\n>> libcamera-devel@lists.libcamera.org\n>> https://lists.libcamera.org/listinfo/libcamera-devel\n>","headers":{"Return-Path":"<kieran.bingham@ideasonboard.com>","Received":["from perceval.ideasonboard.com (perceval.ideasonboard.com\n\t[213.167.242.64])\n\tby lancelot.ideasonboard.com (Postfix) with ESMTPS id 2485C6110A\n\tfor <libcamera-devel@lists.libcamera.org>;\n\tWed, 20 Mar 2019 17:21:00 +0100 (CET)","from [192.168.0.20]\n\t(cpc89242-aztw30-2-0-cust488.18-1.cable.virginm.net [86.31.129.233])\n\tby perceval.ideasonboard.com (Postfix) with ESMTPSA id 925C92D0;\n\tWed, 20 Mar 2019 17:20:59 +0100 (CET)"],"DKIM-Signature":"v=1; a=rsa-sha256; c=relaxed/simple; d=ideasonboard.com;\n\ts=mail; t=1553098859;\n\tbh=zFdlC4M4w+vTMF06hh0JkX0yd9lg3Vi6eg6Y9N9+tDw=;\n\th=Reply-To:Subject:To:Cc:References:From:Date:In-Reply-To:From;\n\tb=X5FdySP3G1WOnoLfQrT0OM1EHGDP0wVlP0RWWntgqt76N4ePXEzKtt2gSJTRUZW+X\n\tqSKA6xfdZAdcfaQGncGq6/veq8/MWJfMYA5ieIiL7+MOYsqgVHTL4UxhXTBjtIulAe\n\tQUBrrahJSDwoJnoJPebFSZPxx6HgN4g1g1HCR/LQ=","Reply-To":"kieran.bingham@ideasonboard.com","To":"=?utf-8?q?Niklas_S=C3=B6derlund?= <niklas.soderlund@ragnatech.se>","Cc":"LibCamera Devel <libcamera-devel@lists.libcamera.org>","References":"<20190320154748.27326-1-kieran.bingham@ideasonboard.com>\n\t<20190320161748.GA11558@bigcity.dyn.berto.se>","From":"Kieran Bingham <kieran.bingham@ideasonboard.com>","Openpgp":"preference=signencrypt","Autocrypt":"addr=kieran.bingham@ideasonboard.com; keydata=\n\tmQINBFYE/WYBEACs1PwjMD9r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 20 Mar 2019 16:20:56 +0000","User-Agent":"Mozilla/5.0 (X11; Linux x86_64; rv:60.0) Gecko/20100101\n\tThunderbird/60.5.1","MIME-Version":"1.0","In-Reply-To":"<20190320161748.GA11558@bigcity.dyn.berto.se>","Content-Type":"text/plain; charset=utf-8","Content-Language":"en-GB","Content-Transfer-Encoding":"8bit","Subject":"Re: [libcamera-devel] [PATCH] meson: Provide options to disable\n\ttest/docs","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":"Wed, 20 Mar 2019 16:21:00 -0000"}},{"id":1075,"web_url":"https://patchwork.libcamera.org/comment/1075/","msgid":"<20190320162551.GC11558@bigcity.dyn.berto.se>","date":"2019-03-20T16:25:51","subject":"Re: [libcamera-devel] [PATCH] meson: Provide options to disable\n\ttest/docs","submitter":{"id":5,"url":"https://patchwork.libcamera.org/api/people/5/","name":"Niklas Söderlund","email":"niklas.soderlund@ragnatech.se"},"content":"Hi Kieran,\n\nOn 2019-03-20 16:20:56 +0000, Kieran Bingham wrote:\n> Hi Niklas,\n> \n> On 20/03/2019 16:17, Niklas Söderlund wrote:\n> > Hi Kieran,\n> > \n> > Thanks for your work.\n> > \n> > On 2019-03-20 15:47:48 +0000, Kieran Bingham wrote:\n> >> It can be desirable to disable the compilation and processing of both\n> >> the test suite and documentation for use cases such as packaging to an\n> >> embedded target.\n> >>\n> >> Provide a new meson_options.txt file to allow disabling either or both\n> >> of the tests and documentation components of libcamera.\n> >>\n> >> These options can be provided at the initial configuration time, for\n> >> example:\n> >>\n> >>   meson build -Dtests=false -Ddocumentation=false\n> > \n> > This seems to work as expected on my system :-)\n> > \n> > I'm a bit perplexed that options are enabled by default, my expectations \n> > looking at the code would be that they would be disabled if not \n> > explicitly enabled. But I assume this is just me struggling with \n> > wrapping my head around meson ;-P\n> \n> \n> https://mesonbuild.com/Build-options.html#booleans\n> \n> > Booleans may have values of either true or false. If no default value is supplied then true will be used as the default.\n> \n> I can append a \" value : true\" to the option to make this clearer if you\n> prefer?\n\nNo the default behavior is fine, in fact I prefers to only modify things \nif needed. I was just pointing out that without your example of that \nexplicitly disabling the options I would have assumed that we would not \nbuild tests or documentation by default. Now I know how meson works so \nit's fine from my point of view, thanks :-)\n\n> \n> --\n> Regards\n> \n> Kieran\n> \n> \n> >> or by reconfiguring an existing build tree:\n> >>\n> >>   cd build\n> >>   meson configure -Ddocumentation=false\n> >>   meson configure -Dtests=false\n> >>\n> >> Signed-off-by: Kieran Bingham <kieran.bingham@ideasonboard.com>\n> > \n> > Reviewed-by: Niklas Söderlund <niklas.soderlund@ragnatech.se>\n> > \n> >> ---\n> >>  meson.build       | 10 ++++++++--\n> >>  meson_options.txt |  2 ++\n> >>  2 files changed, 10 insertions(+), 2 deletions(-)\n> >>  create mode 100644 meson_options.txt\n> >>\n> >> diff --git a/meson.build b/meson.build\n> >> index 4465a3851a30..43d4a57602bb 100644\n> >> --- a/meson.build\n> >> +++ b/meson.build\n> >> @@ -27,9 +27,15 @@ libcamera_includes = include_directories('include')\n> >>  \n> >>  subdir('include')\n> >>  subdir('src')\n> >> -subdir('test')\n> >>  subdir('utils')\n> >> -subdir('Documentation')\n> >> +\n> >> +if get_option('tests')\n> >> +\tsubdir('test')\n> >> +endif\n> >> +\n> >> +if get_option('documentation')\n> >> +\tsubdir('Documentation')\n> >> +endif\n> >>  \n> >>  pkg_mod = import('pkgconfig')\n> >>  pkg_mod.generate(libraries : libcamera,\n> >> diff --git a/meson_options.txt b/meson_options.txt\n> >> new file mode 100644\n> >> index 000000000000..c5df661a2286\n> >> --- /dev/null\n> >> +++ b/meson_options.txt\n> >> @@ -0,0 +1,2 @@\n> >> +option('tests', type : 'boolean')\n> >> +option('documentation', type : 'boolean')\n> >> -- \n> >> 2.19.1\n> >>\n> >> _______________________________________________\n> >> libcamera-devel mailing list\n> >> libcamera-devel@lists.libcamera.org\n> >> https://lists.libcamera.org/listinfo/libcamera-devel\n> > \n> \n> -- \n> Regards\n> --\n> Kieran","headers":{"Return-Path":"<niklas.soderlund@ragnatech.se>","Received":["from mail-lf1-x133.google.com (mail-lf1-x133.google.com\n\t[IPv6:2a00:1450:4864:20::133])\n\tby lancelot.ideasonboard.com (Postfix) with ESMTPS id 3E4486110A\n\tfor <libcamera-devel@lists.libcamera.org>;\n\tWed, 20 Mar 2019 17:25:53 +0100 (CET)","by mail-lf1-x133.google.com with SMTP id m13so2363705lfb.6\n\tfor <libcamera-devel@lists.libcamera.org>;\n\tWed, 20 Mar 2019 09:25:53 -0700 (PDT)","from localhost (89-233-230-99.cust.bredband2.com. [89.233.230.99])\n\tby smtp.gmail.com with ESMTPSA id\n\tq17sm453511lfb.13.2019.03.20.09.25.51\n\t(version=TLS1_2 cipher=ECDHE-RSA-CHACHA20-POLY1305 bits=256/256);\n\tWed, 20 Mar 2019 09:25:51 -0700 (PDT)"],"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=pskp7Q7dLW3qfWTnEiOe9rFeFBh6LEzwgyMQ6JEZKqU=;\n\tb=hKCZRIF7z1rm+w/5vsdunOy+saQfu+0Ui1wgyXMU55GN/bVaLXUbmUIxNdjesHv6jO\n\tnwcRB6liEG1v+VQ+MyMVl7D5UG6bq+39QdxRdDdFB9BybL3CuMmFTdCywAkAqfd7afZ4\n\tuoTScT+uqD4zKFgIpM6Clx1xFDLrp3+VNN9bsml2M4qpIqF3dL8vSX5IaP3TQM5zbjzh\n\tNM2jp0AILlQirwg9P6ZS+u5qW9FHnIhuGuWSelK2TbgreVYg/5x4xlv+GNJnTyD/fBn3\n\tNC4l7MiZjzemYvujyWmtUCH37hTZkHfq0Y9PbLLr66/QRk1Kb6am1VaXuuSioZdxANkr\n\t+BKA==","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=pskp7Q7dLW3qfWTnEiOe9rFeFBh6LEzwgyMQ6JEZKqU=;\n\tb=IUN/24pZ83XU04eKR8K9CmM8dLziyOM6ORHD3loOcnpB3PxnPWJRfzWECjZ1RvHYwn\n\tXpSoPaBA/cV8LPLpP7xIxC7YPI21gwf3Xg+xBBUN3LKZ/vm3vcjAvh9rgQ3RBu82+lzC\n\tIzvA9Axar+UXRyCFV/Ip+VdMnI3rVn86E/Z5YZORpJR6XYDu6Y8wYXEFYSvgxzBWXd8z\n\t/POS8qLZberUoSMnUrjW1ZBAB6mfq+dtZ2IO6fGY7tljcf5MzEnSjtLhfZWg9ldx/IsC\n\tryogxTRO3p/toeQum8aIiQNt1O5J44sp3x8olUEyZ+XhkSpyNOaqMm+VF8xsjHGpaYhc\n\thXTQ==","X-Gm-Message-State":"APjAAAXfZp4XHaMlHzqhD/m53ausO72Id1ekgmHV1nutk/Aa9hVouFkT\n\tnp0JomrUk3gzUSpGeNpRY0rGrQ==","X-Google-Smtp-Source":"APXvYqwz1420SxstNW2pkFpFBYppQiqdZM7mtwUsyM6iOgHMoJPUWcK1fHb+oOVQ2tS6DI38IDpdQw==","X-Received":"by 2002:a19:d144:: with SMTP id i65mr2634026lfg.52.1553099152489;\n\tWed, 20 Mar 2019 09:25:52 -0700 (PDT)","Date":"Wed, 20 Mar 2019 17:25:51 +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":"<20190320162551.GC11558@bigcity.dyn.berto.se>","References":"<20190320154748.27326-1-kieran.bingham@ideasonboard.com>\n\t<20190320161748.GA11558@bigcity.dyn.berto.se>\n\t<1513bb26-3178-0402-0592-559b6a3607ac@ideasonboard.com>","MIME-Version":"1.0","Content-Type":"text/plain; charset=iso-8859-1","Content-Disposition":"inline","Content-Transfer-Encoding":"8bit","In-Reply-To":"<1513bb26-3178-0402-0592-559b6a3607ac@ideasonboard.com>","User-Agent":"Mutt/1.11.3 (2019-02-01)","Subject":"Re: [libcamera-devel] [PATCH] meson: Provide options to disable\n\ttest/docs","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":"Wed, 20 Mar 2019 16:25:53 -0000"}},{"id":1079,"web_url":"https://patchwork.libcamera.org/comment/1079/","msgid":"<20190321083532.GC4615@pendragon.ideasonboard.com>","date":"2019-03-21T08:35:32","subject":"Re: [libcamera-devel] [PATCH] meson: Provide options to disable\n\ttest/docs","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 Wed, Mar 20, 2019 at 03:47:48PM +0000, Kieran Bingham wrote:\n> It can be desirable to disable the compilation and processing of both\n> the test suite and documentation for use cases such as packaging to an\n> embedded target.\n> \n> Provide a new meson_options.txt file to allow disabling either or both\n> of the tests and documentation components of libcamera.\n> \n> These options can be provided at the initial configuration time, for\n> example:\n> \n>   meson build -Dtests=false -Ddocumentation=false\n> \n> or by reconfiguring an existing build tree:\n> \n>   cd build\n>   meson configure -Ddocumentation=false\n>   meson configure -Dtests=false\n> \n> Signed-off-by: Kieran Bingham <kieran.bingham@ideasonboard.com>\n> ---\n>  meson.build       | 10 ++++++++--\n>  meson_options.txt |  2 ++\n>  2 files changed, 10 insertions(+), 2 deletions(-)\n>  create mode 100644 meson_options.txt\n> \n> diff --git a/meson.build b/meson.build\n> index 4465a3851a30..43d4a57602bb 100644\n> --- a/meson.build\n> +++ b/meson.build\n> @@ -27,9 +27,15 @@ libcamera_includes = include_directories('include')\n>  \n>  subdir('include')\n>  subdir('src')\n> -subdir('test')\n>  subdir('utils')\n> -subdir('Documentation')\n> +\n> +if get_option('tests')\n> +\tsubdir('test')\n> +endif\n\nmeson.build files use spaces for indentation.\n\n> +\n> +if get_option('documentation')\n> +\tsubdir('Documentation')\n> +endif\n\nI would have kept these alphabetically sorted.\n\n>  pkg_mod = import('pkgconfig')\n>  pkg_mod.generate(libraries : libcamera,\n> diff --git a/meson_options.txt b/meson_options.txt\n> new file mode 100644\n> index 000000000000..c5df661a2286\n> --- /dev/null\n> +++ b/meson_options.txt\n> @@ -0,0 +1,2 @@\n> +option('tests', type : 'boolean')\n> +option('documentation', type : 'boolean')\n\nShouldn't this be sorted alphabetically ? Please also add descriptions\nto those options.\n\nIt seems the patch has been pushed already, could you please fix this on\ntop ?","headers":{"Return-Path":"<laurent.pinchart@ideasonboard.com>","Received":["from perceval.ideasonboard.com (perceval.ideasonboard.com\n\t[213.167.242.64])\n\tby lancelot.ideasonboard.com (Postfix) with ESMTPS id C2DE9600F9\n\tfor <libcamera-devel@lists.libcamera.org>;\n\tThu, 21 Mar 2019 09:35:43 +0100 (CET)","from pendragon.ideasonboard.com (30.net042126252.t-com.ne.jp\n\t[42.126.252.30])\n\tby perceval.ideasonboard.com (Postfix) with ESMTPSA id 658F623A;\n\tThu, 21 Mar 2019 09:35:42 +0100 (CET)"],"DKIM-Signature":"v=1; a=rsa-sha256; c=relaxed/simple; d=ideasonboard.com;\n\ts=mail; t=1553157343;\n\tbh=1mjZTQ614xi8+tSU6a4BtTwp7RtEvzTNWHEawlB84bs=;\n\th=Date:From:To:Cc:Subject:References:In-Reply-To:From;\n\tb=RVR+V0+pSuwGQtjj5nznfbXVYcMfKtayGcy/VSo4qCQUZ6oGIXwWqsoK4h9vPRttA\n\tT7VUOkb/6H20NoJ/p2FA6AGSpb3eFQ/qnlBLoN1qAfERzuKw48cJXdGelrj5hNgVnx\n\tZSCqDmKsBPW/2KTXqauL0tK5MuGlFwuHBG8qk7/g=","Date":"Thu, 21 Mar 2019 10:35:32 +0200","From":"Laurent Pinchart <laurent.pinchart@ideasonboard.com>","To":"Kieran Bingham <kieran.bingham@ideasonboard.com>","Cc":"LibCamera Devel <libcamera-devel@lists.libcamera.org>","Message-ID":"<20190321083532.GC4615@pendragon.ideasonboard.com>","References":"<20190320154748.27326-1-kieran.bingham@ideasonboard.com>","MIME-Version":"1.0","Content-Type":"text/plain; charset=utf-8","Content-Disposition":"inline","In-Reply-To":"<20190320154748.27326-1-kieran.bingham@ideasonboard.com>","User-Agent":"Mutt/1.10.1 (2018-07-13)","Subject":"Re: [libcamera-devel] [PATCH] meson: Provide options to disable\n\ttest/docs","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":"Thu, 21 Mar 2019 08:35:44 -0000"}},{"id":1097,"web_url":"https://patchwork.libcamera.org/comment/1097/","msgid":"<570578f8-50e3-a3e0-84d9-7746835bec6b@ideasonboard.com>","date":"2019-03-22T11:49:19","subject":"Re: [libcamera-devel] [PATCH] meson: Provide options to disable\n\ttest/docs","submitter":{"id":4,"url":"https://patchwork.libcamera.org/api/people/4/","name":"Kieran Bingham","email":"kieran.bingham@ideasonboard.com"},"content":"Hi Laurent,\n\nOn 21/03/2019 08:35, Laurent Pinchart wrote:\n> Hi Kieran,\n> \n> Thank you for the patch.\n> \n> On Wed, Mar 20, 2019 at 03:47:48PM +0000, Kieran Bingham wrote:\n>> It can be desirable to disable the compilation and processing of both\n>> the test suite and documentation for use cases such as packaging to an\n>> embedded target.\n>>\n>> Provide a new meson_options.txt file to allow disabling either or both\n>> of the tests and documentation components of libcamera.\n>>\n>> These options can be provided at the initial configuration time, for\n>> example:\n>>\n>>   meson build -Dtests=false -Ddocumentation=false\n>>\n>> or by reconfiguring an existing build tree:\n>>\n>>   cd build\n>>   meson configure -Ddocumentation=false\n>>   meson configure -Dtests=false\n>>\n>> Signed-off-by: Kieran Bingham <kieran.bingham@ideasonboard.com>\n>> ---\n>>  meson.build       | 10 ++++++++--\n>>  meson_options.txt |  2 ++\n>>  2 files changed, 10 insertions(+), 2 deletions(-)\n>>  create mode 100644 meson_options.txt\n>>\n>> diff --git a/meson.build b/meson.build\n>> index 4465a3851a30..43d4a57602bb 100644\n>> --- a/meson.build\n>> +++ b/meson.build\n>> @@ -27,9 +27,15 @@ libcamera_includes = include_directories('include')\n>>  \n>>  subdir('include')\n>>  subdir('src')\n>> -subdir('test')\n>>  subdir('utils')\n>> -subdir('Documentation')\n>> +\n>> +if get_option('tests')\n>> +\tsubdir('test')\n>> +endif\n> \n> meson.build files use spaces for indentation.\n\nArgh, yes - is it feasible to get that into our checkstyle script?\n\n\n>> +\n>> +if get_option('documentation')\n>> +\tsubdir('Documentation')\n>> +endif\n> \n> I would have kept these alphabetically sorted.\n\nDo you mean keep it in the subdir block above? I moved them out because\nthey were now optional.\n\nOh or ... D before T at least :-)\n\n\n>>  pkg_mod = import('pkgconfig')\n>>  pkg_mod.generate(libraries : libcamera,\n>> diff --git a/meson_options.txt b/meson_options.txt\n>> new file mode 100644\n>> index 000000000000..c5df661a2286\n>> --- /dev/null\n>> +++ b/meson_options.txt\n>> @@ -0,0 +1,2 @@\n>> +option('tests', type : 'boolean')\n>> +option('documentation', type : 'boolean')\n> \n> Shouldn't this be sorted alphabetically ? Please also add descriptions\n> to those options.\n\nAha - Yes, I didn't see they could have descriptions added.\n\nI'll put that in.\n\n\n> \n> It seems the patch has been pushed already, could you please fix this on\n> top ?\n\n\nAn initial fix up sent as part of a cleanup series :)","headers":{"Return-Path":"<kieran.bingham@ideasonboard.com>","Received":["from perceval.ideasonboard.com (perceval.ideasonboard.com\n\t[213.167.242.64])\n\tby lancelot.ideasonboard.com (Postfix) with ESMTPS id E5982600F9\n\tfor <libcamera-devel@lists.libcamera.org>;\n\tFri, 22 Mar 2019 12:49:23 +0100 (CET)","from [192.168.0.20]\n\t(cpc89242-aztw30-2-0-cust488.18-1.cable.virginm.net [86.31.129.233])\n\tby perceval.ideasonboard.com (Postfix) with ESMTPSA id 3C4F82DE;\n\tFri, 22 Mar 2019 12:49:23 +0100 (CET)"],"DKIM-Signature":"v=1; a=rsa-sha256; c=relaxed/simple; d=ideasonboard.com;\n\ts=mail; t=1553255363;\n\tbh=BgR0BlUoBw3CLTij34LBCJAq1JycU+Ko7V3gYQPVnPo=;\n\th=Reply-To:Subject:To:Cc:References:From:Date:In-Reply-To:From;\n\tb=e2bhFR+OgFhVCo4Hn8VauhzuC6uvgLeB/A6Ao0iyUqpefBp+sDfAMAdBCx89V0GWX\n\ttrAq+5BA/g40z3ndEC5RqEjTekbw3F+9DLWCu2lqoxk8wyPIqT+uOht6JIFq0uHFSo\n\tJX0+axzMYEqKuEA/Q5dFsQS87YXxpmrToDf4TxCY=","Reply-To":"kieran.bingham@ideasonboard.com","To":"Laurent Pinchart <laurent.pinchart@ideasonboard.com>","Cc":"LibCamera Devel <libcamera-devel@lists.libcamera.org>","References":"<20190320154748.27326-1-kieran.bingham@ideasonboard.com>\n\t<20190321083532.GC4615@pendragon.ideasonboard.com>","From":"Kieran Bingham <kieran.bingham@ideasonboard.com>","Openpgp":"preference=signencrypt","Autocrypt":"addr=kieran.bingham@ideasonboard.com; keydata=\n\tmQINBFYE/WYBEACs1PwjMD9rgCu1hlIiUA1AXR4rv2v+BCLUq//vrX5S5bjzxKAryRf0uHat\n\tV/zwz6hiDrZuHUACDB7X8OaQcwhLaVlq6byfoBr25+hbZG7G3+5EUl9cQ7dQEdvNj6V6y/SC\n\trRanWfelwQThCHckbobWiQJfK9n7rYNcPMq9B8e9F020LFH7Kj6YmO95ewJGgLm+idg1Kb3C\n\tpotzWkXc1xmPzcQ1fvQMOfMwdS+4SNw4rY9f07Xb2K99rjMwZVDgESKIzhsDB5GY465sCsiQ\n\tcSAZRxqE49RTBq2+EQsbrQpIc8XiffAB8qexh5/QPzCmR4kJgCGeHIXBtgRj+nIkCJPZvZtf\n\tKr2EAbc6tgg6DkAEHJb+1okosV09+0+TXywYvtEop/WUOWQ+zo+Y/OBd+8Ptgt1pDRyOBzL8\n\tRXa8ZqRf0Mwg75D+dKntZeJHzPRJyrlfQokngAAs4PaFt6UfS+ypMAF37T6CeDArQC41V3ko\n\tlPn1yMsVD0p+6i3DPvA/GPIksDC4owjnzVX9kM8Zc5Cx+XoAN0w5Eqo4t6qEVbuettxx55gq\n\t8K8FieAjgjMSxngo/HST8TpFeqI5nVeq0/lqtBRQ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VmiWkqDkT4qMA+4q1y/dWwshSKi/uwVZNycuLsz+\n\t+OD8xPNCsMTqeUkAKfbD8xW4LCay3r/dD2ckoxRxtMD9eOAyu5wYzo/ydIPTh1QEj9SYyvp8\n\tO0g6CpxEwyHUQtF5oh15O018z3ZLztFJKR3RD42VKVsrnNDKnoY0f4U0z7eJv2NeF8xHMuiU\n\tRCIzqxX1GVYaNkKTnb/Qja8hnYnkUzY1Lc+OtwiGmXTwYsPZjjAaDX35J/RSKAoy5wGo/YFA\n\tJxB1gWThL4kOTbsqqXj9GLcyOImkW0lJGGR3o/fV91Zh63S5TKnf2YGGGzxki+ADdxVQAm+Q\n\tsbsRB8KNNvVXBOVNwko86rQqF9drZuw=","Organization":"Ideas on Board","Message-ID":"<570578f8-50e3-a3e0-84d9-7746835bec6b@ideasonboard.com>","Date":"Fri, 22 Mar 2019 11:49:19 +0000","User-Agent":"Mozilla/5.0 (X11; Linux x86_64; rv:60.0) Gecko/20100101\n\tThunderbird/60.5.1","MIME-Version":"1.0","In-Reply-To":"<20190321083532.GC4615@pendragon.ideasonboard.com>","Content-Type":"text/plain; charset=utf-8","Content-Language":"en-GB","Content-Transfer-Encoding":"8bit","Subject":"Re: [libcamera-devel] [PATCH] meson: Provide options to disable\n\ttest/docs","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, 22 Mar 2019 11:49:24 -0000"}},{"id":1098,"web_url":"https://patchwork.libcamera.org/comment/1098/","msgid":"<20190322221907.GA4572@pendragon.ideasonboard.com>","date":"2019-03-22T22:19:07","subject":"Re: [libcamera-devel] [PATCH] meson: Provide options to disable\n\ttest/docs","submitter":{"id":2,"url":"https://patchwork.libcamera.org/api/people/2/","name":"Laurent Pinchart","email":"laurent.pinchart@ideasonboard.com"},"content":"Hi Kieran,\n\nOn Fri, Mar 22, 2019 at 11:49:19AM +0000, Kieran Bingham wrote:\n> On 21/03/2019 08:35, Laurent Pinchart wrote:\n> > On Wed, Mar 20, 2019 at 03:47:48PM +0000, Kieran Bingham wrote:\n> >> It can be desirable to disable the compilation and processing of both\n> >> the test suite and documentation for use cases such as packaging to an\n> >> embedded target.\n> >>\n> >> Provide a new meson_options.txt file to allow disabling either or both\n> >> of the tests and documentation components of libcamera.\n> >>\n> >> These options can be provided at the initial configuration time, for\n> >> example:\n> >>\n> >>   meson build -Dtests=false -Ddocumentation=false\n> >>\n> >> or by reconfiguring an existing build tree:\n> >>\n> >>   cd build\n> >>   meson configure -Ddocumentation=false\n> >>   meson configure -Dtests=false\n> >>\n> >> Signed-off-by: Kieran Bingham <kieran.bingham@ideasonboard.com>\n> >> ---\n> >>  meson.build       | 10 ++++++++--\n> >>  meson_options.txt |  2 ++\n> >>  2 files changed, 10 insertions(+), 2 deletions(-)\n> >>  create mode 100644 meson_options.txt\n> >>\n> >> diff --git a/meson.build b/meson.build\n> >> index 4465a3851a30..43d4a57602bb 100644\n> >> --- a/meson.build\n> >> +++ b/meson.build\n> >> @@ -27,9 +27,15 @@ libcamera_includes = include_directories('include')\n> >>  \n> >>  subdir('include')\n> >>  subdir('src')\n> >> -subdir('test')\n> >>  subdir('utils')\n> >> -subdir('Documentation')\n> >> +\n> >> +if get_option('tests')\n> >> +\tsubdir('test')\n> >> +endif\n> > \n> > meson.build files use spaces for indentation.\n> \n> Argh, yes - is it feasible to get that into our checkstyle script?\n\nSure. Feel free to propose a patch ;-) checkstyle.py currently ignores\nnon C(++) files. It shouldn't be difficult to add languages to\navailable_formatters (probably in the form of a language class that\nwould provide an identification function, which can be based on file\nnames), and then run all available formatters that support the language\nof the file being checked.\n\n> >> +\n> >> +if get_option('documentation')\n> >> +\tsubdir('Documentation')\n> >> +endif\n> > \n> > I would have kept these alphabetically sorted.\n> \n> Do you mean keep it in the subdir block above? I moved them out because\n> they were now optional.\n> \n> Oh or ... D before T at least :-)\n\nI think I just wouldn't move them out.\n\n> >>  pkg_mod = import('pkgconfig')\n> >>  pkg_mod.generate(libraries : libcamera,\n> >> diff --git a/meson_options.txt b/meson_options.txt\n> >> new file mode 100644\n> >> index 000000000000..c5df661a2286\n> >> --- /dev/null\n> >> +++ b/meson_options.txt\n> >> @@ -0,0 +1,2 @@\n> >> +option('tests', type : 'boolean')\n> >> +option('documentation', type : 'boolean')\n> > \n> > Shouldn't this be sorted alphabetically ? Please also add descriptions\n> > to those options.\n> \n> Aha - Yes, I didn't see they could have descriptions added.\n> \n> I'll put that in.\n> \n> > It seems the patch has been pushed already, could you please fix this on\n> > top ?\n> \n> An initial fix up sent as part of a cleanup series :)\n\nThank you.","headers":{"Return-Path":"<laurent.pinchart@ideasonboard.com>","Received":["from perceval.ideasonboard.com (perceval.ideasonboard.com\n\t[213.167.242.64])\n\tby lancelot.ideasonboard.com (Postfix) with ESMTPS id 725E6600F9\n\tfor <libcamera-devel@lists.libcamera.org>;\n\tFri, 22 Mar 2019 23:19:22 +0100 (CET)","from pendragon.ideasonboard.com\n\t(p5269001-ipngn11702marunouchi.tokyo.ocn.ne.jp [114.158.195.1])\n\tby perceval.ideasonboard.com (Postfix) with ESMTPSA id EA0B72DE;\n\tFri, 22 Mar 2019 23:19:18 +0100 (CET)"],"DKIM-Signature":"v=1; a=rsa-sha256; c=relaxed/simple; d=ideasonboard.com;\n\ts=mail; t=1553293160;\n\tbh=XlpEKzGwiRNwFbdvDc5PrATpUTPzlxury78msrhVFko=;\n\th=Date:From:To:Cc:Subject:References:In-Reply-To:From;\n\tb=heUfw3zK9jzbc3eVb8FBrGpdwn9Tb9Tv2jVkPjxyVcqUNl4CSkGj78+FTgqWaPhMH\n\tincoPZk/zQK3B5x8XcAgMyVe/Etw7g9dsEyrGCPDm02mx97qGHraYK0104QUl2e4pX\n\tIB9oSt0WWK30Q0621YF5heLQSh6zzZYiZbSALkZI=","Date":"Sat, 23 Mar 2019 00:19:07 +0200","From":"Laurent Pinchart <laurent.pinchart@ideasonboard.com>","To":"Kieran Bingham <kieran.bingham@ideasonboard.com>","Cc":"LibCamera Devel <libcamera-devel@lists.libcamera.org>","Message-ID":"<20190322221907.GA4572@pendragon.ideasonboard.com>","References":"<20190320154748.27326-1-kieran.bingham@ideasonboard.com>\n\t<20190321083532.GC4615@pendragon.ideasonboard.com>\n\t<570578f8-50e3-a3e0-84d9-7746835bec6b@ideasonboard.com>","MIME-Version":"1.0","Content-Type":"text/plain; charset=utf-8","Content-Disposition":"inline","In-Reply-To":"<570578f8-50e3-a3e0-84d9-7746835bec6b@ideasonboard.com>","User-Agent":"Mutt/1.10.1 (2018-07-13)","Subject":"Re: [libcamera-devel] [PATCH] meson: Provide options to disable\n\ttest/docs","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, 22 Mar 2019 22:19:22 -0000"}}]