Merge lp:~mvo/snappy/snappy-review-tools-reenable into lp:~snappy-dev/snappy/snappy-moved-to-github

Proposed by Michael Vogt on 2015-07-09
Status: Approved
Approved by: Leo Arias on 2015-10-26
Approved revision: 575
Proposed branch: lp:~mvo/snappy/snappy-review-tools-reenable
Merge into: lp:~snappy-dev/snappy/snappy-moved-to-github
Diff against target: 66 lines (+15/-11)
2 files modified
_integration-tests/testutils/build/snap.go (+8/-2)
cmd/snappy/cmd_build.go (+7/-9)
To merge this branch: bzr merge lp:~mvo/snappy/snappy-review-tools-reenable
Reviewer Review Type Date Requested Status
Leo Arias Approve on 2015-10-26
Federico Gimenez (community) continuous-integration Needs Fixing on 2015-08-19
John Lenton 2015-07-09 Approve on 2015-07-24
Snappy Tarmac continuous-integration Pending
Review via email: mp+264301@code.launchpad.net

Description of the Change

Once the tools are updated from the latest upload in tools-proposed this MP can land as the click-review-tools are now working very well with snaps.

To post a comment you must log in.
John Lenton (chipaca) wrote :

Yes please. Top approve if/when the tools are ready.

review: Approve
Federico Gimenez (fgimenez) wrote :

FAILED: Continuous integration, rev:573
No commit message was specified in the merge proposal. Click on the following link and set the commit message (if you want a jenkins rebuild you need to trigger it yourself):
https://code.launchpad.net/~mvo/snappy/snappy-review-tools-reenable/+merge/264301/+edit-commit-message

http://10.55.60.183:8080/job/snappy-rolling-ci/26/
Executed test runs:

Click here to trigger a rebuild:
http://10.55.60.183:8080/job/snappy-rolling-ci/26/rebuild

review: Needs Fixing (continuous-integration)
Leo Arias (elopio) wrote :

We have an integration test that builds a snap: http://bazaar.launchpad.net/~snappy-dev/snappy/snappy/view/head:/_integration-tests/tests/build_test.go#L49
The build is done in the snappy machine, and it is not expecting the warning we get when click-review is not installed. So, the test needs to be updated to match a more relaxed rexexp. And we need a new card to test more builds including the review, but that should probably wait until comfy is properly defined.

START: /tmp/snappy-tests-job/24707/src/launchpad.net/snappy/_integration-tests/tests/build_test.go:49: buildSuite.TestBuildBasicSnapOnSnappy
START: <autogenerated>:7: buildSuite.SetUpTest
****** Running buildSuite.TestBuildBasicSnapOnSnappy
[...]

snappy build _integration-tests/data/snaps/basic
Warning: could not review package (click-review not available)
Generated 'basic_1.0_all.snap' snap
/tmp/snappy-tests-job/24707/src/launchpad.net/snappy/_integration-tests/tests/build_test.go:55:
    ...open /tmp/snappy-tests-job/24707/src/launchpad.net/snappy/_integration-tests/tests/build_test.go: no such file or directory
... obtained string = "" +
... "Warning: could not review package (click-review not available)\n" +
... "Generated 'basic_1.0_all.snap' snap\n"
... expected string = "Generated 'basic_1.0_all.snap' snap\n"

review: Needs Fixing
Michael Vogt (mvo) wrote :

This branch was somehow forgotten. We should resurrect it :) What needs to happen for the test? Can we just install click-reviewers-tools from the tools PPA?

Leo Arias (elopio) wrote :

After merging with trunk, something like this makes the test pass.

http://paste.ubuntu.com/12705348/

We can't install the reviewer tools because we are doing the build on snappy itself. Well, we could install them, but not with apt-get.
Now that your classic dimension snappy is coming, we can move the build to that environment, and test more things. For now, this will do.

574. By Michael Vogt on 2015-10-16

merged lp:snappy

575. By Michael Vogt on 2015-10-16

apply patch from Leo to fix integration tests

Michael Vogt (mvo) wrote :

Thanks Leo! I updated the branch and applied your patch. Hopefully its ready now.

Leo Arias (elopio) wrote :

:D

review: Approve

Unmerged revisions

575. By Michael Vogt on 2015-10-16

apply patch from Leo to fix integration tests

574. By Michael Vogt on 2015-10-16

merged lp:snappy

573. By Michael Vogt on 2015-07-09

re-enable the review tools

Preview Diff

[H/L] Next/Prev Comment, [J/K] Next/Prev File, [N/P] Next/Prev Hunk
1=== modified file '_integration-tests/testutils/build/snap.go'
2--- _integration-tests/testutils/build/snap.go 2015-10-08 07:32:04 +0000
3+++ _integration-tests/testutils/build/snap.go 2015-10-16 16:49:08 +0000
4@@ -22,6 +22,7 @@
5 import (
6 "fmt"
7 "path/filepath"
8+ "regexp"
9
10 "gopkg.in/check.v1"
11 "launchpad.net/snappy/_integration-tests/testutils/cli"
12@@ -48,8 +49,13 @@
13 snapName = snapName + snapFilenameSufix
14
15 path := filepath.Join(buildPath, snapName)
16- expected := fmt.Sprintf("Generated '%s' snap\n", path)
17- if buildOutput != expected {
18+
19+ expected := fmt.Sprintf("(?ms).*Generated '%s' snap\n$", path)
20+ matched, err := regexp.MatchString(expected, buildOutput)
21+ if err != nil {
22+ return "", err
23+ }
24+ if !matched {
25 return "", fmt.Errorf("Error building snap, expected output %s, obtained %s",
26 expected, buildOutput)
27 }
28
29=== modified file 'cmd/snappy/cmd_build.go'
30--- cmd/snappy/cmd_build.go 2015-10-07 15:47:01 +0000
31+++ cmd/snappy/cmd_build.go 2015-10-16 16:49:08 +0000
32@@ -21,6 +21,8 @@
33
34 import (
35 "fmt"
36+ "os"
37+ "os/exec"
38
39 "launchpad.net/snappy/i18n"
40 "launchpad.net/snappy/logger"
41@@ -64,20 +66,16 @@
42 return err
43 }
44
45- /*
46- Disabling review tools run until the output reflects reality more closely
47-
48- _, err = exec.LookPath(clickReview)
49- if err != nil {
50- fmt.Fprintf(os.Stderr, "Warning: could not review package (%s not available)\n", clickReview)
51- }
52-
53+ _, err = exec.LookPath(clickReview)
54+ if err != nil {
55+ fmt.Fprintf(os.Stderr, "Warning: could not review package (%s not available)\n", clickReview)
56+ } else {
57 cmd := exec.Command(clickReview, snapPackage)
58 cmd.Stdout = os.Stdout
59 cmd.Stderr = os.Stderr
60 // we ignore the error for now
61 _ = cmd.Run()
62- */
63+ }
64
65 // TRANSLATORS: the %s is a pkgname
66 fmt.Printf(i18n.G("Generated '%s' snap\n"), snapPackage)

Subscribers

People subscribed via source and target branches