2015-07-05 00:52:36 -07:00
|
|
|
#!/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"
|
2017-03-31 06:02:53 -07:00
|
|
|
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')
|
2022-02-14 02:17:25 -07:00
|
|
|
|
|
|
|
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')
|
2022-02-14 02:17:25 -07:00
|
|
|
fi
|
2022-03-05 10:07:46 -07:00
|
|
|
tests+=('functionaltests')
|
2022-02-07 06:00:08 -07:00
|
|
|
fi
|
2017-04-30 20:45:24 -07:00
|
|
|
|
2022-03-05 10:07:46 -07:00
|
|
|
tests+=('oldtests' 'install_nvim')
|
2022-02-14 02:17:25 -07:00
|
|
|
else
|
2022-03-05 10:07:46 -07:00
|
|
|
tests=("$@")
|
2022-02-14 02:17:25 -07:00
|
|
|
fi
|
2022-03-05 10:07:46 -07:00
|
|
|
|
|
|
|
for i in "${tests[@]}"; do
|
|
|
|
eval "$i" || fail "$i"
|
|
|
|
done
|
|
|
|
|
|
|
|
end_tests
|
2022-07-11 07:40:49 -07:00
|
|
|
|
|
|
|
if [[ -s "${GCOV_ERROR_FILE}" ]]; then
|
|
|
|
echo '=== Unexpected gcov errors: ==='
|
|
|
|
cat "${GCOV_ERROR_FILE}"
|
|
|
|
exit 1
|
|
|
|
fi
|