Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Add Ubuntu 22.04 images #81

Merged
merged 4 commits into from
Sep 26, 2022
Merged
Changes from 1 commit
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
Prev Previous commit
ci/test.py: Fix race with bitbake exit outside of pyrex
When run outside of Pyrex, bitbake exits asynchronously which means that
it may still be cleaning up after the front-end `bitbake` command
returns. This can race with the directory deletion in test_top_dir, so
add a loop to wait up to 20 seconds for bitbake to be done before doing
the cleanup.
  • Loading branch information
JoshuaWatt committed Sep 26, 2022
commit 73e73b00daa301c765329f1d7cc9af07136aea21
12 changes: 12 additions & 0 deletions ci/test.py
Original file line number Diff line number Diff line change
Expand Up @@ -27,6 +27,7 @@
import tempfile
import threading
import unittest
import time

PYREX_ROOT = os.path.abspath(os.path.join(os.path.dirname(__file__), ".."))
sys.path.append(PYREX_ROOT)
Expand Down Expand Up @@ -1073,6 +1074,17 @@ def test_top_dir(self):
cwd=cwd,
)

# Since bitbake is being invoked outside of Pyrex, we need to wait
# until it exits before trying to cleanup the build directory,
# otherwise it can race.
wait_time = 20
for _ in range(wait_time):
if not os.path.exists(os.path.join(builddir, "bitbake.lock")):
break
time.sleep(1)
else:
self.fail(f"bitbake did not exit within {wait_time} seconds")

shutil.rmtree(builddir)

pyrex_topdir = self.assertPyrexHostCommand(
Expand Down