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: set up the spread execution in linode #1374
Changes from all commits
511822f
c5535b9
062e1d6
4db702a
049b5af
ae7bee5
10e7b95
1cf176e
5ea7b03
File filter
Filter by extension
Conversations
Jump to
Diff view
Diff view
There are no files selected for viewing
Original file line number | Diff line number | Diff line change |
---|---|---|
|
@@ -8,15 +8,43 @@ environment: | |
backends: | ||
lxd: | ||
systems: [ubuntu-16.04] | ||
linode: | ||
key: "$(HOST: echo $SPREAD_LINODE_KEY)" | ||
systems: | ||
- ubuntu-16.04-64: | ||
kernel: GRUB 2 | ||
workers: 3 | ||
|
||
suites: | ||
spread_tests/: | ||
summary: tests of the snapcraft snap | ||
prepare: | | ||
# apt update is hanging on security.ubuntu.com with IPv6, prefer IPv4 over IPv6 | ||
cat <<EOF > gai.conf | ||
precedence ::1/128 50 | ||
precedence ::/0 40 | ||
precedence 2002::/16 30 | ||
precedence ::/96 20 | ||
precedence ::ffff:0:0/96 100 | ||
EOF | ||
if ! mv gai.conf /etc/gai.conf; then | ||
# not writable, disable ipv6 through sysctl | ||
sysctl -w net.ipv6.conf.all.disable_ipv6=1 | ||
rm -f gai.conf | ||
fi | ||
|
||
apt update | ||
apt build-dep -y snapcraft | ||
apt install -y bzr git curl mercurial subversion lxd python3-pep8 pyflakes python-flake8 python3-fixtures python3-pexpect python3-pyftpdlib python3-testscenarios | ||
apt install -y squashfuse | ||
apt install --yes gcc g++ make python3-dev python3-venv libffi-dev libsodium-dev libapt-pkg-dev libarchive13 squashfs-tools xdelta3 bzr git mercurial subversion | ||
# Only required for the lxd backend. | ||
apt install --yes squashfuse | ||
mkdir -p /snapcraft/venv | ||
python3 -m venv /snapcraft/venv | ||
# XXX the activate script has an unbound variable. | ||
sed -i '1s/^/set +u\n/' /snapcraft/venv/bin/activate | ||
source /snapcraft/venv/bin/activate | ||
pip install --upgrade pip | ||
pip install -r /snapcraft/requirements.txt -r /snapcraft/requirements-devel.txt | ||
apt install --yes snapd | ||
snap install snapcraft --classic --edge | ||
There was a problem hiding this comment. Choose a reason for hiding this commentThe reason will be displayed to describe this comment to others. Learn more. Wait... I don't understand what's happening here. You're installing via pip, but also installing the snap. They'll both be in the path. Which one is being tested? There was a problem hiding this comment. Choose a reason for hiding this commentThe reason will be displayed to describe this comment to others. Learn more. I'm installing only the requirements. They are all needed to run the integration tests. I didn't add the There was a problem hiding this comment. Choose a reason for hiding this commentThe reason will be displayed to describe this comment to others. Learn more. Ahh, stupid periods. So easy to miss. Thanks for the info! There was a problem hiding this comment. Choose a reason for hiding this commentThe reason will be displayed to describe this comment to others. Learn more. yay!!! |
||
|
||
path: /snapcraft/ |
Original file line number | Diff line number | Diff line change |
---|---|---|
|
@@ -5,5 +5,6 @@ execute: | | |
echo "Check that we are using the snapcraft snap" | ||
snapcraft_path="$(which snapcraft)" | ||
[ "$snapcraft_path" = "/snap/bin/snapcraft" ] | ||
source /snapcraft/venv/bin/activate | ||
There was a problem hiding this comment. Choose a reason for hiding this commentThe reason will be displayed to describe this comment to others. Learn more. Is this necessary given that it's already in the suite's prepare step? There was a problem hiding this comment. Choose a reason for hiding this commentThe reason will be displayed to describe this comment to others. Learn more. Yes, apparently it happens in a different environment or something. I added it just because without it, it failed. There was a problem hiding this comment. Choose a reason for hiding this commentThe reason will be displayed to describe this comment to others. Learn more. Huh, okay. Does it need to be in the suite's prepare step, then? There was a problem hiding this comment. Choose a reason for hiding this commentThe reason will be displayed to describe this comment to others. Learn more. Oh, sorry, I merged before reading this question. |
||
cd /snapcraft | ||
./runtests.sh integration |
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.
The default linode kernels don't play well with snapd because of the lack of apparmor support, not sure if this apply here but, because you install snapd later, maybe you should use a specific kernel like we do in snapd's suite https://github.com/snapcore/snapd/blob/master/spread.yaml#L51