Merge lp:~elopio/snappy/integration_output into lp:~snappy-dev/snappy/snappy-moved-to-github

Proposed by Leo Arias
Status: Merged
Approved by: Federico Gimenez
Approved revision: 645
Merged at revision: 645
Proposed branch: lp:~elopio/snappy/integration_output
Merge into: lp:~snappy-dev/snappy/snappy-moved-to-github
Diff against target: 40 lines (+8/-7)
1 file modified
_integration-tests/main.go (+8/-7)
To merge this branch: bzr merge lp:~elopio/snappy/integration_output
Reviewer Review Type Date Requested Status
Federico Gimenez (community) Approve
Review via email: mp+269830@code.launchpad.net

Commit message

Added the output dir as an optional parameter to the integration tests.

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

Nice, thanks Leo

review: Approve

Preview Diff

[H/L] Next/Prev Comment, [J/K] Next/Prev File, [N/P] Next/Prev Hunk
1=== modified file '_integration-tests/main.go'
2--- _integration-tests/main.go 2015-08-10 07:46:52 +0000
3+++ _integration-tests/main.go 2015-09-02 03:23:51 +0000
4@@ -34,11 +34,11 @@
5 )
6
7 const (
8- baseDir = "/tmp/snappy-test"
9- defaultRelease = "rolling"
10- defaultChannel = "edge"
11- defaultSSHPort = 22
12- dataOutputDir = "_integration-tests/data/output/"
13+ defaultOutputDir = "/tmp/snappy-test"
14+ defaultRelease = "rolling"
15+ defaultChannel = "edge"
16+ defaultSSHPort = 22
17+ dataOutputDir = "_integration-tests/data/output/"
18 )
19
20 var configFileName = filepath.Join(dataOutputDir, "testconfig.json")
21@@ -69,6 +69,7 @@
22 "If the update flag is used, the image will be updated to this channel before running the tests.")
23 rollback = flag.Bool("rollback", false,
24 "If this flag is used, the image will be updated and then rolled back before running the tests.")
25+ outputDir = flag.String("output-dir", defaultOutputDir, "Directory where test artifacts will be stored.")
26 )
27
28 flag.Parse()
29@@ -90,9 +91,9 @@
30
31 rootPath := testutils.RootPath()
32
33- test := autopkgtest.NewAutopkgtest(rootPath, baseDir, *testFilter, build.IntegrationTestName)
34+ test := autopkgtest.NewAutopkgtest(rootPath, *outputDir, *testFilter, build.IntegrationTestName)
35 if !remoteTestbed {
36- img := image.NewImage(*imgRelease, *imgChannel, *imgRevision, baseDir)
37+ img := image.NewImage(*imgRelease, *imgChannel, *imgRevision, *outputDir)
38
39 if imagePath, err := img.UdfCreate(); err == nil {
40 if err = test.AdtRunLocal(imagePath); err != nil {

Subscribers

People subscribed via source and target branches