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
=== modified file '_integration-tests/main.go'
--- _integration-tests/main.go 2015-08-10 07:46:52 +0000
+++ _integration-tests/main.go 2015-09-02 03:23:51 +0000
@@ -34,11 +34,11 @@
34)34)
3535
36const (36const (
37 baseDir = "/tmp/snappy-test"37 defaultOutputDir = "/tmp/snappy-test"
38 defaultRelease = "rolling"38 defaultRelease = "rolling"
39 defaultChannel = "edge"39 defaultChannel = "edge"
40 defaultSSHPort = 2240 defaultSSHPort = 22
41 dataOutputDir = "_integration-tests/data/output/"41 dataOutputDir = "_integration-tests/data/output/"
42)42)
4343
44var configFileName = filepath.Join(dataOutputDir, "testconfig.json")44var configFileName = filepath.Join(dataOutputDir, "testconfig.json")
@@ -69,6 +69,7 @@
69 "If the update flag is used, the image will be updated to this channel before running the tests.")69 "If the update flag is used, the image will be updated to this channel before running the tests.")
70 rollback = flag.Bool("rollback", false,70 rollback = flag.Bool("rollback", false,
71 "If this flag is used, the image will be updated and then rolled back before running the tests.")71 "If this flag is used, the image will be updated and then rolled back before running the tests.")
72 outputDir = flag.String("output-dir", defaultOutputDir, "Directory where test artifacts will be stored.")
72 )73 )
7374
74 flag.Parse()75 flag.Parse()
@@ -90,9 +91,9 @@
9091
91 rootPath := testutils.RootPath()92 rootPath := testutils.RootPath()
9293
93 test := autopkgtest.NewAutopkgtest(rootPath, baseDir, *testFilter, build.IntegrationTestName)94 test := autopkgtest.NewAutopkgtest(rootPath, *outputDir, *testFilter, build.IntegrationTestName)
94 if !remoteTestbed {95 if !remoteTestbed {
95 img := image.NewImage(*imgRelease, *imgChannel, *imgRevision, baseDir)96 img := image.NewImage(*imgRelease, *imgChannel, *imgRevision, *outputDir)
9697
97 if imagePath, err := img.UdfCreate(); err == nil {98 if imagePath, err := img.UdfCreate(); err == nil {
98 if err = test.AdtRunLocal(imagePath); err != nil {99 if err = test.AdtRunLocal(imagePath); err != nil {

Subscribers

People subscribed via source and target branches