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

tests: support running spread suite in autopkgtests #2188

Merged
merged 12 commits into from Aug 9, 2018

Conversation

kyrofa
Copy link
Contributor

@kyrofa kyrofa commented Aug 2, 2018

  • Have you followed the guidelines for contributing?
  • Have you signed the CLA?
  • If this is a bugfix. Have you checked that there is a bug report open for the issue you are trying to fix on bug reports?
  • If this is a new feature. Have you discussed the design on the forum?
  • Have you successfully run ./runtests.sh static?
  • Have you successfully run ./runtests.sh unit?

The spread suite should run as part of the release process. Add an autopkgtest suite to run it.

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>
@kyrofa kyrofa force-pushed the feature/spread_autopkgtest branch from 789b685 to 909bef1 Compare August 2, 2018 00:12
@codecov-io
Copy link

codecov-io commented Aug 2, 2018

Codecov Report

❗ No coverage uploaded for pull request base (master@41724d5). Click here to learn what that means.
The diff coverage is n/a.

Impacted file tree graph

@@            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.

Legend - Click here to learn more
Δ = absolute <relative> (impact), ø = not affected, ? = missing data
Powered by Codecov. Last update 41724d5...a44bd18. Read the comment docs.

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
Copy link
Collaborator

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?

Copy link
Contributor Author

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
Copy link
Collaborator

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?

Copy link
Contributor Author

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).

Copy link
Collaborator

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
Copy link
Collaborator

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

maybe "source" instead of "."?

Copy link
Contributor Author

@kyrofa kyrofa Aug 2, 2018

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
Copy link
Collaborator

@sergiusens sergiusens Aug 2, 2018

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?

Copy link
Contributor Author

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.

Copy link
Collaborator

@sergiusens sergiusens left a 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

@kyrofa
Copy link
Contributor Author

kyrofa commented Aug 2, 2018

Judging from our other integration tests, I suspect armhf will fail due to an inability to install snaps.

@kyrofa
Copy link
Contributor Author

kyrofa commented Aug 2, 2018

Haha, spread tests pass, plugin suite fails.

@sergiusens
Copy link
Collaborator

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

@kyrofa
Copy link
Contributor Author

kyrofa commented Aug 3, 2018

@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>
@kyrofa kyrofa force-pushed the feature/spread_autopkgtest branch from 65cffc8 to 6b17e67 Compare August 3, 2018 17:16
@sergiusens
Copy link
Collaborator

@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>
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>
@kyrofa kyrofa force-pushed the feature/spread_autopkgtest branch from 56bb37b to 05c1389 Compare August 8, 2018 02:32
@sergiusens sergiusens mentioned this pull request Aug 8, 2018
6 tasks
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>
@kyrofa kyrofa merged commit 10139a4 into canonical:master Aug 9, 2018
@kyrofa kyrofa deleted the feature/spread_autopkgtest branch August 9, 2018 14:43
@kyrofa
Copy link
Contributor Author

kyrofa commented Aug 9, 2018

Jeez, finally. \o/

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

Successfully merging this pull request may close these issues.

None yet

3 participants