diff mbox series

[meta-parsec] Fix PACKAGECONFIG check in Parsec OEQA tests

Message ID 20230410183355.1880224-1-Anton.Antonov@arm.com
State New
Headers show
Series [meta-parsec] Fix PACKAGECONFIG check in Parsec OEQA tests | expand

Commit Message

Anton Antonov April 10, 2023, 6:33 p.m. UTC
If PACKAGECONFIG is not defined in local.conf then
its default value is not included in cls.tc.td map.

Signed-off-by: Anton Antonov <Anton.Antonov@arm.com>
---
 meta-parsec/lib/oeqa/runtime/cases/parsec.py | 13 +++++++++++--
 1 file changed, 11 insertions(+), 2 deletions(-)

Comments

akuster808 April 10, 2023, 10:50 p.m. UTC | #1
On 4/10/23 2:33 PM, Anton Antonov wrote:
> If PACKAGECONFIG is not defined in local.conf then
> its default value is not included in cls.tc.td map.
>
> Signed-off-by: Anton Antonov <Anton.Antonov@arm.com>


This gets testing working again.

Thanks,
- Armin
> ---
>   meta-parsec/lib/oeqa/runtime/cases/parsec.py | 13 +++++++++++--
>   1 file changed, 11 insertions(+), 2 deletions(-)
>
> diff --git a/meta-parsec/lib/oeqa/runtime/cases/parsec.py b/meta-parsec/lib/oeqa/runtime/cases/parsec.py
> index 71061db..66932ed 100644
> --- a/meta-parsec/lib/oeqa/runtime/cases/parsec.py
> +++ b/meta-parsec/lib/oeqa/runtime/cases/parsec.py
> @@ -61,9 +61,18 @@ class ParsecTest(OERuntimeTestCase):
>   
>       def check_packageconfig(self, prov):
>           """ Check that the require provider is included in Parsec """
> -        if prov not in self.tc.td['PACKAGECONFIG:pn-parsec-service']:
> +
> +        if 'PACKAGECONFIG:pn-parsec-service' in self.tc.td.keys():
> +            providers = self.tc.td['PACKAGECONFIG:pn-parsec-service']
> +        else:
> +            # PACKAGECONFIG is not defined in local.conf
> +            # Let's use the default value
> +            providers = "PKCS11 MBED-CRYPTO"
> +            if 'tpm2' in self.tc.td['DISTRO_FEATURES']:
> +                providers += " TPM"
> +        if prov not in providers:
>               self.skipTest('%s provider is not included in Parsec. Parsec PACKAGECONFIG: "%s"' % \
> -                          (prov, self.tc.td['PACKAGECONFIG:pn-parsec-service']))
> +                          (prov, providers))
>   
>       def check_packages(self, prov, packages):
>           """ Check for the required packages for Parsec providers software backends """
>
> -=-=-=-=-=-=-=-=-=-=-=-
> Links: You receive all messages sent to this group.
> View/Reply Online (#59658): https://lists.yoctoproject.org/g/yocto/message/59658
> Mute This Topic: https://lists.yoctoproject.org/mt/98182135/3616698
> Group Owner: yocto+owner@lists.yoctoproject.org
> Unsubscribe: https://lists.yoctoproject.org/g/yocto/unsub [akuster808@gmail.com]
> -=-=-=-=-=-=-=-=-=-=-=-
>
diff mbox series

Patch

diff --git a/meta-parsec/lib/oeqa/runtime/cases/parsec.py b/meta-parsec/lib/oeqa/runtime/cases/parsec.py
index 71061db..66932ed 100644
--- a/meta-parsec/lib/oeqa/runtime/cases/parsec.py
+++ b/meta-parsec/lib/oeqa/runtime/cases/parsec.py
@@ -61,9 +61,18 @@  class ParsecTest(OERuntimeTestCase):
 
     def check_packageconfig(self, prov):
         """ Check that the require provider is included in Parsec """
-        if prov not in self.tc.td['PACKAGECONFIG:pn-parsec-service']:
+
+        if 'PACKAGECONFIG:pn-parsec-service' in self.tc.td.keys():
+            providers = self.tc.td['PACKAGECONFIG:pn-parsec-service']
+        else:
+            # PACKAGECONFIG is not defined in local.conf
+            # Let's use the default value
+            providers = "PKCS11 MBED-CRYPTO"
+            if 'tpm2' in self.tc.td['DISTRO_FEATURES']:
+                providers += " TPM"
+        if prov not in providers:
             self.skipTest('%s provider is not included in Parsec. Parsec PACKAGECONFIG: "%s"' % \
-                          (prov, self.tc.td['PACKAGECONFIG:pn-parsec-service']))
+                          (prov, providers))
 
     def check_packages(self, prov, packages):
         """ Check for the required packages for Parsec providers software backends """