neovim/ci/run_tests.sh

Ignoring revisions in .git-blame-ignore-revs. Click here to bypass and see the normal blame view.

42 lines
890 B
Bash
Raw Normal View History

#!/usr/bin/env bash
set -e
set -o pipefail
CI_DIR="$(cd "$(dirname "${BASH_SOURCE[0]}")" && pwd)"
source "${CI_DIR}/common/build.sh"
source "${CI_DIR}/common/test.sh"
source "${CI_DIR}/common/suite.sh"
2022-03-05 07:40:20 -07:00
rm -f "$END_MARKER"
2022-02-07 06:00:08 -07:00
2022-03-05 10:07:46 -07:00
# Run all tests (with some caveats) if no input argument is given
if (($# == 0)); then
tests=('build_nvim')
if test "$CLANG_SANITIZER" != "TSAN"; then
# Additional threads are only created when the builtin UI starts, which
# doesn't happen in the unit/functional tests
if test "${FUNCTIONALTEST}" != "functionaltest-lua"; then
2022-03-05 10:07:46 -07:00
tests+=('unittests')
fi
2022-03-05 10:07:46 -07:00
tests+=('functionaltests')
2022-02-07 06:00:08 -07:00
fi
2022-03-05 10:07:46 -07:00
tests+=('oldtests' 'install_nvim')
else
2022-03-05 10:07:46 -07:00
tests=("$@")
fi
2022-03-05 10:07:46 -07:00
for i in "${tests[@]}"; do
eval "$i" || fail "$i"
done
end_tests
if [[ -s "${GCOV_ERROR_FILE}" ]]; then
echo '=== Unexpected gcov errors: ==='
cat "${GCOV_ERROR_FILE}"
exit 1
fi