Skip to content

Commit

Permalink
Browse files Browse the repository at this point in the history
still run tests on exported sources if QGIS_TEST_ACCEPT_GITSTATUS_CHE…
…CK_FAILURE is set even if git is present
  • Loading branch information
jef-n committed Jan 31, 2023
1 parent 00037bd commit b4b91a7
Showing 1 changed file with 8 additions and 5 deletions.
13 changes: 8 additions & 5 deletions scripts/chkgitstatus.sh
Expand Up @@ -7,7 +7,13 @@ command -v git > /dev/null || {
exit 2 # considered a "skip"
}

git -C ${srcdir} status -uno > .gitstatus-full || exit 1
if test "${QGIS_TEST_ACCEPT_GITSTATUS_CHECK_FAILURE}" = "1"; then
exit=2
else
exit=1
fi

git -C ${srcdir} status -uno > .gitstatus-full || exit $exit

if test "$1" = "log"; then
grep 'modified: ' .gitstatus-full | sort -u > .gitstatus
Expand All @@ -18,10 +24,7 @@ elif test "$1" = "check"; then
else
echo "Source files (printed above) were modified. Diff follows:"
git -C ${srcdir} diff
if test "${QGIS_TEST_ACCEPT_GITSTATUS_CHECK_FAILURE}" = "1"; then
exit 2 # considered a "skip" by CMake
fi
exit 1
exit $exit
fi
else
echo "Usage: $0 [log|check]" >&2
Expand Down

0 comments on commit b4b91a7

Please sign in to comment.