Merge ~morphis/snappy-hwe-snaps/+git/network-manager:feature/ci-finetuning into ~snappy-hwe-team/snappy-hwe-snaps/+git/network-manager:master

Proposed by Simon Fels
Status: Merged
Approved by: Alfonso Sanchez-Beato
Approved revision: 890c2d6d36343173d0c9765ace80d5ff36264758
Merged at revision: 4d86eebc64e02fd81fa664cd555efeaf6a1499b2
Proposed branch: ~morphis/snappy-hwe-snaps/+git/network-manager:feature/ci-finetuning
Merge into: ~snappy-hwe-team/snappy-hwe-snaps/+git/network-manager:master
Diff against target: 50 lines (+16/-1)
3 files modified
spread.yaml (+12/-0)
tests/lib/prepare-all.sh (+2/-0)
tests/main/suspend-resume/task.yaml (+2/-1)
Reviewer Review Type Date Requested Status
Alfonso Sanchez-Beato Approve
System Enablement Bot continuous-integration Approve
Matteo Croce (community) Approve
Konrad Zapałowicz (community) Approve
Tony Espy Pending
Review via email: mp+316201@code.launchpad.net

Description of the change

Fine tune tests to work better on our CI

 * Use noninteractive front to prevent apt from requiring user input
 * Dump system logs in debug mode for each test case
 * Fine tune the suspend resume test case to work much better

To post a comment you must log in.
Revision history for this message
Konrad Zapałowicz (kzapalowicz) wrote :

lgtm

review: Approve
Revision history for this message
Matteo Croce (teknoraver) :
review: Approve
Revision history for this message
System Enablement Bot (system-enablement-ci-bot) wrote :
review: Needs Fixing (continuous-integration)
Revision history for this message
System Enablement Bot (system-enablement-ci-bot) wrote :
review: Needs Fixing (continuous-integration)
Revision history for this message
System Enablement Bot (system-enablement-ci-bot) wrote :
review: Approve (continuous-integration)
Revision history for this message
Alfonso Sanchez-Beato (alfonsosanchezbeato) wrote :

LGTM

review: Approve

Preview Diff

[H/L] Next/Prev Comment, [J/K] Next/Prev File, [N/P] Next/Prev Hunk
1diff --git a/spread.yaml b/spread.yaml
2index 93cad8f..83abb24 100644
3--- a/spread.yaml
4+++ b/spread.yaml
5@@ -39,6 +39,18 @@ exclude:
6 prepare: |
7 . $TESTSLIB/prepare-all.sh
8
9+prepare-each: |
10+ # Cleanup logs so we can just dump what has happened in the debug-each
11+ # step below after a test case ran.
12+ journalctl --rotate
13+ sleep .1
14+ journalctl --vacuum-time=1ms
15+ dmesg -c > /dev/null
16+
17+debug-each: |
18+ journalctl
19+ dmesg | grep DENIED || true
20+
21 # Default is 15 min but we use a higher one here as we build the entire
22 # network-manager snap inside the global prepare step so we need quite
23 # some time. Once we can reuse artifacts from other builds we can change
24diff --git a/tests/lib/prepare-all.sh b/tests/lib/prepare-all.sh
25index 81df7d1..1194d1f 100644
26--- a/tests/lib/prepare-all.sh
27+++ b/tests/lib/prepare-all.sh
28@@ -18,6 +18,8 @@ cat <<-EOF > /home/test/build-snap.sh
29 #!/bin/sh
30 set -ex
31
32+export DEBIAN_FRONTEND=noninteractive
33+
34 # FIXME: Enable propose for now until problems with conflicting systemd
35 # packages between the Ubuntu Core image ppa and the archive are fixed.
36 echo "deb http://archive.ubuntu.com/ubuntu/ xenial-proposed restricted main universe" > /etc/apt/sources.list.d/ubuntu-proposed.list
37diff --git a/tests/main/suspend-resume/task.yaml b/tests/main/suspend-resume/task.yaml
38index b5df7d1..09cb2cc 100644
39--- a/tests/main/suspend-resume/task.yaml
40+++ b/tests/main/suspend-resume/task.yaml
41@@ -51,7 +51,8 @@ execute: |
42 # Kick off the actual suspend in background so that we can continue
43 # verifying the correct state left by the system before it would
44 # normally enter a sleep state.
45- systemctl suspend --no-block &
46+ systemctl suspend --no-block || true
47+ sleep 1
48
49 # The easiest way to ensure NetworkManager did the right thing is
50 # by going through its log output and verifying it prints out

Subscribers

People subscribed via source and target branches