From mboxrd@z Thu Jan 1 00:00:00 1970 Received: from mail-ed1-f47.google.com (mail-ed1-f47.google.com [209.85.208.47]) by mx.groups.io with SMTP id smtpd.web08.10368.1608815126707154920 for ; Thu, 24 Dec 2020 05:05:27 -0800 Authentication-Results: mx.groups.io; dkim=pass header.i=@mvista-com.20150623.gappssmtp.com header.s=20150623 header.b=bElujvgB; spf=permerror, err=parse error for token &{10 18 websitewelcome.com}: parse error for token &{10 18 _spf.google.com}: limit exceeded (domain: mvista.com, ip: 209.85.208.47, mailfrom: mshah@mvista.com) Received: by mail-ed1-f47.google.com with SMTP id y24so2071096edt.10 for ; Thu, 24 Dec 2020 05:05:26 -0800 (PST) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=mvista-com.20150623.gappssmtp.com; s=20150623; h=mime-version:references:in-reply-to:from:date:message-id:subject:to :cc; bh=eCDjGhRFwzH23VYZYQM4eqFu0Y/mPpIP1Fcww5RYZ+Y=; b=bElujvgBignDvQj4eXSlMgdkv2YRU59h2CLq0fzEZxHzwSSvq061bouhy1Sg3CtRYD pWRjoEJO5hJPbNbPbRXsYzDOi56pyG24Bp4q72Ju4BoEmhLM1w60yUuEp9qPJeK0GZQc nfIp3Xayylw33AH9mCkSekerFhEpdGJkj4rwUbjiTxzIcZx57N9VNYW2fJmyh9WjqQCI KkTlmqGEBSnjh5Jub8z4Thtw9+A7qQ/HCPjUDsk6gPsJ0G/RrCWlj7S6RkMVn2Pocu9z DmcVA9FHQyGupfSaKi6cr3BDZfuIGPvfiv9MdwDd5n3J8L9UXe82wLWFnLq62HhuBM55 H6Fg== X-Google-DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=1e100.net; s=20161025; h=x-gm-message-state:mime-version:references:in-reply-to:from:date :message-id:subject:to:cc; bh=eCDjGhRFwzH23VYZYQM4eqFu0Y/mPpIP1Fcww5RYZ+Y=; b=oqkTvcnKI8l+dRhGdfgvZu63XbIKh2axictfpGP4oK6bsPyGSMRsNoMsm22axha+na 47CtVWRtEnjyvDzC/q0JWqvIqWUlNO08Vic0KoFV0vBGbUeO5/1pFipyeDQ8xRebWinB UrxvkBkTVTSyiVhHm6y4NbcA0qxdUXG7M0TKbtVe9EEaqC0q+9MDBJXuyUrERQggQnOL r8sPPrwTzPlBoo5HKeNf2a6uvmov6NdK049sQmzGfbVlqZ7wWinXrcLOQklwSkUBcPRX 8k6mFqVFc6cN74n6ILWBZC6nTK5pCXBnFlyoVuro+XGblxYXY16rAvWsISoVyCw+DkCj x6xw== X-Gm-Message-State: AOAM530UVKSK5LlFqJlS/Jzgt1i8C15WJDqNr8ENCG55robPKSlALZDN efih6gEOTPM6KOc1eCKr2F49kXfzepretOJVCHxD9A== X-Google-Smtp-Source: ABdhPJyRooBDNidyuZXYa/3tQ2zWTbuV26Y5bNc2b4OVnDNYLR7uXZrB9g7BhMwpT2vqpoMPWR82pFIfRXa2cjZOQcM= X-Received: by 2002:a50:d552:: with SMTP id f18mr23892329edj.168.1608815124992; Thu, 24 Dec 2020 05:05:24 -0800 (PST) MIME-Version: 1.0 References: <1608636285-20638-1-git-send-email-mshah@mvista.com> In-Reply-To: From: "Milan Shah" Date: Thu, 24 Dec 2020 18:34:49 +0530 Message-ID: Subject: Re: [OE-core] [meta-oe][PATCH] oe-pkgdata-util: Added a test to verify oe-pkgdata-util without parameters To: Paul Barker Cc: openembedded-core Content-Type: multipart/alternative; boundary="00000000000008ec5a05b7357682" --00000000000008ec5a05b7357682 Content-Type: text/plain; charset="UTF-8" Thanks, Paul for the review. All review comments are fixed and the patch is sent again for the review. ----------------------- Thanks & Regards, *Milan Shah* MontaVista Software, Bangalore, India On Tue, Dec 22, 2020 at 7:14 PM Paul Barker wrote: > On Tue, 22 Dec 2020 at 11:25, Milan Shah wrote: > > > > A test is implemented on poky/meta/lib/oeqa/selftest/pkgdata.py to test > > the scenario when oe-pkgdata-util is executed without parameters and > > help is displayed. > > > > See [YOCTO #10726] for detailed bug information. > > > > Upstream-Status: Submitted > > This tag doesn't make sense here, you can just drop it. We only need > this tag for actual patch files added to the repository to be applied > to upstream software. > > > > > Signed-off-by: Milan Shah > > --- > > meta/lib/oeqa/selftest/cases/pkgdata.py | 6 ++++++ > > 1 file changed, 6 insertions(+) > > > > diff --git a/meta/lib/oeqa/selftest/cases/pkgdata.py > b/meta/lib/oeqa/selftest/cases/pkgdata.py > > index 833a180..d3a5519 100644 > > --- a/meta/lib/oeqa/selftest/cases/pkgdata.py > > +++ b/meta/lib/oeqa/selftest/cases/pkgdata.py > > @@ -218,3 +218,9 @@ class OePkgdataUtilTests(OESelftestTestCase): > > def test_specify_pkgdatadir(self): > > result = runCmd('oe-pkgdata-util -p %s lookup-pkg zlib' % > get_bb_var('PKGDATA_DIR')) > > self.assertEqual(result.output, 'libz1') > > + > > + def test_no_param(self): > > + result = runCmd('oe-pkgdata-util', ignore_status=True) > > + self.assertEqual(result.status, 2, "Status different than 2. > output: %s" % result.output) > > + self.assertIn('oe-pkgdata-util: error: the following arguments > are required: ', result.output) > > + self.assertIn('usage: oe-pkgdata-util [-h] [-d] [-p > PKGDATA_DIR] ', result.output) > > I don't like these assertln calls - they just make it more difficult > to change the help output of the oe-pkgdata-util tool if additional > options are added in the future. > > I'm not really sure what this test case is expected to catch but > perhaps just checking for the return code of 2 and the string "usage: > oe-pkgdata-util" somewhere in the output is enough. > > Thanks, > > -- > Paul Barker > Konsulko Group > --00000000000008ec5a05b7357682 Content-Type: text/html; charset="UTF-8" Content-Transfer-Encoding: quoted-printable
Thanks, Paul for the review.

All review comments are fixed and the patch is sent a= gain for the review.

-----------------------
Thanks &= ; Regards,
Milan Shah
MontaVista Softwar= e, <= font color=3D"#ff0000">Bangalore, India


On Tue, Dec 22= , 2020 at 7:14 PM Paul Barker <p= barker@konsulko.com> wrote:
On Tue, 22 Dec 2020 at 11:25, Milan Shah <mshah@mvista.com> wrote:<= br> >
> A test is implemented on poky/meta/lib/oeqa/selftest/pkgdata.py to tes= t
> the scenario when oe-pkgdata-util is executed without parameters and > help is displayed.
>
> See [YOCTO #10726] for detailed bug information.
>
> Upstream-Status: Submitted

This tag doesn't make sense here, you can just drop it. We only need this tag for actual patch files added to the repository to be applied
to upstream software.

>
> Signed-off-by: Milan Shah <mshah@mvista.com>
> ---
>=C2=A0 meta/lib/oeqa/selftest/cases/pkgdata.py | 6 ++++++
>=C2=A0 1 file changed, 6 insertions(+)
>
> diff --git a/meta/lib/oeqa/selftest/cases/pkgdata.py b/meta/lib/oeqa/s= elftest/cases/pkgdata.py
> index 833a180..d3a5519 100644
> --- a/meta/lib/oeqa/selftest/cases/pkgdata.py
> +++ b/meta/lib/oeqa/selftest/cases/pkgdata.py
> @@ -218,3 +218,9 @@ class OePkgdataUtilTests(OESelftestTestCase):
>=C2=A0 =C2=A0 =C2=A0 def test_specify_pkgdatadir(self):
>=C2=A0 =C2=A0 =C2=A0 =C2=A0 =C2=A0 result =3D runCmd('oe-pkgdata-ut= il -p %s lookup-pkg zlib' % get_bb_var('PKGDATA_DIR'))
>=C2=A0 =C2=A0 =C2=A0 =C2=A0 =C2=A0 self.assertEqual(result.output, '= ;libz1')
> +
> +=C2=A0 =C2=A0 def test_no_param(self):
> +=C2=A0 =C2=A0 =C2=A0 =C2=A0 result =3D runCmd('oe-pkgdata-util= 9;, ignore_status=3DTrue)
> +=C2=A0 =C2=A0 =C2=A0 =C2=A0 self.assertEqual(result.status, 2, "= Status different than 2. output: %s" % result.output)
> +=C2=A0 =C2=A0 =C2=A0 =C2=A0 self.assertIn('oe-pkgdata-util: error= : the following arguments are required: <subcommand>', result.out= put)
> +=C2=A0 =C2=A0 =C2=A0 =C2=A0 self.assertIn('usage: oe-pkgdata-util= [-h] [-d] [-p PKGDATA_DIR] <subcommand>', result.output)

I don't like these assertln calls - they just make it more difficult to change the help output of the oe-pkgdata-util tool if additional
options are added in the future.

I'm not really sure what this test case is expected to catch but
perhaps just checking for the return code of 2 and the string "usage:<= br> oe-pkgdata-util" somewhere in the output is enough.

Thanks,

--
Paul Barker
Konsulko Group
--00000000000008ec5a05b7357682--