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
tests: support running spread suite in autopkgtests #2188
Conversation
The spread suite should run as part of the release process. Add an autopkgtest suite to run it. Also update testing docs for running autopkgtests on Bionic. Signed-off-by: Kyle Fazzari <kyrofa@ubuntu.com>
789b685
to
909bef1
Compare
Codecov Report
@@ Coverage Diff @@
## master #2188 +/- ##
=========================================
Coverage ? 91.13%
=========================================
Files ? 201
Lines ? 12920
Branches ? 1915
=========================================
Hits ? 11775
Misses ? 777
Partials ? 368 Continue to review full report at Codecov.
|
The easiest way is to use a LXC container. From the root of the project, run: | ||
|
||
sudo apt install autopkgtest | ||
autopkgtest . -U -- lxd ubuntu:xenial |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
autopkgtest instead of adt becuase the name changed in the archive?
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Indeed, there is no adt-run
now.
if [ "${http_proxy:-}" != "" ]; then | ||
cat <<-EOF | tee /etc/systemd/system/snapd.service.d/proxy.conf | ||
[Service] | ||
Environment=http_proxy=$http_proxy |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
would this be a harmless unit if $http_proxy is not defined?
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
It wouldn't be defined at all (see the if
statement above).
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
duh, I completely missed that; my suggestion was going to be to gate it just like you did!
|
||
# and now run spread against localhost | ||
# shellcheck disable=SC1091 | ||
. /etc/os-release |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
maybe "source" instead of "."?
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
source
is a bashism, this is using dash.
if [ -z "$SNAPCRAFT_CHANNEL" ]; then | ||
if stat /snapcraft/*.snap 2>/dev/null; then | ||
snap install --classic --dangerous /snapcraft/*.snap | ||
if [ "$SNAPCRAFT_PACKAGE_TYPE" = "deb" ]; then |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
maybe not now, but this might be nice to have in helper scripts to be able to use shellcheck? Or did we discuss this already and am I going on in circles?
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
I agree 100%, sadly, see this comment for why it has to be this way.
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
thanks for getting back to me, feel free to merge once the adt run proves successful
Judging from our other integration tests, I suspect armhf will fail due to an inability to install snaps. |
Haha, spread tests pass, plugin suite fails. |
as expected @kyrofa the one that fails though is the cmake one which is now in master as a spread test, seems like a missing gcc build-packages entry satisfied by the migrated autotools one |
@sergiusens indeed, it requires g++, which I fixed in the migration to spread, so I've now merged with master. The only other fix is to add openssh-server to the test deps so armhf can actually be used by spread, so we'll see how it is now. |
Apparently not all autopkgtest images have it (looking at you, armhf). Signed-off-by: Kyle Fazzari <kyrofa@ubuntu.com>
65cffc8
to
6b17e67
Compare
@kyrofa maybe just disable on armhf for now, let's run it on the other green arches to make sure it is isolated before making the change though (i386 and arm64), this might be a discrepancy between native run versus container run scenario that we are seeing. |
Signed-off-by: Kyle Fazzari <kyrofa@ubuntu.com>
This reverts commit 826676b.
Signed-off-by: Kyle Fazzari <kyrofa@ubuntu.com>
This will automatically skip armhf tests since it can't provide such isolation. Signed-off-by: Kyle Fazzari <kyrofa@ubuntu.com>
Signed-off-by: Kyle Fazzari <kyrofa@ubuntu.com>
56bb37b
to
05c1389
Compare
Signed-off-by: Kyle Fazzari <kyrofa@ubuntu.com>
Cheat and use python3-setuptools instead, which exists on both xenial and bionic, and depends upon python3-distutils in bionic. Signed-off-by: Kyle Fazzari <kyrofa@ubuntu.com>
Jeez, finally. \o/ |
./runtests.sh static
?./runtests.sh unit
?The spread suite should run as part of the release process. Add an autopkgtest suite to run it.