Merge lp:~elopio/snappy/wait-boot-ok into lp:~snappy-dev/snappy/snappy-moved-to-github

Proposed by Leo Arias
Status: Merged
Approved by: Leo Arias
Approved revision: 730
Merged at revision: 730
Proposed branch: lp:~elopio/snappy/wait-boot-ok
Merge into: lp:~snappy-dev/snappy/snappy-moved-to-github
Diff against target: 67 lines (+10/-4)
3 files modified
_integration-tests/tests/rollback_test.go (+5/-0)
_integration-tests/testutils/partition/bootloader.go (+4/-3)
_integration-tests/testutils/partition/bootloader_test.go (+1/-1)
To merge this branch: bzr merge lp:~elopio/snappy/wait-boot-ok
Reviewer Review Type Date Requested Status
Federico Gimenez (community) Approve
Review via email: mp+272992@code.launchpad.net

Commit message

On the rollback tests, wait for boot-ok to run. Workaround for bug #1498293.

To post a comment you must log in.
Revision history for this message
Federico Gimenez (fgimenez) wrote :

Very nice Leo, thanks!

review: Approve
Revision history for this message
Snappy Tarmac (snappydevtarmac) wrote :

The attempt to merge lp:~elopio/snappy/wait-boot-ok into lp:snappy failed. Below is the output from the failed tests.

Checking docs
Checking formatting
Formatting wrong in following files
_integration-tests/tests/rollback_test.go

# we always run in a fresh dir in tarmac
export GOPATH=$(mktemp -d)
trap 'rm -rf "$GOPATH"' EXIT

# this is a hack, but not sure tarmac is golang friendly
mkdir -p $GOPATH/src/launchpad.net/snappy
cp -a . $GOPATH/src/launchpad.net/snappy/
cd $GOPATH/src/launchpad.net/snappy

sh -v ./run-checks
#!/bin/sh

set -eu

if which goctest >/dev/null; then
    goctest="goctest"
else
    goctest="go test"
fi

QUICK=""
if [ "${1:-}" = "--quick" ]; then
    QUICK=yes
fi

echo Checking docs
./mdlint.py docs/*.md

echo Checking formatting
fmt=$(gofmt -l .)

if [ -n "$fmt" ]; then
    echo "Formatting wrong in following files"
    echo "$fmt"
    exit 1
fi

Revision history for this message
Snappy Tarmac (snappydevtarmac) wrote :
Download full text (11.4 KiB)

The attempt to merge lp:~elopio/snappy/wait-boot-ok into lp:snappy failed. Below is the output from the failed tests.

Checking docs
Checking formatting
Installing godeps
Install golint
Obtaining dependencies
update github.com/cheggaaa/pb failed; trying to fetch newer version
update github.com/mvo5/uboot-go failed; trying to fetch newer version
github.com/cheggaaa/pb now at e8c7cc515bfde3e267957a3b110080ceed51354e
update golang.org/x/crypto failed; trying to fetch newer version
github.com/mvo5/uboot-go now at 361f6ebcbb54f389d15dc9faefa000e996ba3e37
update github.com/gorilla/mux failed; trying to fetch newer version
golang.org/x/crypto now at 60052bd85f2d91293457e8811b0cf26b773de469
update github.com/gosexy/gettext failed; trying to fetch newer version
github.com/gorilla/mux now at ee1815431e497d3850809578c93ab6705f1a19f7
update github.com/mvo5/goconfigparser failed; trying to fetch newer version
github.com/gosexy/gettext now at 98b7b91596d20b96909e6b60d57411547dd9959c
update github.com/peterh/liner failed; trying to fetch newer version
github.com/mvo5/goconfigparser now at 26426272dda20cc76aa1fa44286dc743d2972fe8
update code.google.com/p/go.crypto failed; trying to fetch newer version
github.com/peterh/liner now at 1bb0d1c1a25ed393d8feb09bab039b2b1b1fbced
update github.com/blakesmith/ar failed; trying to fetch newer version
code.google.com/p/go.crypto now at 69e2a90ed92d03812364aeb947b7068dc42e561e
update github.com/coreos/go-systemd failed; trying to fetch newer version
github.com/blakesmith/ar now at c9a977dd0cc1392b023382c7bfa5a22af8d3b730
update github.com/gorilla/context failed; trying to fetch newer version
github.com/coreos/go-systemd now at f743bc15d6bddd23662280b4ad20f7c874cdd5ad
update github.com/jessevdk/go-flags failed; trying to fetch newer version
github.com/gorilla/context now at 1c83b3eabd45b6d76072b66b746c20815fb2872d
update gopkg.in/check.v1 failed; trying to fetch newer version
github.com/jessevdk/go-flags now at 1acbbaff2f347c412a0c7884873bd72cc9c1f5b4
update gopkg.in/yaml.v2 failed; trying to fetch newer version
gopkg.in/check.v1 now at 64131543e7896d5bcc6bd5a76287eb75ea96c673
update gopkg.in/tomb.v2 failed; trying to fetch newer version
gopkg.in/yaml.v2 now at 49c95bdc21843256fb6c4e0d370a05f24a0bf213
gopkg.in/tomb.v2 now at 14b3d72120e8d10ea6e6b7f87f7175734b1faab8
Building
Running tests from /tmp/tmp.8InWSzIOeo/src/launchpad.net/snappy
=== RUN Test
OK: 18 passed
--- PASS: Test (0.35 seconds)
PASS
coverage: 74.8% of statements
ok launchpad.net/snappy/clickdeb 0.356s coverage: 74.8% of statements
? launchpad.net/snappy/cmd/snapd [no test files]
=== RUN Test
2015/10/01 14:52:18.472171 common.go:40: PANIC can not set option description for "package name"
OK: 12 passed
--- PASS: Test (0.09 seconds)
PASS
coverage: 20.9% of statements
ok launchpad.net/snappy/cmd/snappy 0.101s coverage: 20.9% of statements
=== RUN Test
OK: 41 passed
--- PASS: Test (0.11 seconds)
PASS
coverage: 89.7% of statements
ok launchpad.net/snappy/coreconfig 0.126s coverage: 89.7% of statements
=== RUN Test
OK: 26 passed
--- PASS: Test (0.11 seconds)
PASS
coverage: 68.1% of statements
ok launchpad.net/snappy/daemon 0.125s coverage: 68.1% of sta...

Revision history for this message
Snappy Tarmac (snappydevtarmac) wrote :
Download full text (11.4 KiB)

The attempt to merge lp:~elopio/snappy/wait-boot-ok into lp:snappy failed. Below is the output from the failed tests.

Checking docs
Checking formatting
Installing godeps
Install golint
Obtaining dependencies
update github.com/blakesmith/ar failed; trying to fetch newer version
update github.com/coreos/go-systemd failed; trying to fetch newer version
github.com/blakesmith/ar now at c9a977dd0cc1392b023382c7bfa5a22af8d3b730
update github.com/gorilla/context failed; trying to fetch newer version
github.com/coreos/go-systemd now at f743bc15d6bddd23662280b4ad20f7c874cdd5ad
update github.com/jessevdk/go-flags failed; trying to fetch newer version
github.com/gorilla/context now at 1c83b3eabd45b6d76072b66b746c20815fb2872d
update gopkg.in/check.v1 failed; trying to fetch newer version
github.com/jessevdk/go-flags now at 1acbbaff2f347c412a0c7884873bd72cc9c1f5b4
update gopkg.in/yaml.v2 failed; trying to fetch newer version
gopkg.in/check.v1 now at 64131543e7896d5bcc6bd5a76287eb75ea96c673
update gopkg.in/tomb.v2 failed; trying to fetch newer version
gopkg.in/yaml.v2 now at 49c95bdc21843256fb6c4e0d370a05f24a0bf213
update github.com/cheggaaa/pb failed; trying to fetch newer version
gopkg.in/tomb.v2 now at 14b3d72120e8d10ea6e6b7f87f7175734b1faab8
update github.com/mvo5/uboot-go failed; trying to fetch newer version
github.com/cheggaaa/pb now at e8c7cc515bfde3e267957a3b110080ceed51354e
update golang.org/x/crypto failed; trying to fetch newer version
github.com/mvo5/uboot-go now at 361f6ebcbb54f389d15dc9faefa000e996ba3e37
update github.com/gorilla/mux failed; trying to fetch newer version
golang.org/x/crypto now at 60052bd85f2d91293457e8811b0cf26b773de469
update github.com/gosexy/gettext failed; trying to fetch newer version
github.com/gorilla/mux now at ee1815431e497d3850809578c93ab6705f1a19f7
update github.com/mvo5/goconfigparser failed; trying to fetch newer version
github.com/gosexy/gettext now at 98b7b91596d20b96909e6b60d57411547dd9959c
update github.com/peterh/liner failed; trying to fetch newer version
github.com/mvo5/goconfigparser now at 26426272dda20cc76aa1fa44286dc743d2972fe8
update code.google.com/p/go.crypto failed; trying to fetch newer version
github.com/peterh/liner now at 1bb0d1c1a25ed393d8feb09bab039b2b1b1fbced
code.google.com/p/go.crypto now at 69e2a90ed92d03812364aeb947b7068dc42e561e
Building
Running tests from /tmp/tmp.IdgwDiOjba/src/launchpad.net/snappy
=== RUN Test
OK: 18 passed
--- PASS: Test (0.38 seconds)
PASS
coverage: 75.2% of statements
ok launchpad.net/snappy/clickdeb 0.387s coverage: 75.2% of statements
? launchpad.net/snappy/cmd/snapd [no test files]
=== RUN Test
2015/10/01 15:12:12.007522 common.go:40: PANIC can not set option description for "package name"
OK: 12 passed
--- PASS: Test (0.07 seconds)
PASS
coverage: 20.9% of statements
ok launchpad.net/snappy/cmd/snappy 0.102s coverage: 20.9% of statements
=== RUN Test
OK: 41 passed
--- PASS: Test (0.11 seconds)
PASS
coverage: 89.7% of statements
ok launchpad.net/snappy/coreconfig 0.112s coverage: 89.7% of statements
=== RUN Test
OK: 26 passed
--- PASS: Test (0.10 seconds)
PASS
coverage: 68.1% of statements
ok launchpad.net/snappy/daemon 0.103s coverage: 68.1% of sta...

Preview Diff

[H/L] Next/Prev Comment, [J/K] Next/Prev File, [N/P] Next/Prev Hunk
1=== modified file '_integration-tests/tests/rollback_test.go'
2--- _integration-tests/tests/rollback_test.go 2015-07-30 09:07:31 +0000
3+++ _integration-tests/tests/rollback_test.go 2015-10-01 15:12:45 +0000
4@@ -23,6 +23,8 @@
5 "strconv"
6
7 . "launchpad.net/snappy/_integration-tests/testutils/common"
8+ "launchpad.net/snappy/_integration-tests/testutils/partition"
9+ "launchpad.net/snappy/_integration-tests/testutils/wait"
10
11 check "gopkg.in/check.v1"
12 )
13@@ -39,6 +41,9 @@
14 Reboot(c)
15 } else if CheckRebootMark(c.TestName()) {
16 RemoveRebootMark(c)
17+ // Workaround for bug https://bugs.launchpad.net/snappy/+bug/1498293
18+ // TODO remove once the bug is fixed. --elopio - 2015-09-30
19+ wait.ForFunction(c, "regular", partition.Mode)
20 currentVersion := GetCurrentUbuntuCoreVersion(c)
21 c.Assert(currentVersion > GetSavedVersion(c), check.Equals, true)
22 ExecCommand(c, "sudo", "snappy", "rollback", "ubuntu-core",
23
24=== modified file '_integration-tests/testutils/partition/bootloader.go'
25--- _integration-tests/testutils/partition/bootloader.go 2015-09-13 02:52:52 +0000
26+++ _integration-tests/testutils/partition/bootloader.go 2015-10-01 15:12:45 +0000
27@@ -69,7 +69,7 @@
28 // config file. For uboot systems the boot config file does not change, so that
29 // we take the other partition in that case
30 func NextBootPartition() (partition string, err error) {
31- m, err := mode()
32+ m, err := Mode()
33 if err != nil {
34 return
35 }
36@@ -96,7 +96,8 @@
37 return
38 }
39
40-func mode() (mode string, err error) {
41+// Mode returns the current bootloader mode, regular or try.
42+func Mode() (mode string, err error) {
43 return confValue("snappy_mode")
44 }
45
46@@ -144,7 +145,7 @@
47 if err != nil {
48 return
49 }
50- m, err := mode()
51+ m, err := Mode()
52 if err != nil {
53 return
54 }
55
56=== modified file '_integration-tests/testutils/partition/bootloader_test.go'
57--- _integration-tests/testutils/partition/bootloader_test.go 2015-09-13 02:55:08 +0000
58+++ _integration-tests/testutils/partition/bootloader_test.go 2015-10-01 15:12:45 +0000
59@@ -244,7 +244,7 @@
60 return "test-system", nil
61 }
62
63- mode, err := mode()
64+ mode, err := Mode()
65
66 c.Assert(err, check.IsNil, check.Commentf("Unexpected error %v", err))
67 c.Assert(mode, check.Equals, "test_mode", check.Commentf("Wrong mode"))

Subscribers

People subscribed via source and target branches