Merge lp://staging/~jameinel/goose/test-script into lp://staging/~gophers/goose/trunk

Proposed by John A Meinel
Status: Merged
Merged at revision: 49
Proposed branch: lp://staging/~jameinel/goose/test-script
Merge into: lp://staging/~gophers/goose/trunk
Diff against target: 177 lines (+173/-0)
1 file modified
test.py (+173/-0)
To merge this branch: bzr merge lp://staging/~jameinel/goose/test-script
Reviewer Review Type Date Requested Status
Dimiter Naydenov (community) Approve
Review via email: mp+144312@code.staging.launchpad.net

Commit message

test.py: Add test.py as a way to ensure the test suite gets run in a consistent way.

Description of the change

This adds a test.py script to goose.

This was designed to be run by the tarmac bot, but it should be something that we can use ourselves.

The biggest thing that it provides today is 'py test.py --live' which will:

a) Run 'go build'
b) Run 'go test ./...'
c) Go to each directory with live tests and run 'go test -live -gocheck.v'

This is a little bit redundant, because -live also runs the regular tests. But we don't have a great way (yet) to cd into every directory and run the tests (./...) while also passing a parameter that only some sets provide.

This also will play some tricks about setting your GOPATH, which would let you work in 'any directory you want' as long as it has 'src/launchpad.net/goose' in it, because that is required by the go infrastructure.

It also provides a 'py test.py --tarmac' flag, which does all the setup infrastructure we will need for tarmac to operate properly. (set up shared repositories, ensure juju-core and its dependencies are installed, etc.)

It doesn't yet have a flag for "and run the juju-core trunk tests as well", but I'll probably be adding that next.

To post a comment you must log in.
Revision history for this message
Dimiter Naydenov (dimitern) wrote :

Very nice! We should start using it regularly.

review: Approve

Preview Diff

[H/L] Next/Prev Comment, [J/K] Next/Prev File, [N/P] Next/Prev Hunk
The diff is not available at this time. You can reload the page or download it.

Subscribers

People subscribed via source and target branches