Merge lp://qastaging/~fgimenez/snappy/integration-tests-verbosity-flag into lp://qastaging/~snappy-dev/snappy/snappy-moved-to-github
Status: | Needs review |
---|---|
Proposed branch: | lp://qastaging/~fgimenez/snappy/integration-tests-verbosity-flag |
Merge into: | lp://qastaging/~snappy-dev/snappy/snappy-moved-to-github |
Diff against target: |
766 lines (+345/-35) 16 files modified
_integration-tests/main.go (+8/-1) _integration-tests/tests/base_test.go (+16/-0) _integration-tests/testutils/autopkgtest/autopkgtest.go (+2/-2) _integration-tests/testutils/autopkgtest/autopkgtest_test.go (+26/-1) _integration-tests/testutils/autopkgtest/ssh.go (+14/-2) _integration-tests/testutils/build/build.go (+4/-4) _integration-tests/testutils/build/build_test.go (+0/-1) _integration-tests/testutils/cli/cli.go (+4/-3) _integration-tests/testutils/common/common.go (+8/-7) _integration-tests/testutils/config/config.go (+7/-5) _integration-tests/testutils/config/config_test.go (+5/-3) _integration-tests/testutils/image/image.go (+2/-2) _integration-tests/testutils/partition/partition.go (+0/-2) _integration-tests/testutils/testutils.go (+3/-2) _integration-tests/testutils/tlog/tlog.go (+101/-0) _integration-tests/testutils/tlog/tlog_test.go (+145/-0) |
To merge this branch: | bzr merge lp://qastaging/~fgimenez/snappy/integration-tests-verbosity-flag |
Related bugs: |
Reviewer | Review Type | Date Requested | Status |
---|---|---|---|
Leo Arias (community) | Needs Information | ||
Review via email:
|
Commit message
Integration tests verbosity flag
Description of the change
Integration tests verbosity flag.
There are currently only two levels implemented, DebugLevel (the default) and InfoLevel. The level can be set with:
tlog.
There are functions for logging at each level, tlog.Debugf and tlog.Infof. Currently all the previous fmt.Print have been changed into tlog.Debugf, which makes that, being DebugLevel the default, without flags the test run logs the same output as before. To get a less verbose output:
$ go run _integration-
There are currently no messages sent with tlog.Infof, the previous command only logs gocheck and adt-run related output.
Unmerged revisions
- 746. By Federico Gimenez
-
boot log also affected by the flag
- 745. By Federico Gimenez
-
set level in testbed moved to base_test's init
- 744. By Federico Gimenez
-
loglevel flag; passing the loglevel to the testbedd in config
- 743. By Federico Gimenez
-
removed calls to fmt.Print; added new line
- 742. By Federico Gimenez
-
tlog package
Thanks for working on this.
I'm wondering if we should use log.Print instead of fmt.Fprint. I've never done logging in go before, so I think it would be nice to get a review from mvo, sergio or chipaca. Can you please ask one of them tomorrow to take a quick look?