aboutsummaryrefslogtreecommitdiffstats
diff options
context:
space:
mode:
authorGravatar MarkKoz <[email protected]>2021-02-04 11:01:38 -0800
committerGravatar MarkKoz <[email protected]>2021-02-04 16:19:46 -0800
commita8ff3f4da0ae87e2a409e45b6cfb5c1ff72084a1 (patch)
tree6aeceecdc21900d517a36247c80352278bbf34c3
parentDocument how to update NsJail (diff)
Fix coverage ownership when running tests
-rw-r--r--Pipfile3
1 files changed, 2 insertions, 1 deletions
diff --git a/Pipfile b/Pipfile
index 7b087ba..4a1e9d3 100644
--- a/Pipfile
+++ b/Pipfile
@@ -39,9 +39,10 @@ precommit = "pre-commit install"
# Testing
report = "coverage report"
+# Fix ownership of the coverage file even if tests fail & preserve exit code
test = """
docker-compose run --entrypoint /bin/bash --rm snekbox -c \
- 'coverage run -m unittest'
+ 'coverage run -m unittest; e=$?; chown --reference=. .coverage; exit $e'
"""
# Docker