[{"id":1769667,"web_url":"http://patchwork.ozlabs.org/comment/1769667/","msgid":"<59be0604174a3_76dff67c8c964d2@ultri3.mail>","list_archive_url":null,"date":"2017-09-17T05:20:04","subject":"Re: [Buildroot] [PATCH 1/2] support/run-tests: move packages tests\n\tto packages directories","submitter":{"id":67801,"url":"http://patchwork.ozlabs.org/api/people/67801/","name":"Ricardo Martincoski","email":"ricardo.martincoski@gmail.com"},"content":"Hello,\n\nOn Sat, Sep 16, 2017 at 05:38 PM, Yann E. MORIN wrote:\n\n> Move the existing few packages' tests to the correspnding package\n\ntypo:                                          corresponding\n\n> directories.\n> \n> If we were to add the package/ directory to nose2's search path, we\n> would have to add __init__.py files about everywhere, at each level of\n> the directory hierarchy, because nose2 only includes tests that are in a\n> python pacakge (a directory with a __init__.py file is a python package).\n\ntypo:    package\n\n> This is far from ideal, especially since we have absolutely nothing to\n> put in those __init__.py files.\n> \n> An alternative is to just scan the package/ directory ourselves, and\n> create symlinks in a sub-directory of support/tessting/tests/ so that\n\ntypo:                                           testing\n\n> nose2 does find them. We have no two packages with the same name, we\n> don't risk having two symlinks with the same name.\n> \n> That second solution is what we choose to do, at the cost of a slight\n> increase in complexity in the run-test script.\n> \n> Signed-off-by: \"Yann E. MORIN\" <yann.morin.1998@free.fr>\n> Cc: Ricardo Martincoski <ricardo.martincoski@gmail.com>\n> Cc: Thomas Petazzoni <thomas.petazzoni@free-electrons.com>\n> Cc: Arnout Vandecappelle <arnout@mind.be>\n> Cc: Samuel Martin <s.martin49@gmail.com>\n> ---\n>  .gitignore                                         |  1 +\n>  .../dropbear/dropbear.py                           |  0\n>  .../python-ipython/python-ipython.py               |  0\n>  .../test_python.py => package/python/python.py     |  0\n>  support/testing/run-tests                          | 22 ++++++++++++++++++++++\n>  support/testing/tests/package/__init__.py          |  0\n>  6 files changed, 23 insertions(+)\n>  rename support/testing/tests/package/test_dropbear.py => package/dropbear/dropbear.py (100%)\n>  rename support/testing/tests/package/test_ipython.py => package/python-ipython/python-ipython.py (100%)\n\n.gitlab-ci.yml needs to be generated again because of this rename.\n\nAs I mentioned in another thread, having Python files with '-' in their name\nAFAIK is not a problem as long we don't want to import them.\nWe currently import only test_python.py and it seems unlikely to have runtime\ntests importing each other.\n\nAnd this series is really changing the filename convention for runtime tests of\npackages, making the pre-existing convention of package files beat the\nconvention inside the test infra. I am OK with this change, but I think it worth\nmentioning. Perhaps it fits in the commit log?\n\n[snip]\n> @@ -36,6 +39,9 @@ def main():\n>      script_path = os.path.realpath(__file__)\n>      test_dir = os.path.dirname(script_path)\n>  \n> +    gatheradditionaltests(os.path.abspath(\".\"),\n\nBelow you run all files in this path (base dir of buildroot) to match against\nthe regex. It's bad because one can have output/, test-output/, test-dl/,\noutgoing/, ...\n\nAlso os.getcwd() should give the same result and it is already used in \nsupport/testing/infra/__init__.py\n\nSo for now I suggest to change to:\ngather_additional_tests(os.path.join(os.getcwd(), \"package\"),\nAnd if fs tests gets moved, just add another call to the same method.\nWe don't have that many subdirectories in the root directory.\n\nOther way around is to pass an array of relative subdirectories\ngather_additional_tests([\"package\", \"fs\"],\nand compose the absolute path inside the method while iterating over the\nentries.\n\n> +                          os.path.join(test_dir,\"tests\",\"package\"))\n\nHere and all over the file there are missing whitespace after ','\nCan you use flake8 to find them and fix it?\n\nIf you use vim you can do\n:set makeprg=flake8\\ %\n:make\nand it will jump the cursor to the right place\n\n> +\n>      if args.stdout:\n>          BRTest.logtofile = False\n>  \n> @@ -116,5 +122,21 @@ def main():\n>  \n>      nose2.discover(argv=nose2_args)\n>  \n> +def gatheradditionaltests(search_dir, symlink_dir):\n\nYou could call it gather_additional_tests.\n\n> +    try:\n> +        shutil.rmtree(symlink_dir)\n> +    except OSError as err:\n> +        if not err.errno == errno.ENOENT:\n> +            raise err\n> +        pass\n\nCould we do just this? (like is done in builder.py)\n    if os.path.exists(symlink_dir):\n        shutil.rmtree(symlink_dir)\nIf you change this, errno doesn't need to be imported.\n\n> +    os.mkdir(symlink_dir)\n> +    open(os.path.join(symlink_dir,\"__init__.py\"), \"w\").close()\n> +    for dir, _, files in os.walk(os.path.abspath(search_dir)):\n\nI first thought, why not glob.glob? But in Python 2 it is not recursive.\nSo indeed os.walk is the way to go.\n\n> +        package = os.path.basename(dir)\n> +        for file in files:\n\nYou can import fnmatch to drastically reduce the number of regex compilations:\n        for file in fnmatch.filter(files, '*.py'):\n\n> +            if re.match(\"^{}.py$\".format(package),file):\n> +                os.symlink(os.path.join(dir,file),\n> +                           os.path.join(symlink_dir,\"test_{}.py\".format(package)))\n\nRegards,\nRicardo","headers":{"Return-Path":"<buildroot-bounces@busybox.net>","X-Original-To":["incoming@patchwork.ozlabs.org","buildroot@lists.busybox.net"],"Delivered-To":["patchwork-incoming@bilbo.ozlabs.org","buildroot@osuosl.org"],"Authentication-Results":["ozlabs.org;\n\tspf=pass (mailfrom) smtp.mailfrom=busybox.net\n\t(client-ip=140.211.166.136; helo=silver.osuosl.org;\n\tenvelope-from=buildroot-bounces@busybox.net;\n\treceiver=<UNKNOWN>)","ozlabs.org;\n\tdkim=fail reason=\"signature verification failed\" (2048-bit key;\n\tunprotected) header.d=gmail.com header.i=@gmail.com\n\theader.b=\"q86o5vXy\"; dkim-atps=neutral"],"Received":["from silver.osuosl.org (smtp3.osuosl.org [140.211.166.136])\n\t(using TLSv1.2 with cipher AECDH-AES256-SHA (256/256 bits))\n\t(No client certificate requested)\n\tby ozlabs.org (Postfix) with ESMTPS id 3xvyBt4XhSz9sPs\n\tfor <incoming@patchwork.ozlabs.org>;\n\tSun, 17 Sep 2017 15:20:21 +1000 (AEST)","from localhost (localhost [127.0.0.1])\n\tby silver.osuosl.org (Postfix) with ESMTP id A75643083B;\n\tSun, 17 Sep 2017 05:20:15 +0000 (UTC)","from silver.osuosl.org ([127.0.0.1])\n\tby localhost (.osuosl.org [127.0.0.1]) (amavisd-new, port 10024)\n\twith ESMTP id LM8IkEujAxmJ; Sun, 17 Sep 2017 05:20:12 +0000 (UTC)","from ash.osuosl.org (ash.osuosl.org [140.211.166.34])\n\tby silver.osuosl.org (Postfix) with ESMTP id 196F12EB48;\n\tSun, 17 Sep 2017 05:20:12 +0000 (UTC)","from whitealder.osuosl.org (smtp1.osuosl.org [140.211.166.138])\n\tby ash.osuosl.org (Postfix) with ESMTP id 038A11BFF95\n\tfor <buildroot@lists.busybox.net>;\n\tSun, 17 Sep 2017 05:20:11 +0000 (UTC)","from localhost (localhost [127.0.0.1])\n\tby whitealder.osuosl.org (Postfix) with ESMTP id F0ECC895D4\n\tfor <buildroot@lists.busybox.net>;\n\tSun, 17 Sep 2017 05:20:10 +0000 (UTC)","from whitealder.osuosl.org ([127.0.0.1])\n\tby localhost (.osuosl.org [127.0.0.1]) (amavisd-new, port 10024)\n\twith ESMTP id jOwOEcaGPYP5 for <buildroot@lists.busybox.net>;\n\tSun, 17 Sep 2017 05:20:09 +0000 (UTC)","from mail-qt0-f194.google.com (mail-qt0-f194.google.com\n\t[209.85.216.194])\n\tby whitealder.osuosl.org (Postfix) with ESMTPS id 8CAAD895C3\n\tfor <buildroot@buildroot.org>; Sun, 17 Sep 2017 05:20:09 +0000 (UTC)","by mail-qt0-f194.google.com with SMTP id b1so3887456qtc.0\n\tfor <buildroot@buildroot.org>; Sat, 16 Sep 2017 22:20:09 -0700 (PDT)","from gmail.com ([177.97.68.85]) by smtp.gmail.com with ESMTPSA id\n\tp7sm3117059qke.78.2017.09.16.22.20.06\n\t(version=TLS1_2 cipher=ECDHE-RSA-AES128-GCM-SHA256 bits=128/128);\n\tSat, 16 Sep 2017 22:20:07 -0700 (PDT)"],"X-Virus-Scanned":["amavisd-new at osuosl.org","amavisd-new at osuosl.org"],"X-Greylist":"domain auto-whitelisted by SQLgrey-1.7.6","DKIM-Signature":"v=1; a=rsa-sha256; c=relaxed/relaxed; d=gmail.com; s=20161025;\n\th=date:from:to:cc:message-id:references:subject:mime-version\n\t:content-transfer-encoding;\n\tbh=SdgPEOXtR2kyjh+F149sg4aCYoYZMPpaBGFdAhRe85A=;\n\tb=q86o5vXynM0nleDJ9o0tyir0FTBiaVq6XGLxpX0KqUtK55kCYUfodbpMPt2BI1phBn\n\tZPLrAf1TgCOul094FVADosqFtREtxbzSWoRopMtNJko+D+4d58FcofYgVhVqRWnQOM/s\n\t6TTvQ8tXQqwZkiWqoAmE9Cb7RHie/D8JR29h2bKFr1i7BUG4SOYYh+9Qo+mbbwmndj89\n\tDgOluJFYJ7MmCr3NZXuDo1pi9E8TIhnzfUd9l8vIqGQcaCSX3fne5wF/e6hnaKW+GcCz\n\tFAepvYjGoVc4RDneLIsdRXtTphz4ylqhDgGCcpv4bCeJgiRyfBXquyRA7eNPSsRfZiOu\n\tsRZA==","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:message-id:references:subject\n\t:mime-version:content-transfer-encoding;\n\tbh=SdgPEOXtR2kyjh+F149sg4aCYoYZMPpaBGFdAhRe85A=;\n\tb=mTZMWRoAQ1rYFW6VQxzZS+/D98anepIXf2lgJW2jfA0KXS5ID0YKyksaH/mZgnwkFN\n\tvRxOw/Shcq/svH5DvfoEJYE4lWAZH8RXedqLoE6fGATLcPAgH4mBBd6Wi4VMowQome3Y\n\tFWGsooISgMuy0S/uHzMnbS3gJw3462Hr+GbleB9b10dVFI7q9pYMt4de3cdFJ+XVJI19\n\tdDWVf7L1EqpBcKORBrg3p/NQzZKUgSOts0jxbwrluP1MsJgB+gE4ni25jjOUzHqLMZIV\n\tGf3KQDVqlmScyi2dtAx5ZNXpOmYEn7q+B5mu7LwQrqqae9SOC+U/wKNsihFg9pKLos1+\n\tdorA==","X-Gm-Message-State":"AHPjjUg3pl28ClZDMqs35O64863y/9qxIf/sADaXp8gj76GpfOmZboiy\n\txipkYuv0ZK14fQ==","X-Google-Smtp-Source":"AOwi7QDaqP40EUp30abDFkBA4LnGY1+DzlzQk6LPtB4r09hqCGAtQcy1U1W5x8hSZyRycG6w4Xs50w==","X-Received":"by 10.200.5.132 with SMTP id a4mr45730550qth.318.1505625608551; \n\tSat, 16 Sep 2017 22:20:08 -0700 (PDT)","Date":"Sun, 17 Sep 2017 02:20:04 -0300","From":"Ricardo Martincoski <ricardo.martincoski@gmail.com>","To":"yann.morin.1998@free.fr","Message-ID":"<59be0604174a3_76dff67c8c964d2@ultri3.mail>","References":"<bead9472ebddf2faaa023fd64dfe511e48827b0f.1505594291.git.yann.morin.1998@free.fr>","Mime-Version":"1.0","Content-Type":"multipart/mixed;\n\tboundary=\"--==_mimepart_59be060416cd1_76dff67c8c963f4\";\n\tcharset=UTF-8","Content-Transfer-Encoding":"7bit","Cc":"thomas.petazzoni@free-electrons.com, buildroot@buildroot.org","Subject":"Re: [Buildroot] [PATCH 1/2] support/run-tests: move packages tests\n\tto packages directories","X-BeenThere":"buildroot@busybox.net","X-Mailman-Version":"2.1.18-1","Precedence":"list","List-Id":"Discussion and development of buildroot <buildroot.busybox.net>","List-Unsubscribe":"<http://lists.busybox.net/mailman/options/buildroot>,\n\t<mailto:buildroot-request@busybox.net?subject=unsubscribe>","List-Archive":"<http://lists.busybox.net/pipermail/buildroot/>","List-Post":"<mailto:buildroot@busybox.net>","List-Help":"<mailto:buildroot-request@busybox.net?subject=help>","List-Subscribe":"<http://lists.busybox.net/mailman/listinfo/buildroot>,\n\t<mailto:buildroot-request@busybox.net?subject=subscribe>","Errors-To":"buildroot-bounces@busybox.net","Sender":"\"buildroot\" <buildroot-bounces@busybox.net>"}},{"id":1769671,"web_url":"http://patchwork.ozlabs.org/comment/1769671/","msgid":"<20170917071844.GA2930@scaer>","list_archive_url":null,"date":"2017-09-17T07:18:44","subject":"Re: [Buildroot] [PATCH 1/2] support/run-tests: move packages tests\n\tto packages directories","submitter":{"id":13903,"url":"http://patchwork.ozlabs.org/api/people/13903/","name":"Yann E. MORIN","email":"yann.morin.1998@free.fr"},"content":"Ricardo, All,\n\nOn 2017-09-17 02:20 -0300, Ricardo Martincoski spake thusly:\n> On Sat, Sep 16, 2017 at 05:38 PM, Yann E. MORIN wrote:\n> > ---\n> >  .gitignore                                         |  1 +\n> >  .../dropbear/dropbear.py                           |  0\n> >  .../python-ipython/python-ipython.py               |  0\n> >  .../test_python.py => package/python/python.py     |  0\n> >  support/testing/run-tests                          | 22 ++++++++++++++++++++++\n> >  support/testing/tests/package/__init__.py          |  0\n> >  6 files changed, 23 insertions(+)\n> >  rename support/testing/tests/package/test_dropbear.py => package/dropbear/dropbear.py (100%)\n> >  rename support/testing/tests/package/test_ipython.py => package/python-ipython/python-ipython.py (100%)\n> As I mentioned in another thread, having Python files with '-' in their name\n> AFAIK is not a problem as long we don't want to import them.\n> We currently import only test_python.py and it seems unlikely to have runtime\n> tests importing each other.\n\nYet we don't know what the future will be made of, so we should squash\nthe dasj into an underscore, so as to allow this kind of situation.\n\n> And this series is really changing the filename convention for runtime tests of\n> packages, making the pre-existing convention of package files beat the\n> convention inside the test infra. I am OK with this change, but I think it worth\n> mentioning. Perhaps it fits in the commit log?\n\nYes, it does change the naming convention. I was about to add it to our\nmanual, in the section about adding new packages, to document the .py\nfile in addition to Config.in and the .mk and .hash files. But then I\nnoticed we had nothing about the runtime tests in the manual, so I could\nnot refer to that section to explain the .py file.\n\nSo I deferred updating the manual for later.\n\n> [snip]\n> > @@ -36,6 +39,9 @@ def main():\n> >      script_path = os.path.realpath(__file__)\n> >      test_dir = os.path.dirname(script_path)\n> >  \n> > +    gatheradditionaltests(os.path.abspath(\".\"),\n> \n> Below you run all files in this path (base dir of buildroot) to match against\n> the regex. It's bad because one can have output/, test-output/, test-dl/,\n> outgoing/, ...\n\nArg, I initially wanted to only scan package/ in fact.\n\n> Also os.getcwd() should give the same result and it is already used in \n> support/testing/infra/__init__.py\n> \n> So for now I suggest to change to:\n> gather_additional_tests(os.path.join(os.getcwd(), \"package\"),\n\nExcept that both your solution and mine break when the script is not\ncalled from the Buildroot top directory. We must derive the top\ndirectory from the script path.\n\n> And if fs tests gets moved, just add another call to the same method.\n> We don't have that many subdirectories in the root directory.\n> \n> Other way around is to pass an array of relative subdirectories\n> gather_additional_tests([\"package\", \"fs\"],\n> and compose the absolute path inside the method while iterating over the\n> entries.\n\nI think the origin directory should be passed as argument to the\nfunction, for the above reason.\n\nAnd yes, we could pass a list of directories.\n\n> > +                          os.path.join(test_dir,\"tests\",\"package\"))\n> \n> Here and all over the file there are missing whitespace after ','\n> Can you use flake8 to find them and fix it?\n\nYup, will do.\n\n> If you use vim you can do\n> :set makeprg=flake8\\ %\n> :make\n> and it will jump the cursor to the right place\n> \n> > +\n> >      if args.stdout:\n> >          BRTest.logtofile = False\n> >  \n> > @@ -116,5 +122,21 @@ def main():\n> >  \n> >      nose2.discover(argv=nose2_args)\n> >  \n> > +def gatheradditionaltests(search_dir, symlink_dir):\n> \n> You could call it gather_additional_tests.\n\nI never know whatThe_prefered_Solutionis. ;-)\n\n> > +    try:\n> > +        shutil.rmtree(symlink_dir)\n> > +    except OSError as err:\n> > +        if not err.errno == errno.ENOENT:\n> > +            raise err\n> > +        pass\n> \n> Could we do just this? (like is done in builder.py)\n>     if os.path.exists(symlink_dir):\n>         shutil.rmtree(symlink_dir)\n> If you change this, errno doesn't need to be imported.\n\nSo I am no Python expert, and this shows. Thanks for the hints! :-)\n\n> > +    os.mkdir(symlink_dir)\n> > +    open(os.path.join(symlink_dir,\"__init__.py\"), \"w\").close()\n> > +    for dir, _, files in os.walk(os.path.abspath(search_dir)):\n> \n> I first thought, why not glob.glob? But in Python 2 it is not recursive.\n> So indeed os.walk is the way to go.\n> \n> > +        package = os.path.basename(dir)\n> > +        for file in files:\n> \n> You can import fnmatch to drastically reduce the number of regex compilations:\n>         for file in fnmatch.filter(files, '*.py'):\n\nWee! :-)\n\n> > +            if re.match(\"^{}.py$\".format(package),file):\n> > +                os.symlink(os.path.join(dir,file),\n> > +                           os.path.join(symlink_dir,\"test_{}.py\".format(package)))\n> \n> Regards,\n> Ricardo","headers":{"Return-Path":"<buildroot-bounces@busybox.net>","X-Original-To":["incoming@patchwork.ozlabs.org","buildroot@lists.busybox.net"],"Delivered-To":["patchwork-incoming@bilbo.ozlabs.org","buildroot@osuosl.org"],"Authentication-Results":["ozlabs.org;\n\tspf=pass (mailfrom) smtp.mailfrom=busybox.net\n\t(client-ip=140.211.166.133; helo=hemlock.osuosl.org;\n\tenvelope-from=buildroot-bounces@busybox.net;\n\treceiver=<UNKNOWN>)","ozlabs.org;\n\tdkim=fail reason=\"signature verification failed\" (2048-bit key;\n\tunprotected) header.d=gmail.com header.i=@gmail.com\n\theader.b=\"e4p8C/Jc\"; dkim-atps=neutral"],"Received":["from hemlock.osuosl.org (smtp2.osuosl.org [140.211.166.133])\n\t(using TLSv1.2 with cipher AECDH-AES256-SHA (256/256 bits))\n\t(No client certificate requested)\n\tby ozlabs.org (Postfix) with ESMTPS id 3xw0qn40X5z9s81\n\tfor <incoming@patchwork.ozlabs.org>;\n\tSun, 17 Sep 2017 17:19:01 +1000 (AEST)","from localhost (localhost [127.0.0.1])\n\tby hemlock.osuosl.org (Postfix) with ESMTP id D18548A7F8;\n\tSun, 17 Sep 2017 07:18:55 +0000 (UTC)","from hemlock.osuosl.org ([127.0.0.1])\n\tby localhost (.osuosl.org [127.0.0.1]) (amavisd-new, port 10024)\n\twith ESMTP id hAb0Ijfwe3Kc; Sun, 17 Sep 2017 07:18:53 +0000 (UTC)","from ash.osuosl.org (ash.osuosl.org [140.211.166.34])\n\tby hemlock.osuosl.org (Postfix) with ESMTP id 08ADE8A7F1;\n\tSun, 17 Sep 2017 07:18:53 +0000 (UTC)","from silver.osuosl.org (smtp3.osuosl.org [140.211.166.136])\n\tby ash.osuosl.org (Postfix) with ESMTP id 20EB81BFE1F\n\tfor <buildroot@lists.busybox.net>;\n\tSun, 17 Sep 2017 07:18:51 +0000 (UTC)","from localhost (localhost [127.0.0.1])\n\tby silver.osuosl.org (Postfix) with ESMTP id 1891E3089B\n\tfor <buildroot@lists.busybox.net>;\n\tSun, 17 Sep 2017 07:18:51 +0000 (UTC)","from silver.osuosl.org ([127.0.0.1])\n\tby localhost (.osuosl.org [127.0.0.1]) (amavisd-new, port 10024)\n\twith ESMTP id tRVpbECLM+Oc for <buildroot@lists.busybox.net>;\n\tSun, 17 Sep 2017 07:18:50 +0000 (UTC)","from mail-wr0-f173.google.com (mail-wr0-f173.google.com\n\t[209.85.128.173])\n\tby silver.osuosl.org (Postfix) with ESMTPS id B85B630839\n\tfor <buildroot@buildroot.org>; Sun, 17 Sep 2017 07:18:49 +0000 (UTC)","by mail-wr0-f173.google.com with SMTP id z39so4149776wrb.8\n\tfor <buildroot@buildroot.org>; Sun, 17 Sep 2017 00:18:49 -0700 (PDT)","from ymorin.is-a-geek.org\n\t(2a01cb08861073009402941e840c7f6a.ipv6.abo.wanadoo.fr.\n\t[2a01:cb08:8610:7300:9402:941e:840c:7f6a])\n\tby smtp.gmail.com with ESMTPSA id\n\tc56sm5618544wrc.1.2017.09.17.00.18.44\n\t(version=TLS1_2 cipher=ECDHE-RSA-CHACHA20-POLY1305 bits=256/256);\n\tSun, 17 Sep 2017 00:18:46 -0700 (PDT)","by ymorin.is-a-geek.org (sSMTP sendmail emulation);\n\tSun, 17 Sep 2017 09:18:44 +0200"],"X-Virus-Scanned":["amavisd-new at osuosl.org","amavisd-new at osuosl.org"],"X-Greylist":"domain auto-whitelisted by SQLgrey-1.7.6","DKIM-Signature":"v=1; a=rsa-sha256; c=relaxed/relaxed; d=gmail.com; s=20161025;\n\th=sender:date:from:to:cc:subject:message-id:references:mime-version\n\t:content-disposition:in-reply-to:user-agent;\n\tbh=9qahOr05KXSjnJ9dK1w4tRJihDEAWbbmEKs6GbXUIUk=;\n\tb=e4p8C/JcUUD1/c1n3Oyh1lh7UuuyWe9+YFSc8/MyB9sEKJD/asrikhjfqJuFzk8+ss\n\tNjJ7SVCU/e0islCL01vjTuXheAE9eDf4iv7kykw8V61VXUkaEQaS8y5w0vj/bx8ELQg0\n\tp03X8lOK5mPQLlG3leins1X2tlGsT5N8ORZ5qOHfvH4+bxr8in4qpuWxyl8O9mEn2tCj\n\t3MpD3iSEO8AkNwHIeosiw4C50reLpxtttejnlGyLPHxAbdKmm+hXcBROILQzMCXPFF7T\n\tV1Dbam7rpcwQE7LlHMOgC230MdhawTDw9+Tnc8CVODiFGXit8uwIP8UOz3qNYht027PQ\n\tgAlA==","X-Google-DKIM-Signature":"v=1; a=rsa-sha256; c=relaxed/relaxed;\n\td=1e100.net; s=20161025;\n\th=x-gm-message-state:sender:date:from:to:cc:subject:message-id\n\t:references:mime-version:content-disposition:in-reply-to:user-agent; \n\tbh=9qahOr05KXSjnJ9dK1w4tRJihDEAWbbmEKs6GbXUIUk=;\n\tb=Kju1sjvy9v59c//h4g2gzJoRyOHLpsnDxbAvH2CrTMtDJvRKrGN9yPsKidR6K0DUwo\n\tariJFl3yUVLjXBi3cwdRyJBYRfplkPjutFPfokHgT5EDhbOmVDehNNtwX2xKxw+OvCEH\n\t+AYBvmdbhAEUYNYugCfOqh95TrgZQq6bDFoipO4VAwm3tyTT3z48qKWmtg6MQizam5zo\n\t/vIjrDRK87O1zyDGBciSq9mwOmJ0Ah97U5QXWRNiijgk0jLORUFdLdQnpLhdDyAU8XVF\n\tLopiLBEsLetJh/GoYI5nB9+NhU9bt21QMDEzpjpPCLfaWswdW8BQkoxeK+klGimR0T1G\n\t5d7g==","X-Gm-Message-State":"AHPjjUi+xocvYNeNxiRJT3DTmu8wjkVQDuLHhN3ESZm7Rvma2ZjZ0dFH\n\tBcSV9vAJSdu7B+Rx","X-Google-Smtp-Source":"AOwi7QAZu2XWmaoaE421zzdC7MhmLzox2x9+i0x8TJFti/G5RWu1CexeNtCaGZ7+cpaWls56Nc8qkA==","X-Received":"by 10.223.186.142 with SMTP id\n\tp14mr16996343wrg.169.1505632728006; \n\tSun, 17 Sep 2017 00:18:48 -0700 (PDT)","Date":"Sun, 17 Sep 2017 09:18:44 +0200","From":"\"Yann E. MORIN\" <yann.morin.1998@free.fr>","To":"Ricardo Martincoski <ricardo.martincoski@gmail.com>","Message-ID":"<20170917071844.GA2930@scaer>","References":"<bead9472ebddf2faaa023fd64dfe511e48827b0f.1505594291.git.yann.morin.1998@free.fr>\n\t<59be0604174a3_76dff67c8c964d2@ultri3.mail>","MIME-Version":"1.0","Content-Disposition":"inline","In-Reply-To":"<59be0604174a3_76dff67c8c964d2@ultri3.mail>","User-Agent":"Mutt/1.5.22 (2013-10-16)","Cc":"thomas.petazzoni@free-electrons.com, buildroot@buildroot.org","Subject":"Re: [Buildroot] [PATCH 1/2] support/run-tests: move packages tests\n\tto packages directories","X-BeenThere":"buildroot@busybox.net","X-Mailman-Version":"2.1.18-1","Precedence":"list","List-Id":"Discussion and development of buildroot <buildroot.busybox.net>","List-Unsubscribe":"<http://lists.busybox.net/mailman/options/buildroot>,\n\t<mailto:buildroot-request@busybox.net?subject=unsubscribe>","List-Archive":"<http://lists.busybox.net/pipermail/buildroot/>","List-Post":"<mailto:buildroot@busybox.net>","List-Help":"<mailto:buildroot-request@busybox.net?subject=help>","List-Subscribe":"<http://lists.busybox.net/mailman/listinfo/buildroot>,\n\t<mailto:buildroot-request@busybox.net?subject=subscribe>","Content-Type":"text/plain; charset=\"us-ascii\"","Content-Transfer-Encoding":"7bit","Errors-To":"buildroot-bounces@busybox.net","Sender":"\"buildroot\" <buildroot-bounces@busybox.net>"}},{"id":1769682,"web_url":"http://patchwork.ozlabs.org/comment/1769682/","msgid":"<20170917075223.GC2930@scaer>","list_archive_url":null,"date":"2017-09-17T07:52:23","subject":"Re: [Buildroot] [PATCH 1/2] support/run-tests: move packages tests\n\tto packages directories","submitter":{"id":13903,"url":"http://patchwork.ozlabs.org/api/people/13903/","name":"Yann E. MORIN","email":"yann.morin.1998@free.fr"},"content":"Ricardo, All,\n\nOn 2017-09-17 09:18 +0200, Yann E. MORIN spake thusly:\n> On 2017-09-17 02:20 -0300, Ricardo Martincoski spake thusly:\n> > On Sat, Sep 16, 2017 at 05:38 PM, Yann E. MORIN wrote:\n[--SNIP--]\n> > > +        package = os.path.basename(dir)\n> > > +        for file in files:\n> > \n> > You can import fnmatch to drastically reduce the number of regex compilations:\n> >         for file in fnmatch.filter(files, '*.py'):\n> Wee! :-)\n\nIn fact, no. At least, not in this state, because we do not want to\nmatch _any_ .py file; instead, we want to match only .py files that are\nnamed after the package.\n\nBut I guess I can make it to work with fnmatch nonetheless. ;-)\n\nRegards,\nYann E. MORIN.","headers":{"Return-Path":"<buildroot-bounces@busybox.net>","X-Original-To":["incoming@patchwork.ozlabs.org","buildroot@lists.busybox.net"],"Delivered-To":["patchwork-incoming@bilbo.ozlabs.org","buildroot@osuosl.org"],"Authentication-Results":["ozlabs.org;\n\tspf=pass (mailfrom) smtp.mailfrom=busybox.net\n\t(client-ip=140.211.166.133; helo=hemlock.osuosl.org;\n\tenvelope-from=buildroot-bounces@busybox.net;\n\treceiver=<UNKNOWN>)","ozlabs.org;\n\tdkim=fail reason=\"signature verification failed\" (2048-bit key;\n\tunprotected) header.d=gmail.com header.i=@gmail.com\n\theader.b=\"aWHe87iL\"; dkim-atps=neutral"],"Received":["from hemlock.osuosl.org (smtp2.osuosl.org [140.211.166.133])\n\t(using TLSv1.2 with cipher AECDH-AES256-SHA (256/256 bits))\n\t(No client certificate requested)\n\tby ozlabs.org (Postfix) with ESMTPS id 3xw1Zb25qvz9sPs\n\tfor <incoming@patchwork.ozlabs.org>;\n\tSun, 17 Sep 2017 17:52:38 +1000 (AEST)","from localhost (localhost [127.0.0.1])\n\tby hemlock.osuosl.org (Postfix) with ESMTP id 2815C8A831;\n\tSun, 17 Sep 2017 07:52:33 +0000 (UTC)","from hemlock.osuosl.org ([127.0.0.1])\n\tby localhost (.osuosl.org [127.0.0.1]) (amavisd-new, port 10024)\n\twith ESMTP id dYNCWAsOTKxg; Sun, 17 Sep 2017 07:52:31 +0000 (UTC)","from ash.osuosl.org (ash.osuosl.org [140.211.166.34])\n\tby hemlock.osuosl.org (Postfix) with ESMTP id 46AE28A7FC;\n\tSun, 17 Sep 2017 07:52:31 +0000 (UTC)","from hemlock.osuosl.org (smtp2.osuosl.org [140.211.166.133])\n\tby ash.osuosl.org (Postfix) with ESMTP id E18641BFF95\n\tfor <buildroot@lists.busybox.net>;\n\tSun, 17 Sep 2017 07:52:29 +0000 (UTC)","from localhost (localhost [127.0.0.1])\n\tby hemlock.osuosl.org (Postfix) with ESMTP id DC79B8A7FC\n\tfor <buildroot@lists.busybox.net>;\n\tSun, 17 Sep 2017 07:52:29 +0000 (UTC)","from hemlock.osuosl.org ([127.0.0.1])\n\tby localhost (.osuosl.org [127.0.0.1]) (amavisd-new, port 10024)\n\twith ESMTP id bTa-kPrPEwbr for <buildroot@lists.busybox.net>;\n\tSun, 17 Sep 2017 07:52:29 +0000 (UTC)","from mail-wm0-f42.google.com (mail-wm0-f42.google.com\n\t[74.125.82.42])\n\tby hemlock.osuosl.org (Postfix) with ESMTPS id D37008A7FA\n\tfor <buildroot@buildroot.org>; Sun, 17 Sep 2017 07:52:28 +0000 (UTC)","by mail-wm0-f42.google.com with SMTP id g206so15851008wme.0\n\tfor <buildroot@buildroot.org>; Sun, 17 Sep 2017 00:52:28 -0700 (PDT)","from ymorin.is-a-geek.org\n\t(2a01cb088610730014055197c5b2edc5.ipv6.abo.wanadoo.fr.\n\t[2a01:cb08:8610:7300:1405:5197:c5b2:edc5])\n\tby smtp.gmail.com with ESMTPSA id\n\td5sm4902694wma.22.2017.09.17.00.52.24\n\t(version=TLS1_2 cipher=ECDHE-RSA-CHACHA20-POLY1305 bits=256/256);\n\tSun, 17 Sep 2017 00:52:25 -0700 (PDT)","by ymorin.is-a-geek.org (sSMTP sendmail emulation);\n\tSun, 17 Sep 2017 09:52:23 +0200"],"X-Virus-Scanned":["amavisd-new at osuosl.org","amavisd-new at osuosl.org"],"X-Greylist":"domain auto-whitelisted by SQLgrey-1.7.6","DKIM-Signature":"v=1; a=rsa-sha256; c=relaxed/relaxed; d=gmail.com; s=20161025;\n\th=sender:date:from:to:cc:subject:message-id:references:mime-version\n\t:content-disposition:in-reply-to:user-agent;\n\tbh=FP94tMhyJ8mvYYzZDyb/O2ZsiHTCQXj162i3wA13+rQ=;\n\tb=aWHe87iLqTa9wybKQjm8jWL632Y/M7dD4ZMUc7DQTTmtIZ+j+/KhkUtpRdXtJUtw8w\n\thp55zBsuRbV+HKwy7I+ad1snTFnQrfgl0dNPjqEWc7x6byTDRfLrIWKE8M2i8ZAwExEs\n\t3jtq967stpxZKXGvlIie1pgNeifz5aAb/YyS8HBsRPjCmsV0TJtfzV5pwGY7HkScnf2k\n\tNAztDXSJ/g5o+5h0CbpxzoZbM9yCGc0ET8ZK4xh03ICQoMYiLgsxbYIjGKv8CgeBQZdj\n\t3vngZHTREdONvS9gVvcB52HGbYffciwRvmrisaadHW42GyaNC2SqDsDu3D5S5//r90NT\n\thinA==","X-Google-DKIM-Signature":"v=1; a=rsa-sha256; c=relaxed/relaxed;\n\td=1e100.net; s=20161025;\n\th=x-gm-message-state:sender:date:from:to:cc:subject:message-id\n\t:references:mime-version:content-disposition:in-reply-to:user-agent; \n\tbh=FP94tMhyJ8mvYYzZDyb/O2ZsiHTCQXj162i3wA13+rQ=;\n\tb=K7A07VKa1XVxS3/T1h4AuhMrI0tcem3vGys9xlOZeobmVKynIzMVDKv2ozcuSDt9r7\n\t2yVxBfWRW986WYFW7XFj/TrdQ5qMCT+QJkzzegPPFlnWNfclYNKHzB1dmnkV36FJX0Gb\n\tLpcaWAhhj+nM0GjxBDGylFksfPNfh3bRiCtt4FkPkOku9uZWQkYRDL3/FghFS4cpUTaE\n\tAw0E+7FGrD2WRTRoXK+3DqtOggfy06NIojWl8E2YgtYrJba80XQkM85zmK0Z3f+ownRE\n\tEhreZyJXXJc+ozZrsu4Aoe9XReJhS1+CiPXsXXAJRTi9bBFOEv5/GB1VXwMfW7OzTUVU\n\t8cmg==","X-Gm-Message-State":"AHPjjUgwFTlyfnhvpL61mCYQr6XGvdTyiJvIBIWaS2qX7RfbP+165/TN\n\tGxdzEb7VGeiVkjeV2EGSZ0Q=","X-Google-Smtp-Source":"AOwi7QA1uCPECrsz2Wknm7R57DnsmUbu4oJoQeyS7KIH25S96CcGQOmM+tb/p+7SWj/RufTuQb4Qew==","X-Received":"by 10.28.16.21 with SMTP id 21mr6498930wmq.35.1505634747140;\n\tSun, 17 Sep 2017 00:52:27 -0700 (PDT)","Date":"Sun, 17 Sep 2017 09:52:23 +0200","From":"\"Yann E. MORIN\" <yann.morin.1998@free.fr>","To":"Ricardo Martincoski <ricardo.martincoski@gmail.com>","Message-ID":"<20170917075223.GC2930@scaer>","References":"<bead9472ebddf2faaa023fd64dfe511e48827b0f.1505594291.git.yann.morin.1998@free.fr>\n\t<59be0604174a3_76dff67c8c964d2@ultri3.mail>\n\t<20170917071844.GA2930@scaer>","MIME-Version":"1.0","Content-Disposition":"inline","In-Reply-To":"<20170917071844.GA2930@scaer>","User-Agent":"Mutt/1.5.22 (2013-10-16)","Cc":"thomas.petazzoni@free-electrons.com, buildroot@buildroot.org","Subject":"Re: [Buildroot] [PATCH 1/2] support/run-tests: move packages tests\n\tto packages directories","X-BeenThere":"buildroot@busybox.net","X-Mailman-Version":"2.1.18-1","Precedence":"list","List-Id":"Discussion and development of buildroot <buildroot.busybox.net>","List-Unsubscribe":"<http://lists.busybox.net/mailman/options/buildroot>,\n\t<mailto:buildroot-request@busybox.net?subject=unsubscribe>","List-Archive":"<http://lists.busybox.net/pipermail/buildroot/>","List-Post":"<mailto:buildroot@busybox.net>","List-Help":"<mailto:buildroot-request@busybox.net?subject=help>","List-Subscribe":"<http://lists.busybox.net/mailman/listinfo/buildroot>,\n\t<mailto:buildroot-request@busybox.net?subject=subscribe>","Content-Type":"text/plain; charset=\"us-ascii\"","Content-Transfer-Encoding":"7bit","Errors-To":"buildroot-bounces@busybox.net","Sender":"\"buildroot\" <buildroot-bounces@busybox.net>"}},{"id":1778122,"web_url":"http://patchwork.ozlabs.org/comment/1778122/","msgid":"<59d18e5bc90a4_6a703fce129871805518f@ultri3.mail>","list_archive_url":null,"date":"2017-10-02T00:54:51","subject":"Re: [Buildroot] [PATCH 1/2] support/run-tests: move packages tests\n\tto packages directories","submitter":{"id":67801,"url":"http://patchwork.ozlabs.org/api/people/67801/","name":"Ricardo Martincoski","email":"ricardo.martincoski@gmail.com"},"content":"Hello,\n\nOn Sun, Sep 17, 2017 at 04:52 AM, Yann E. MORIN wrote:\n\n> On 2017-09-17 09:18 +0200, Yann E. MORIN spake thusly:\n>> On 2017-09-17 02:20 -0300, Ricardo Martincoski spake thusly:\n>> > On Sat, Sep 16, 2017 at 05:38 PM, Yann E. MORIN wrote:\n> [--SNIP--]\n>> > > +        package = os.path.basename(dir)\n>> > > +        for file in files:\n>> > \n>> > You can import fnmatch to drastically reduce the number of regex compilations:\n>> >         for file in fnmatch.filter(files, '*.py'):\n>> Wee! :-)\n> \n> In fact, no. At least, not in this state, because we do not want to\n> match _any_ .py file; instead, we want to match only .py files that are\n> named after the package.\n\nWe could use 2 filters. Instead of 8k+ regex compilations (one for each file\ninside a package directory) we would run 2k+ fnmatch.filter (that probably\ncompile one regex, one per directory) and one regex compilation for each test\nfile in the package tree.\n\n         for file in fnmatch.filter(files, '*.py'):\n             if re.match(\"^{}.py$\".format(package),file):\n\nBut well... the default python interpreter has a cache for regex (I don't know\nits internals, just that it exists) and perhaps the change I suggested won't\nmake any difference in performance.\n\n> \n> But I guess I can make it to work with fnmatch nonetheless. ;-)\n\nBTW, could you change the DEVELOPERS file in the same patch?\n+F:     package/*/*.py\n F:     support/testing/\n\nI know it won't work for all possible files. 99% is enough for me.\n\nRegards,\nRicardo","headers":{"Return-Path":"<buildroot-bounces@busybox.net>","X-Original-To":["incoming@patchwork.ozlabs.org","buildroot@lists.busybox.net"],"Delivered-To":["patchwork-incoming@bilbo.ozlabs.org","buildroot@osuosl.org"],"Authentication-Results":["ozlabs.org;\n\tspf=pass (mailfrom) smtp.mailfrom=busybox.net\n\t(client-ip=140.211.166.137; helo=fraxinus.osuosl.org;\n\tenvelope-from=buildroot-bounces@busybox.net;\n\treceiver=<UNKNOWN>)","ozlabs.org;\n\tdkim=fail reason=\"signature verification failed\" (2048-bit key;\n\tunprotected) header.d=gmail.com header.i=@gmail.com\n\theader.b=\"a89jYEFg\"; dkim-atps=neutral"],"Received":["from fraxinus.osuosl.org (smtp4.osuosl.org [140.211.166.137])\n\t(using TLSv1.2 with cipher AECDH-AES256-SHA (256/256 bits))\n\t(No client certificate requested)\n\tby ozlabs.org (Postfix) with ESMTPS id 3y53bv75Vnz9sRW\n\tfor <incoming@patchwork.ozlabs.org>;\n\tMon,  2 Oct 2017 11:55:06 +1100 (AEDT)","from localhost (localhost [127.0.0.1])\n\tby fraxinus.osuosl.org (Postfix) with ESMTP id 0393285A97;\n\tMon,  2 Oct 2017 00:55:02 +0000 (UTC)","from fraxinus.osuosl.org ([127.0.0.1])\n\tby localhost (.osuosl.org [127.0.0.1]) (amavisd-new, port 10024)\n\twith ESMTP id 7aY-rkHgfs0N; Mon,  2 Oct 2017 00:55:00 +0000 (UTC)","from ash.osuosl.org (ash.osuosl.org [140.211.166.34])\n\tby fraxinus.osuosl.org (Postfix) with ESMTP id 21ED485A16;\n\tMon,  2 Oct 2017 00:55:00 +0000 (UTC)","from silver.osuosl.org (smtp3.osuosl.org [140.211.166.136])\n\tby ash.osuosl.org (Postfix) with ESMTP id DBA371CEEC7\n\tfor <buildroot@lists.busybox.net>;\n\tMon,  2 Oct 2017 00:54:57 +0000 (UTC)","from localhost (localhost [127.0.0.1])\n\tby silver.osuosl.org (Postfix) with ESMTP id D655D2FB16\n\tfor <buildroot@lists.busybox.net>;\n\tMon,  2 Oct 2017 00:54:57 +0000 (UTC)","from silver.osuosl.org ([127.0.0.1])\n\tby localhost (.osuosl.org [127.0.0.1]) (amavisd-new, port 10024)\n\twith ESMTP id rtz50CB8r9v2 for <buildroot@lists.busybox.net>;\n\tMon,  2 Oct 2017 00:54:57 +0000 (UTC)","from mail-qk0-f195.google.com (mail-qk0-f195.google.com\n\t[209.85.220.195])\n\tby silver.osuosl.org (Postfix) with ESMTPS id 5F13B2FB0C\n\tfor <buildroot@buildroot.org>; Mon,  2 Oct 2017 00:54:57 +0000 (UTC)","by mail-qk0-f195.google.com with SMTP id z14so3026365qkg.3\n\tfor <buildroot@buildroot.org>; Sun, 01 Oct 2017 17:54:57 -0700 (PDT)","from gmail.com (177.204.147.140.dynamic.adsl.gvt.net.br.\n\t[177.204.147.140]) by smtp.gmail.com with ESMTPSA id\n\t49sm6502220qtq.1.2017.10.01.17.54.53\n\t(version=TLS1_2 cipher=ECDHE-RSA-AES128-GCM-SHA256 bits=128/128);\n\tSun, 01 Oct 2017 17:54:55 -0700 (PDT)"],"X-Virus-Scanned":["amavisd-new at osuosl.org","amavisd-new at osuosl.org"],"X-Greylist":"domain auto-whitelisted by SQLgrey-1.7.6","DKIM-Signature":"v=1; a=rsa-sha256; c=relaxed/relaxed; d=gmail.com; s=20161025;\n\th=date:from:to:cc:message-id:references:subject:mime-version\n\t:content-transfer-encoding;\n\tbh=VcJiw+7C/kOfsWegOErX0DHREN0uHasxP702xr01FEI=;\n\tb=a89jYEFgkFw3VznEsLrWbwxNPzcbbbcvqocJinHQEN37sIeRAbBYyPwtnuWb/Z+DxI\n\t1E3hiPKUJG7smufomCQsX2YytI/70rrPTWGXBrnQTsSfBm3Rz7qJnQLCBaU/Ne0gjaMW\n\t8HYaZhWvUvpbLXAVCLOuF5qz+0aE0+pOvWXUGFfPWrPSN3Y0GI8TjgzCV/i9/qW8nhqN\n\tsFe2MQuTz0i9fj2Gylfy/vitgR2HyOS18yXwOxFHaCM97YLPUpAB6qg6b98H2HA3gVJy\n\taPApgFifbAnUY0XslDoI+40xeF77+WZ1bW8aUCk0ccJTLlZLhX6xWyWyt91e7Qb2+517\n\tNTyw==","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:message-id:references:subject\n\t:mime-version:content-transfer-encoding;\n\tbh=VcJiw+7C/kOfsWegOErX0DHREN0uHasxP702xr01FEI=;\n\tb=cL0KAUXw4TfXze9Kpb8nM1ifosa2T00b3Cv8HjWwLpbFU8j/BJ4Gac/lRHkN8G5C9C\n\t3VWsw1SbdiJTZrjbnYYWjUB80qke9gZnpl4D+Lyo7pfJbiSaGbGTyOMExTyMegGN5SMJ\n\tAELk25DD3AGcD65bXqePxQS1qQVY+l+7S1crSClpWb8evhie1XToOFNpdLNdYkowN/Xk\n\tDx/r7XhOmib8ofkcz+bjd8NPa9b5DAtD8AuL7KYEHpvyv8Nf5dCyBiZalX46qyUrvAVP\n\taJDfxqXgpeA+w/NjCCqCZ5mCyKeu2bwfTq2pbS3P2i4WCw7UYrx/r9Zen43cLLcWWSHK\n\tBiIw==","X-Gm-Message-State":"AMCzsaV3DtM0uvP9GiGtA+3r9hxllK6gZ15cWOv4KMSqI1W7yD12qURJ\n\tSrFhb2QjoLD+XBZgSS9NeCY=","X-Google-Smtp-Source":"AOwi7QBzb7/mjYbziid3mqPV+VZdYeQUHPuF5BRLz9xmXwcDaav4q5bb8+ADzBnlWSGi7Lv/HiNW5Q==","X-Received":"by 10.55.78.76 with SMTP id c73mr2600085qkb.320.1506905696419;\n\tSun, 01 Oct 2017 17:54:56 -0700 (PDT)","Date":"Sun, 01 Oct 2017 21:54:51 -0300","From":"Ricardo Martincoski <ricardo.martincoski@gmail.com>","To":"yann.morin.1998@free.fr","Message-ID":"<59d18e5bc90a4_6a703fce129871805518f@ultri3.mail>","References":"<20170917075223.GC2930@scaer>","Mime-Version":"1.0","Content-Type":"multipart/mixed;\n\tboundary=\"--==_mimepart_59d18e5bc8c38_6a703fce129871805509f\";\n\tcharset=UTF-8","Content-Transfer-Encoding":"7bit","Cc":"thomas.petazzoni@free-electrons.com, buildroot@buildroot.org","Subject":"Re: [Buildroot] [PATCH 1/2] support/run-tests: move packages tests\n\tto packages directories","X-BeenThere":"buildroot@busybox.net","X-Mailman-Version":"2.1.18-1","Precedence":"list","List-Id":"Discussion and development of buildroot <buildroot.busybox.net>","List-Unsubscribe":"<http://lists.busybox.net/mailman/options/buildroot>,\n\t<mailto:buildroot-request@busybox.net?subject=unsubscribe>","List-Archive":"<http://lists.busybox.net/pipermail/buildroot/>","List-Post":"<mailto:buildroot@busybox.net>","List-Help":"<mailto:buildroot-request@busybox.net?subject=help>","List-Subscribe":"<http://lists.busybox.net/mailman/listinfo/buildroot>,\n\t<mailto:buildroot-request@busybox.net?subject=subscribe>","Errors-To":"buildroot-bounces@busybox.net","Sender":"\"buildroot\" <buildroot-bounces@busybox.net>"}},{"id":1778148,"web_url":"http://patchwork.ozlabs.org/comment/1778148/","msgid":"<20171002053232.GA4753@scaer>","list_archive_url":null,"date":"2017-10-02T05:32:32","subject":"Re: [Buildroot] [PATCH 1/2] support/run-tests: move packages tests\n\tto packages directories","submitter":{"id":13903,"url":"http://patchwork.ozlabs.org/api/people/13903/","name":"Yann E. MORIN","email":"yann.morin.1998@free.fr"},"content":"Ricardo, All,\n\nOn 2017-10-01 21:54 -0300, Ricardo Martincoski spake thusly:\n> On Sun, Sep 17, 2017 at 04:52 AM, Yann E. MORIN wrote:\n> > On 2017-09-17 09:18 +0200, Yann E. MORIN spake thusly:\n> >> On 2017-09-17 02:20 -0300, Ricardo Martincoski spake thusly:\n> >> > On Sat, Sep 16, 2017 at 05:38 PM, Yann E. MORIN wrote:\n> > [--SNIP--]\n> >> > > +        package = os.path.basename(dir)\n> >> > > +        for file in files:\n> >> > \n> >> > You can import fnmatch to drastically reduce the number of regex compilations:\n> >> >         for file in fnmatch.filter(files, '*.py'):\n> >> Wee! :-)\n> > \n> > In fact, no. At least, not in this state, because we do not want to\n> > match _any_ .py file; instead, we want to match only .py files that are\n> > named after the package.\n> \n> We could use 2 filters. Instead of 8k+ regex compilations (one for each file\n> inside a package directory) we would run 2k+ fnmatch.filter (that probably\n> compile one regex, one per directory) and one regex compilation for each test\n> file in the package tree.\n> \n>          for file in fnmatch.filter(files, '*.py'):\n>              if re.match(\"^{}.py$\".format(package),file):\n\nErr... I already changed it to:\n\n    for file in fnmatch.filter(files, '{}.py'.format(package)):\n\nIs there something wrong with that? ;-)\n\n> But well... the default python interpreter has a cache for regex (I don't know\n> its internals, just that it exists) and perhaps the change I suggested won't\n> make any difference in performance.\n> \n> > \n> > But I guess I can make it to work with fnmatch nonetheless. ;-)\n> \n> BTW, could you change the DEVELOPERS file in the same patch?\n> +F:     package/*/*.py\n>  F:     support/testing/\n\nYou meant, add it to your entry ?\n\nIn fact, I would expect to assign the test files to the corresponding\npackage custodian (now imp[licit by their location).\n\nBut yes, I can assign them to you as well.\n\nRegards,\nYann E. MORIN.","headers":{"Return-Path":"<buildroot-bounces@busybox.net>","X-Original-To":["incoming@patchwork.ozlabs.org","buildroot@lists.busybox.net"],"Delivered-To":["patchwork-incoming@bilbo.ozlabs.org","buildroot@osuosl.org"],"Authentication-Results":["ozlabs.org;\n\tspf=pass (mailfrom) smtp.mailfrom=busybox.net\n\t(client-ip=140.211.166.138; helo=whitealder.osuosl.org;\n\tenvelope-from=buildroot-bounces@busybox.net;\n\treceiver=<UNKNOWN>)","ozlabs.org;\n\tdkim=fail reason=\"signature verification failed\" (2048-bit key;\n\tunprotected) header.d=gmail.com header.i=@gmail.com\n\theader.b=\"p5tbpkYS\"; dkim-atps=neutral"],"Received":["from whitealder.osuosl.org (smtp1.osuosl.org [140.211.166.138])\n\t(using TLSv1.2 with cipher AECDH-AES256-SHA (256/256 bits))\n\t(No client certificate requested)\n\tby ozlabs.org (Postfix) with ESMTPS id 3y59mK5CJXz9t42\n\tfor <incoming@patchwork.ozlabs.org>;\n\tMon,  2 Oct 2017 16:32:48 +1100 (AEDT)","from localhost (localhost [127.0.0.1])\n\tby whitealder.osuosl.org (Postfix) with ESMTP id DFF2686DC3;\n\tMon,  2 Oct 2017 05:32:42 +0000 (UTC)","from whitealder.osuosl.org ([127.0.0.1])\n\tby localhost (.osuosl.org [127.0.0.1]) (amavisd-new, port 10024)\n\twith ESMTP id tFC1xRFaUZpy; Mon,  2 Oct 2017 05:32:40 +0000 (UTC)","from ash.osuosl.org (ash.osuosl.org [140.211.166.34])\n\tby whitealder.osuosl.org (Postfix) with ESMTP id 5F6BC86736;\n\tMon,  2 Oct 2017 05:32:40 +0000 (UTC)","from silver.osuosl.org (smtp3.osuosl.org [140.211.166.136])\n\tby ash.osuosl.org (Postfix) with ESMTP id 2AE8D1C24F3\n\tfor <buildroot@lists.busybox.net>;\n\tMon,  2 Oct 2017 05:32:39 +0000 (UTC)","from localhost (localhost [127.0.0.1])\n\tby silver.osuosl.org (Postfix) with ESMTP id 1D5112ED08\n\tfor <buildroot@lists.busybox.net>;\n\tMon,  2 Oct 2017 05:32:39 +0000 (UTC)","from silver.osuosl.org ([127.0.0.1])\n\tby localhost (.osuosl.org [127.0.0.1]) (amavisd-new, port 10024)\n\twith ESMTP id mn0hLrhmbNKj for <buildroot@lists.busybox.net>;\n\tMon,  2 Oct 2017 05:32:38 +0000 (UTC)","from mail-wm0-f67.google.com (mail-wm0-f67.google.com\n\t[74.125.82.67])\n\tby silver.osuosl.org (Postfix) with ESMTPS id 32EF42D383\n\tfor <buildroot@buildroot.org>; Mon,  2 Oct 2017 05:32:38 +0000 (UTC)","by mail-wm0-f67.google.com with SMTP id m72so6236592wmc.0\n\tfor <buildroot@buildroot.org>; Sun, 01 Oct 2017 22:32:38 -0700 (PDT)","from ymorin.is-a-geek.org\n\t(2a01cb088610730018bc26157dedfd35.ipv6.abo.wanadoo.fr.\n\t[2a01:cb08:8610:7300:18bc:2615:7ded:fd35])\n\tby smtp.gmail.com with ESMTPSA id\n\tw5sm5398048wrg.65.2017.10.01.22.32.32\n\t(version=TLS1_2 cipher=ECDHE-RSA-CHACHA20-POLY1305 bits=256/256);\n\tSun, 01 Oct 2017 22:32:34 -0700 (PDT)","by ymorin.is-a-geek.org (sSMTP sendmail emulation);\n\tMon, 02 Oct 2017 07:32:32 +0200"],"X-Virus-Scanned":["amavisd-new at osuosl.org","amavisd-new at osuosl.org"],"X-Greylist":"domain auto-whitelisted by SQLgrey-1.7.6","DKIM-Signature":"v=1; a=rsa-sha256; c=relaxed/relaxed; d=gmail.com; s=20161025;\n\th=sender:date:from:to:cc:subject:message-id:references:mime-version\n\t:content-disposition:in-reply-to:user-agent;\n\tbh=RPjac2PwbuQbKlLGz4d9viM7sDiKaxWQThe42lR8DGs=;\n\tb=p5tbpkYSylQ06HRuquxpddbumt7yI+MFuACPSDVTC8eJXOKP58VCneGQH3vlUt75zI\n\tIDL/ARLt11pt2z1Wnf8pNeaugVjePW2AqaFcRLMcrjOuGfOGU0Y/nodCyg/VJSLxxA6b\n\tUIaI775+f/b4fzoA6mfbxE5P0RLiLakfWkvlK6hTBwsiQS/k+pQpeZleapuQL8SY7WHj\n\tB4ohbMCsqosX/LRTW/r6kOsL/paRKHawi3rCqIvyzduL+jtvW7YZBVvgYU7CVjFE7LjG\n\tdjj4Ulk640rC21H/sqklSqUGlUsOvuWC2oZik/W3G7HPEadXmTKZrXKrcdpuv2+ILko6\n\t7bZw==","X-Google-DKIM-Signature":"v=1; a=rsa-sha256; c=relaxed/relaxed;\n\td=1e100.net; s=20161025;\n\th=x-gm-message-state:sender:date:from:to:cc:subject:message-id\n\t:references:mime-version:content-disposition:in-reply-to:user-agent; \n\tbh=RPjac2PwbuQbKlLGz4d9viM7sDiKaxWQThe42lR8DGs=;\n\tb=aZNuI8STg+DYFaro7WzLH0RS/Z/OFyZUdv0ADrpK/9CkHaa7UcaJK+r1HBK+CzL/el\n\tixrTr/GA8YLja3uEM1knVyJ7lIWX3ZM2RO2YxGzue2T6t5TRhF2vRpXelm6TswSqzkl/\n\tE4OF7NOQzq//Llmxj4WwXxaEX3/5fOGmPyG9YFH8Fq8VEDmSBdjSOQb1CwHz7+i6C54S\n\t8J7x38MKTKXu2X04HfTXVWGhTKN28b09uKS/htai4qxDibWdNrZ1FitWWVhEV1cOKScA\n\tWV79WWJJClWmhGdqSPxIwxMgDfzV/QHB/yjnw8uAl5MuYf9wImkGVih5gxh3ZdZRFnMm\n\tlr+g==","X-Gm-Message-State":"AHPjjUhzmoMoiXX17o/VFz75617IpeuFAFXIg7K7mGhDPh+Gmey5Ej+n\n\tR8nmwnOWJQq3D19yAynK40g=","X-Google-Smtp-Source":"AOwi7QC0wQ3p3W2MzdU6HUS7/0Cdo3rrz18PMAUTylvT/4RZD3Hy+JSfr9H94351UJHgwaJ0DAwtCw==","X-Received":"by 10.28.67.197 with SMTP id q188mr10177473wma.41.1506922356175; \n\tSun, 01 Oct 2017 22:32:36 -0700 (PDT)","Date":"Mon, 2 Oct 2017 07:32:32 +0200","From":"\"Yann E. MORIN\" <yann.morin.1998@free.fr>","To":"Ricardo Martincoski <ricardo.martincoski@gmail.com>","Message-ID":"<20171002053232.GA4753@scaer>","References":"<20170917075223.GC2930@scaer>\n\t<59d18e5bc90a4_6a703fce129871805518f@ultri3.mail>","MIME-Version":"1.0","Content-Disposition":"inline","In-Reply-To":"<59d18e5bc90a4_6a703fce129871805518f@ultri3.mail>","User-Agent":"Mutt/1.5.22 (2013-10-16)","Cc":"thomas.petazzoni@free-electrons.com, buildroot@buildroot.org","Subject":"Re: [Buildroot] [PATCH 1/2] support/run-tests: move packages tests\n\tto packages directories","X-BeenThere":"buildroot@busybox.net","X-Mailman-Version":"2.1.18-1","Precedence":"list","List-Id":"Discussion and development of buildroot <buildroot.busybox.net>","List-Unsubscribe":"<http://lists.busybox.net/mailman/options/buildroot>,\n\t<mailto:buildroot-request@busybox.net?subject=unsubscribe>","List-Archive":"<http://lists.busybox.net/pipermail/buildroot/>","List-Post":"<mailto:buildroot@busybox.net>","List-Help":"<mailto:buildroot-request@busybox.net?subject=help>","List-Subscribe":"<http://lists.busybox.net/mailman/listinfo/buildroot>,\n\t<mailto:buildroot-request@busybox.net?subject=subscribe>","Content-Type":"text/plain; charset=\"us-ascii\"","Content-Transfer-Encoding":"7bit","Errors-To":"buildroot-bounces@busybox.net","Sender":"\"buildroot\" <buildroot-bounces@busybox.net>"}},{"id":1778586,"web_url":"http://patchwork.ozlabs.org/comment/1778586/","msgid":"<59d2a288a9ed4_2c753fcd949aec68109dc@ultri3.mail>","list_archive_url":null,"date":"2017-10-02T20:33:12","subject":"Re: [Buildroot] [PATCH 1/2] support/run-tests: move packages tests\n\tto packages directories","submitter":{"id":67801,"url":"http://patchwork.ozlabs.org/api/people/67801/","name":"Ricardo Martincoski","email":"ricardo.martincoski@gmail.com"},"content":"Hello,\n\nOn Mon, Oct 02, 2017 at 02:32 AM, Yann E. MORIN wrote:\n\n> On 2017-10-01 21:54 -0300, Ricardo Martincoski spake thusly:\n>> On Sun, Sep 17, 2017 at 04:52 AM, Yann E. MORIN wrote:\n>> > On 2017-09-17 09:18 +0200, Yann E. MORIN spake thusly:\n>> >> On 2017-09-17 02:20 -0300, Ricardo Martincoski spake thusly:\n>> >> > On Sat, Sep 16, 2017 at 05:38 PM, Yann E. MORIN wrote:\n>> > [--SNIP--]\n>> >> > > +        package = os.path.basename(dir)\n>> >> > > +        for file in files:\n>> >> > \n>> >> > You can import fnmatch to drastically reduce the number of regex compilations:\n>> >> >         for file in fnmatch.filter(files, '*.py'):\n>> >> Wee! :-)\n>> > \n>> > In fact, no. At least, not in this state, because we do not want to\n>> > match _any_ .py file; instead, we want to match only .py files that are\n>> > named after the package.\n>> \n>> We could use 2 filters. Instead of 8k+ regex compilations (one for each file\n>> inside a package directory) we would run 2k+ fnmatch.filter (that probably\n>> compile one regex, one per directory) and one regex compilation for each test\n>> file in the package tree.\n>> \n>>          for file in fnmatch.filter(files, '*.py'):\n>>              if re.match(\"^{}.py$\".format(package),file):\n> \n> Err... I already changed it to:\n> \n>     for file in fnmatch.filter(files, '{}.py'.format(package)):\n> \n> Is there something wrong with that? ;-)\n\nNothing wrong. It's better this (your) way IMO.\n\n> \n>> But well... the default python interpreter has a cache for regex (I don't know\n>> its internals, just that it exists) and perhaps the change I suggested won't\n>> make any difference in performance.\n>> \n>> > \n>> > But I guess I can make it to work with fnmatch nonetheless. ;-)\n>> \n>> BTW, could you change the DEVELOPERS file in the same patch?\n>> +F:     package/*/*.py\n>>  F:     support/testing/\n> \n> You meant, add it to your entry ?\n\nYes.\n\n> \n> In fact, I would expect to assign the test files to the corresponding\n> package custodian (now imp[licit by their location).\n> \n> But yes, I can assign them to you as well.\n\nThanks.\n\nRegards,\nRicardo","headers":{"Return-Path":"<buildroot-bounces@busybox.net>","X-Original-To":["incoming@patchwork.ozlabs.org","buildroot@lists.busybox.net"],"Delivered-To":["patchwork-incoming@bilbo.ozlabs.org","buildroot@osuosl.org"],"Authentication-Results":["ozlabs.org;\n\tspf=pass (mailfrom) smtp.mailfrom=busybox.net\n\t(client-ip=140.211.166.137; helo=fraxinus.osuosl.org;\n\tenvelope-from=buildroot-bounces@busybox.net;\n\treceiver=<UNKNOWN>)","ozlabs.org;\n\tdkim=fail reason=\"signature verification failed\" (2048-bit key;\n\tunprotected) header.d=gmail.com header.i=@gmail.com\n\theader.b=\"iQelqlmi\"; dkim-atps=neutral"],"Received":["from fraxinus.osuosl.org (smtp4.osuosl.org [140.211.166.137])\n\t(using TLSv1.2 with cipher AECDH-AES256-SHA (256/256 bits))\n\t(No client certificate requested)\n\tby ozlabs.org (Postfix) with ESMTPS id 3y5YlS5B6qz9t5q\n\tfor <incoming@patchwork.ozlabs.org>;\n\tTue,  3 Oct 2017 07:33:24 +1100 (AEDT)","from localhost (localhost [127.0.0.1])\n\tby fraxinus.osuosl.org (Postfix) with ESMTP id 7FB04870E1;\n\tMon,  2 Oct 2017 20:33:21 +0000 (UTC)","from fraxinus.osuosl.org ([127.0.0.1])\n\tby localhost (.osuosl.org [127.0.0.1]) (amavisd-new, port 10024)\n\twith ESMTP id Os7F822Bzr0M; Mon,  2 Oct 2017 20:33:21 +0000 (UTC)","from ash.osuosl.org (ash.osuosl.org [140.211.166.34])\n\tby fraxinus.osuosl.org (Postfix) with ESMTP id D7BAF870C2;\n\tMon,  2 Oct 2017 20:33:20 +0000 (UTC)","from fraxinus.osuosl.org (smtp4.osuosl.org [140.211.166.137])\n\tby ash.osuosl.org (Postfix) with ESMTP id 1C08B1C0000\n\tfor <buildroot@lists.busybox.net>;\n\tMon,  2 Oct 2017 20:33:19 +0000 (UTC)","from localhost (localhost [127.0.0.1])\n\tby fraxinus.osuosl.org (Postfix) with ESMTP id 160E3870C2\n\tfor <buildroot@lists.busybox.net>;\n\tMon,  2 Oct 2017 20:33:19 +0000 (UTC)","from fraxinus.osuosl.org ([127.0.0.1])\n\tby localhost (.osuosl.org [127.0.0.1]) (amavisd-new, port 10024)\n\twith ESMTP id qtYyW1uoCeS8 for <buildroot@lists.busybox.net>;\n\tMon,  2 Oct 2017 20:33:17 +0000 (UTC)","from mail-qk0-f195.google.com (mail-qk0-f195.google.com\n\t[209.85.220.195])\n\tby fraxinus.osuosl.org (Postfix) with ESMTPS id B5C59870A1\n\tfor <buildroot@buildroot.org>; Mon,  2 Oct 2017 20:33:17 +0000 (UTC)","by mail-qk0-f195.google.com with SMTP id z14so4640178qkg.3\n\tfor <buildroot@buildroot.org>; Mon, 02 Oct 2017 13:33:17 -0700 (PDT)","from gmail.com ([177.18.159.93]) by smtp.gmail.com with ESMTPSA id\n\tv55sm703410qtc.66.2017.10.02.13.33.14\n\t(version=TLS1_2 cipher=ECDHE-RSA-AES128-GCM-SHA256 bits=128/128);\n\tMon, 02 Oct 2017 13:33:15 -0700 (PDT)"],"X-Virus-Scanned":["amavisd-new at osuosl.org","amavisd-new at osuosl.org"],"X-Greylist":"domain auto-whitelisted by SQLgrey-1.7.6","DKIM-Signature":"v=1; a=rsa-sha256; c=relaxed/relaxed; d=gmail.com; s=20161025;\n\th=date:from:to:cc:message-id:references:subject:mime-version\n\t:content-transfer-encoding;\n\tbh=oxa7aTbqTrlU9CtF5mNVB763NMO2eGm805UjOvOZCH8=;\n\tb=iQelqlmiorLIIHSoyYxtTQ1OOEgFcjPa2uUTey2u1/psdW5Z+vVmvx3VnPBnyyNz1A\n\tzUB0+jIgvQRm5ErNUYMr5I/ZIfEQVmvQbYK3IxsZWWhbKW7u7+EIWHQNjLFSmNLkxArQ\n\tqLyF8ENNsoRjznZrWqu3qaN0ospQO2BOQ9HhpzCO6SEkusNQwC1UAUtXga8URHcC1YoN\n\tlpnNGImg39FUoEdO5o9kw5Gc+gEgSZn97Whxh4SEiVSJPCq2YWS6yPf9GAbnKdle0dxe\n\tRNqZzQUaqC+CVhV56vbsu/MXXDI0VvadU4wfxLB3VR59u5fvGO5W926zw8sm+BjlTQzU\n\tII5g==","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:message-id:references:subject\n\t:mime-version:content-transfer-encoding;\n\tbh=oxa7aTbqTrlU9CtF5mNVB763NMO2eGm805UjOvOZCH8=;\n\tb=aJkdEh0PtGmZg9QAC1CLC+JESL+pYqClx/AfPSuZxi8YUOMTytedQ3J6/Xt5zNW6Dv\n\tcbiYwXfLxyEibz6zl7U5AfXaFP0/3LvvV1lWO8PMRCGejwanIbglcupPb5ysX2RLuFun\n\tbLPKyF7pgL+5U4kbKX7EI5Y/JTjBf1sbwHHOPk4szElhXpeaWrnOq1UOLLfl0NjiQdIh\n\tZYJwb5u/VXK+4eKyLoUIu66w6m3tD4SpZEA8J65YV5gW6Cdrt/jC5tIPec9ht2bq7y6R\n\t4FdXJsV4jWPN569ZN27qPezlztaZPsGXXX7tP4WCYkuUiuF/cSqV6kPXq9iMcEie906X\n\ty3BA==","X-Gm-Message-State":"AMCzsaXDjjJoZtfrzLbr4anU0M+yEPDgVRqDNBXKud9fD/TiLThq5NSq\n\tu5Z/gwU1NpjRF679F9itDcHJyg==","X-Google-Smtp-Source":"AOwi7QB8LhW6m7471QpUH6FiWdBJ1vXRWBfz4M+Iqc/pTH2nzTk39r11T6cZE72W9JBTwG+ecdABGA==","X-Received":"by 10.55.48.8 with SMTP id w8mr17257281qkw.139.1506976396786;\n\tMon, 02 Oct 2017 13:33:16 -0700 (PDT)","Date":"Mon, 02 Oct 2017 17:33:12 -0300","From":"Ricardo Martincoski <ricardo.martincoski@gmail.com>","To":"yann.morin.1998@free.fr","Message-ID":"<59d2a288a9ed4_2c753fcd949aec68109dc@ultri3.mail>","References":"<20171002053232.GA4753@scaer>","Mime-Version":"1.0","Content-Type":"multipart/mixed;\n\tboundary=\"--==_mimepart_59d2a288a923e_2c753fcd949aec6810838\";\n\tcharset=UTF-8","Content-Transfer-Encoding":"7bit","Cc":"thomas.petazzoni@free-electrons.com, buildroot@buildroot.org","Subject":"Re: [Buildroot] [PATCH 1/2] support/run-tests: move packages tests\n\tto packages directories","X-BeenThere":"buildroot@busybox.net","X-Mailman-Version":"2.1.18-1","Precedence":"list","List-Id":"Discussion and development of buildroot <buildroot.busybox.net>","List-Unsubscribe":"<http://lists.busybox.net/mailman/options/buildroot>,\n\t<mailto:buildroot-request@busybox.net?subject=unsubscribe>","List-Archive":"<http://lists.busybox.net/pipermail/buildroot/>","List-Post":"<mailto:buildroot@busybox.net>","List-Help":"<mailto:buildroot-request@busybox.net?subject=help>","List-Subscribe":"<http://lists.busybox.net/mailman/listinfo/buildroot>,\n\t<mailto:buildroot-request@busybox.net?subject=subscribe>","Errors-To":"buildroot-bounces@busybox.net","Sender":"\"buildroot\" <buildroot-bounces@busybox.net>"}}]