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

Various improvements to unit test running #1120

Merged
merged 1 commit into from
Jul 13, 2015
Merged

Various improvements to unit test running #1120

merged 1 commit into from
Jul 13, 2015

Conversation

tomwilkie
Copy link
Contributor

  • units.sh should exit on error.
  • Add race detector to unit test runner (fixes add race detector Makefile target and run that on CI #998)
  • Use local testing/cover/cover tool in gen_coverage_report.sh and units.sh
  • Use the scheduler to parallelise the unit tests.
  • Make test run id a string and differentiate between unit runs and integration runs in the scheduler.
  • Pipe circle env vars through to build container so we can detect when to use the scheduler
  • Add python requests to the weave build container.
  • Quote test names in urls, make flask handle url segments with slashes in.

@@ -1,6 +1,7 @@
#!/bin/bash

set -ex
set -eux

This comment was marked as abuse.

- units.sh should exit on error.
- Add race detector to unit test runner.
- Use local testing/cover/cover tool in gen_coverage_report.sh and units.sh
- Use the scheduler to parallelise the unit tests.
- Make test run id a string and differentiate between unit runs and integration runs in the scheduler.
- Pipe circle env vars through to build container so we can detect when to use the scheduler
- Add python requests to the weave build container.
- Quote test names in urls, make flask handle url segments with slashes in.
@tomwilkie
Copy link
Contributor Author

Sorry, bad merge. I've removed it now.

@awh awh self-assigned this Jul 13, 2015
if ! go test -cpu 4 -tags netgo -covermode=count -coverprofile=$output $dir ; then
fail=1
fi
TESTDIRS=$(find . -type f -name '*_test.go' | xargs -n1 dirname | grep -v prog | sort -u)

This comment was marked as abuse.

awh added a commit that referenced this pull request Jul 13, 2015
Various improvements to unit test running
@awh awh merged commit d644380 into master Jul 13, 2015
@awh awh deleted the 998-race branch July 13, 2015 13:10
@rade rade modified the milestones: current, 1.1.0 Jul 13, 2015
@dpw
Copy link
Contributor

dpw commented Jul 20, 2015

Why is the weave-build container being overloaded to run tests? If you want a container to run tests, then introduce one for that purpose. And layer it on top of a common base with weave-build, if that makes sense. But weave-build is for building weave, and only for that. Please clean this up, and copy me on PRs that touch weave-build in future.

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.

add race detector Makefile target and run that on CI
4 participants