Skip to content
This repository has been archived by the owner on Jun 20, 2024. It is now read-only.

Code coverage for smoke tests. #1105

Merged
merged 3 commits into from
Jul 10, 2015
Merged

Code coverage for smoke tests. #1105

merged 3 commits into from
Jul 10, 2015

Conversation

tomwilkie
Copy link
Contributor

Fixes #673

@tomwilkie tomwilkie self-assigned this Jul 9, 2015
@tomwilkie tomwilkie force-pushed the 673-smoke-test-coverage branch 2 times, most recently from cdfe204 to 5b70302 Compare July 10, 2015 14:32
@tomwilkie tomwilkie changed the title WIP Code coverage for smoke tests. Code coverage for smoke tests. Jul 10, 2015
@tomwilkie tomwilkie removed their assignment Jul 10, 2015
Allow non-circle people to build coverage reports.
assert_raises "exec_on $HOST1 c1 $CHECK_ETHWE_UP"

run_on $HOST1 sudo weave --local run -ti --name=c2 $SMALL_IMAGE /bin/sh
run_on $HOST1 sudo COVERAGE=$COVERAGE weave --local run -ti --name=c2 $SMALL_IMAGE /bin/sh

This comment was marked as abuse.

collect_coverage() {
host=$1
rm -f cover.router.prof
docker_on $host cp weave:/home/weave/cover.router.prof . || true

This comment was marked as abuse.

This comment was marked as abuse.

"golang.org/x/tools/cover"
)

func merge(p1, p2 *cover.Profile) *cover.Profile {

This comment was marked as abuse.

This comment was marked as abuse.

This comment was marked as abuse.

This comment was marked as abuse.

@paulbellamy
Copy link
Contributor

It would be nice not to have a bunch of test gubbins littered around the weave script.

@tomwilkie
Copy link
Contributor Author

@paulbellamy re:weave script, yeah I agree, but I can't think of a better way. Any ideas?

paulbellamy added a commit that referenced this pull request Jul 10, 2015
@paulbellamy paulbellamy merged commit e3212d4 into master Jul 10, 2015
@paulbellamy paulbellamy deleted the 673-smoke-test-coverage branch July 10, 2015 15:54
COVERAGE_ARGS=""
if [ -n "$COVERAGE" ] ; then
COVERAGE_ARGS="-test.coverprofile=/home/weave/cover.router.prof --"
fi

This comment was marked as abuse.

@rade rade modified the milestones: current, 1.1.0 Jul 13, 2015
Sign up for free to subscribe to this conversation on GitHub. Already have an account? Sign in.
Labels
None yet
Projects
None yet
Development

Successfully merging this pull request may close these issues.

4 participants