Skip to content

Commit

Permalink
Fix running the autopkgtests, by working around a LXD issue (#265)
Browse files Browse the repository at this point in the history
* CI: mask snapd.seeded.service to work around LP: #1878225

* CI:autopkgtest: avoid unit-tests during autopkgtest build
  • Loading branch information
slyon authored Mar 1, 2022
1 parent aabfc26 commit 20182f9
Show file tree
Hide file tree
Showing 2 changed files with 15 additions and 2 deletions.
9 changes: 9 additions & 0 deletions .github/workflows/autopkgtest.patch
Original file line number Diff line number Diff line change
@@ -0,0 +1,9 @@
@@ -70,6 +70,8 @@

sleep 5
if lxc exec "$CONTAINER" -- systemctl mask [email protected]; then
+ lxc exec "$CONTAINER" -- systemctl mask snapd.service
+ lxc exec "$CONTAINER" -- systemctl mask snapd.seeded.service
lxc exec "$CONTAINER" -- reboot
fi

8 changes: 6 additions & 2 deletions .github/workflows/autopkgtest.yml
Original file line number Diff line number Diff line change
Expand Up @@ -27,13 +27,17 @@ jobs:
sudo apt install autopkgtest ubuntu-dev-tools devscripts openvswitch-switch
sudo snap install lxd
sudo lxd init --auto --storage-backend=dir
# work around LP: #1878225 as fallback
- name: Preparing autopkgtest-build-lxd
run: |
sudo patch /usr/bin/autopkgtest-build-lxd .github/workflows/autopkgtest.patch
sudo autopkgtest-build-lxd ubuntu-daily:jammy
- name: Prepare test
run: |
pull-lp-source netplan.io
cp -r netplan.io-*/debian .
rm -r debian/patches/ # clear any distro patches
dch -v $(git describe --tags) "Autopkgtest CI testing (Jammy)"
sudo autopkgtest-build-lxd ubuntu-daily:jammy
- name: Run autopkgtest (incl. build)
run: |
sudo autopkgtest . -U --env=DPKG_GENSYMBOLS_CHECK_LEVEL=0 -- lxd autopkgtest/ubuntu/jammy/amd64
sudo autopkgtest . -U --env=DPKG_GENSYMBOLS_CHECK_LEVEL=0 --env=DEB_BUILD_OPTIONS=nocheck -- lxd autopkgtest/ubuntu/jammy/amd64

0 comments on commit 20182f9

Please sign in to comment.