I don't recall the upstream-status being added as a yocto
compatibility requirement. Can someone point me to a discussion that I
missed ?

As everyone can recall, I wasn't on board with this being a default QA
check and error, and I'm also not on board with it being a yocto
compliance error.

I realize it isn't being made an error in this patch, but I wanted to
raise my concerns now, before someone throws that switch.

Bruce

On Thu, Feb 23, 2023 at 1:28 AM Lee Chee Yang <chee.yang....@intel.com> wrote:
>
> From: Chee Yang Lee <chee.yang....@intel.com>
>
> yocto-check-layer to check all .patch file in layer for
> Upstream-status and list down all .patch file without Upstream-Status.
> Since upstream-status is additional Yocto Compatible requirement,
> set this test as expected failure for now so it wont fail final
> result.
>
> [YOCTO #14642]
>
> Signed-off-by: Chee Yang Lee <chee.yang....@intel.com>
> ---
>  scripts/lib/checklayer/cases/common.py | 15 +++++++++++++++
>  1 file changed, 15 insertions(+)
>
> diff --git a/scripts/lib/checklayer/cases/common.py 
> b/scripts/lib/checklayer/cases/common.py
> index 722d3cf638..8fb37e175f 100644
> --- a/scripts/lib/checklayer/cases/common.py
> +++ b/scripts/lib/checklayer/cases/common.py
> @@ -72,6 +72,21 @@ class CommonCheckLayer(OECheckLayerTestCase):
>                  self.tc.layer['name'])
>              self.fail('\n'.join(msg))
>
> +    @unittest.expectedFailure
> +    def test_patches_upstream_status(self):
> +        patches = []
> +        for dirpath, dirs, files in os.walk(self.tc.layer['path']):
> +            for filename in files:
> +                if filename.endswith(".patch"):
> +                    data = ""
> +                    ppath = os.path.join(dirpath, filename)
> +                    with open(ppath, 'r', encoding='utf-8', errors='ignore') 
> as f:
> +                        data = f.read()
> +                    if not re.search(r'^Upstream-Status', data, flags=re.I + 
> re.M):
> +                        patches.append(ppath)
> +        self.assertEqual(len(patches), 0 , \
> +                msg="Layer contains patches without upstream status:\n%s" % 
> '\n'.join([str(patch) for patch in patches]))
> +
>      def test_signatures(self):
>          if self.tc.layer['type'] == LayerType.SOFTWARE and \
>             not self.tc.test_software_layer_signatures:
> --
> 2.37.3
>
>
> 
>


-- 
- Thou shalt not follow the NULL pointer, for chaos and madness await
thee at its end
- "Use the force Harry" - Gandalf, Star Trek II
-=-=-=-=-=-=-=-=-=-=-=-
Links: You receive all messages sent to this group.
View/Reply Online (#177606): 
https://lists.openembedded.org/g/openembedded-core/message/177606
Mute This Topic: https://lists.openembedded.org/mt/97178225/21656
Group Owner: openembedded-core+ow...@lists.openembedded.org
Unsubscribe: https://lists.openembedded.org/g/openembedded-core/unsub 
[arch...@mail-archive.com]
-=-=-=-=-=-=-=-=-=-=-=-

Reply via email to