Preserve picked patch name when possible
[stgit.git] / t / test-bin / stg
blob583163e3668fd3f08aaca9cde2fd903fbdebe3ab
1 #!/bin/sh
3 if test -n "$COVERAGE_RCFILE"
4 then
5 if test -z "$COVERAGE_FILE"
6 then
7 echo "COVERAGE_FILE and COVERAGE_RCFILE must both be defined"
8 exit 1
9 fi
10 if [ "$#" -lt 2 ] || echo "$1" | grep -q -e '^-'
11 then
12 context="stg"
13 else
14 context="stg-$1"
16 exec "${PYTHON:-python3}" -m coverage run --context "$context" -m stgit "$@"
17 else
18 exec "${PYTHON:-python3}" -m stgit "$@"