From: Anton Mikanovich <amikan@ilbers.de>
To: isar-users@googlegroups.com
Cc: Anton Mikanovich <amikan@ilbers.de>
Subject: [PATCH 1/4] CI: Fix getVars API self checks
Date: Thu, 25 Jan 2024 11:06:14 +0200 [thread overview]
Message-ID: <20240125090617.2945621-2-amikan@ilbers.de> (raw)
In-Reply-To: <20240125090617.2945621-1-amikan@ilbers.de>
Fix bitbake lock filename and add init calling check to make getVars
API more stable.
Signed-off-by: Anton Mikanovich <amikan@ilbers.de>
---
testsuite/cibuilder.py | 8 +++++---
1 file changed, 5 insertions(+), 3 deletions(-)
diff --git a/testsuite/cibuilder.py b/testsuite/cibuilder.py
index bb62bb8d..a5b57a3c 100755
--- a/testsuite/cibuilder.py
+++ b/testsuite/cibuilder.py
@@ -254,6 +254,7 @@ class CIBuilder(Test):
return env['LAYERDIR_' + layer].strip('"')
def getVars(self, *vars, target=None):
+ self.check_init()
def fixStream(stream):
# fix stream objects to emulate _io.TextIOWrapper
stream.isatty = lambda: False
@@ -264,7 +265,8 @@ class CIBuilder(Test):
fixStream(sys.stdout)
fixStream(sys.stderr)
- lockfile = os.path.join(self.build_dir, 'bitbake.lock2')
+ # wait until previous bitbake will be finished
+ lockfile = os.path.join(self.build_dir, 'bitbake.lock')
checks = 0
while os.path.exists(lockfile) and checks < 5:
time.sleep(1)
@@ -276,11 +278,11 @@ class CIBuilder(Test):
tinfoil.prepare(quiet=2)
d = tinfoil.parse_recipe(target)
for var in vars:
- values = values + (d.getVar(var),)
+ values = values + (d.getVar(var, True) or 'None',)
else:
tinfoil.prepare(config_only=True, quiet=2)
for var in vars:
- values = values + (tinfoil.config_data.getVar(var),)
+ values = values + (tinfoil.config_data.getVar(var, True) or 'None',)
return values if len(values) > 1 else values[0]
def create_tmp_layer(self):
--
2.34.1
next prev 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 ` Anton Mikanovich [this message]
2024-01-25 9:06 ` [PATCH 2/4] CI: Remove getlayerdir API Anton Mikanovich
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-2-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