Skip to contentSkip to conversation

oeqa/selftest/context: Rely on bitbake-getvar --value to only return value

PATCH Peter Kjellerstedt 1 participant 2 messages Oct 6, 2023 – Oct 31, 2023 2 messages not in the archive

lore
Share & tools
lore

A message that is not in the archive (sent off-list or not yet received): [email protected]

#1 lore raw
Quoted 25 lines

-----Original Message-----
From: [email protected] <[email protected]> On Behalf Of Peter Kjellerstedt
Sent: den 23 september 2023 06:06
To: [email protected]
Subject: [OE-core] [PATCH] oeqa/selftest/context: Rely on bitbake-getvar --value to only return value

Before, "bitbake-getvar --value <var>" would include log output together with the value. This was handled by piping the output to "tail -1". Now, "bitbake-getvar --value" will no longer output any logs so the piping to "tail" is no longer needed.

---

This of course relies on the corresponding patch for bitbake-getvar to have been applied first.

 meta/lib/oeqa/selftest/context.py | 2 +-
 1 file changed, 1 insertion(+), 1 deletion(-)
meta/lib/oeqa/selftest/context.py +0 -0
index 5a09aeedff..c148aa5aab 100644

meta/lib/oeqa/selftest/context.py class OESelftestTestContext(OETestContext): · line 117

Quoted 8 lines
meta/lib/oeqa/selftest/context.py +1 -1
@@ -111,7 +111,7 @@ class OESelftestTestContext(OETestContext):
 
         # Relative paths in BBLAYERS only works when the new build dir share the same ascending node
         if self.newbuilddir:
-            bblayers = subprocess.check_output("bitbake-getvar --value BBLAYERS | tail -1", cwd=builddir, shell=True, text=True)
+            bblayers = subprocess.check_output("bitbake-getvar --value BBLAYERS", cwd=builddir, shell=True, text=True)
             if '..' in bblayers:
                 bblayers_abspath = [os.path.abspath(path) for path in bblayers.split()]
                 with open("%s/conf/bblayers.conf" % newbuilddir, "a") as f:

Since the fixes to bitbake-getvalue have merged, it should be possible to merge this now.

//Peter

A message that is not in the archive (sent off-list or not yet received): [email protected]

#3 lore raw

*ping*

Quoted 43 lines

-----Original Message-----
From: [email protected] <[email protected]> On Behalf Of Peter Kjellerstedt
Sent: den 6 oktober 2023 17:38
To: [email protected]
Subject: Re: [OE-core] [PATCH] oeqa/selftest/context: Rely on bitbake-getvar --value to only return value

Quoted 25 lines

-----Original Message-----
From: [email protected] <[email protected]> On Behalf Of Peter Kjellerstedt
Sent: den 23 september 2023 06:06
To: [email protected]
Subject: [OE-core] [PATCH] oeqa/selftest/context: Rely on bitbake-getvar --value to only return value

Before, "bitbake-getvar --value <var>" would include log output together with the value. This was handled by piping the output to "tail -1". Now, "bitbake-getvar --value" will no longer output any logs so the piping to "tail" is no longer needed.

---

This of course relies on the corresponding patch for bitbake-getvar to have been applied first.

 meta/lib/oeqa/selftest/context.py | 2 +-
 1 file changed, 1 insertion(+), 1 deletion(-)
meta/lib/oeqa/selftest/context.py +0 -0
index 5a09aeedff..c148aa5aab 100644

meta/lib/oeqa/selftest/context.py class OESelftestTestContext(OETestContext): · line 117

Quoted 8 lines
meta/lib/oeqa/selftest/context.py +1 -1
@@ -111,7 +111,7 @@ class OESelftestTestContext(OETestContext):
 
         # Relative paths in BBLAYERS only works when the new build dir share the same ascending node
         if self.newbuilddir:
-            bblayers = subprocess.check_output("bitbake-getvar --value BBLAYERS | tail -1", cwd=builddir, shell=True, text=True)
+            bblayers = subprocess.check_output("bitbake-getvar --value BBLAYERS", cwd=builddir, shell=True, text=True)
             if '..' in bblayers:
                 bblayers_abspath = [os.path.abspath(path) for path in bblayers.split()]
                 with open("%s/conf/bblayers.conf" % newbuilddir, "a") as f:

Since the fixes to bitbake-getvalue have merged, it should be possible to merge this now.

Quoted 1 line

//Peter

//Peter