Skip to content

Commit

Permalink
Fix runtime coverage save (use /tmp for write permissions)
Browse files Browse the repository at this point in the history
  • Loading branch information
ambrussimon committed Jan 17, 2018
1 parent e1747c1 commit 005b1f9
Show file tree
Hide file tree
Showing 2 changed files with 2 additions and 2 deletions.
2 changes: 1 addition & 1 deletion api/web/start.py
Original file line number Diff line number Diff line change
Expand Up @@ -8,7 +8,7 @@
# http://coverage.readthedocs.io/en/coverage-4.2/faq.html
if os.environ.get("SCITRAN_RUNTIME_COVERAGE") == "true": # pragma: no cover - oh, the irony
import coverage
cov = coverage.coverage(source=["api"], data_suffix="integration-tests")
cov = coverage.coverage(source=["api"], data_file="/tmp/.coverage.integration-tests")

class CoverageSaveHandler(webapp2.RequestHandler):
def save_coverage(self):
Expand Down
2 changes: 1 addition & 1 deletion tests/bin/docker-tests.sh
Original file line number Diff line number Diff line change
Expand Up @@ -106,7 +106,7 @@ clean_up() {

# Save integration test coverage
docker exec core-test-service python -c 'import requests; requests.post("http://localhost/api/save-coverage")'
docker cp core-test-service:/src/core/.coverage.integration-tests ./ 2>/dev/null
docker cp core-test-service:/tmp/.coverage.integration-tests ./ 2>/dev/null

# Combine unit/integ coverage and report/grenerate html
docker run --rm \
Expand Down

0 comments on commit 005b1f9

Please sign in to comment.