summaryrefslogtreecommitdiffstats
path: root/test/scripts/cover
diff options
context:
space:
mode:
Diffstat (limited to 'test/scripts/cover')
-rwxr-xr-xtest/scripts/cover13
1 files changed, 13 insertions, 0 deletions
diff --git a/test/scripts/cover b/test/scripts/cover
new file mode 100755
index 00000000..1ebe596d
--- /dev/null
+++ b/test/scripts/cover
@@ -0,0 +1,13 @@
+#!/bin/sh
+# This script is used by sharness tests hosted in our `test`
+# directory. We require a concrete script to make using this easily,
+# because we often call `env` in those tests.
+#
+# The purpose of this script is to allow sharness tests to gather
+# Python coverage when calling scripts within `aurweb`.
+#
+TOPLEVEL=$(dirname "$0")/../..
+
+# Define a COVERAGE_FILE in our root directory.
+COVERAGE_FILE="$TOPLEVEL/.coverage" \
+coverage run -L --source="$TOPLEVEL/aurweb" --append "$@"