public inbox for isar-users@googlegroups.com
 help / color / mirror / Atom feed
From: Anton Mikanovich <amikan@ilbers.de>
To: isar-users@googlegroups.com
Cc: Anton Mikanovich <amikan@ilbers.de>
Subject: [PATCH 2/4] CI: Remove getlayerdir API
Date: Thu, 25 Jan 2024 11:06:15 +0200	[thread overview]
Message-ID: <20240125090617.2945621-3-amikan@ilbers.de> (raw)
In-Reply-To: <20240125090617.2945621-1-amikan@ilbers.de>

Use getVars() instead to avoid process creation overhead.

Signed-off-by: Anton Mikanovich <amikan@ilbers.de>
---
 testsuite/cibuilder.py | 8 --------
 testsuite/citest.py    | 2 +-
 2 files changed, 1 insertion(+), 9 deletions(-)

diff --git a/testsuite/cibuilder.py b/testsuite/cibuilder.py
index a5b57a3c..273a1dce 100755
--- a/testsuite/cibuilder.py
+++ b/testsuite/cibuilder.py
@@ -245,14 +245,6 @@ class CIBuilder(Test):
         except FileNotFoundError:
             self.log.warn(path + backup_prefix + ' not exist')
 
-    def getlayerdir(self, layer):
-        self.check_init()
-        output = process.getoutput('bitbake -e | grep "^LAYERDIR_.*="')
-        env = dict(((x.split('=', 1) + [''])[:2] \
-                    for x in output.splitlines() if x != ''))
-
-        return env['LAYERDIR_' + layer].strip('"')
-
     def getVars(self, *vars, target=None):
         self.check_init()
         def fixStream(stream):
diff --git a/testsuite/citest.py b/testsuite/citest.py
index d7ece76c..7efe0059 100755
--- a/testsuite/citest.py
+++ b/testsuite/citest.py
@@ -46,7 +46,7 @@ class DevTest(CIBaseTest):
 
     def test_dev_rebuild(self):
         self.init()
-        layerdir_core = self.getlayerdir('core')
+        layerdir_core = self.getVars('LAYERDIR_core')
 
         dpkgbase_file = layerdir_core + '/classes/dpkg-base.bbclass'
 
-- 
2.34.1


  parent reply	other threads:[~2024-01-25  9:06 UTC|newest]

Thread overview: 6+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2024-01-25  9:06 [PATCH 0/4] Improve variables obtaining in CI Anton Mikanovich
2024-01-25  9:06 ` [PATCH 1/4] CI: Fix getVars API self checks Anton Mikanovich
2024-01-25  9:06 ` Anton Mikanovich [this message]
2024-01-25  9:06 ` [PATCH 3/4] CI: Reuse getVars in repro-build-test Anton Mikanovich
2024-01-25  9:06 ` [PATCH 4/4] CI: Use getVars for vm output checking Anton Mikanovich
2024-01-31 14:41 ` [PATCH 0/4] Improve variables obtaining in CI Uladzimir Bely

Reply instructions:

You may reply publicly to this message via plain-text email
using any one of the following methods:

* Save the following mbox file, import it into your mail client,
  and reply-to-all from there: mbox

  Avoid top-posting and favor interleaved quoting:
  https://en.wikipedia.org/wiki/Posting_style#Interleaved_style

* Reply using the --to, --cc, and --in-reply-to
  switches of git-send-email(1):

  git send-email \
    --in-reply-to=20240125090617.2945621-3-amikan@ilbers.de \
    --to=amikan@ilbers.de \
    --cc=isar-users@googlegroups.com \
    /path/to/YOUR_REPLY

  https://kernel.org/pub/software/scm/git/docs/git-send-email.html

* If your mail client supports setting the In-Reply-To header
  via mailto: links, try the mailto: link
Be sure your reply has a Subject: header at the top and a blank line before the message body.
This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox