aboutsummaryrefslogtreecommitdiff
path: root/ci/common/test.sh
diff options
context:
space:
mode:
authorZyX <kp-pav@yandex.ru>2017-03-31 16:02:53 +0300
committerZyX <kp-pav@yandex.ru>2017-03-31 16:06:17 +0300
commit2bf9d36ccd59f12e3895c885e8cf17e620bf191b (patch)
treed97b0806a79c1b6e55586c123966770027ad4cad /ci/common/test.sh
parent4d0f90f94db6040841b9987d02a021b785cfe0f3 (diff)
downloadrneovim-2bf9d36ccd59f12e3895c885e8cf17e620bf191b.tar.gz
rneovim-2bf9d36ccd59f12e3895c885e8cf17e620bf191b.tar.bz2
rneovim-2bf9d36ccd59f12e3895c885e8cf17e620bf191b.zip
ci: Refactor CI scripts
1. CI_TARGET now determines which run_${CI_TARGET}.sh script to use. Defaults to `tests`. 2. Build no longer halts on the first failing suit: e.g. if functional tests failed it will continue with unit tests, etc. 3. All ${MAKE_CMD} occurrences moved to `top_make` function, added `build_make` as an alias to `make -C build` (`"${MAKE_CMD}" -C "${BUILD_DIR}"`) which is too verbose. `suite.sh` was copied from powerline (tests/common.sh file), assumes running with POSIX shells (and actually uses dash in powerline). Then some convenience functions were added (run_test and below).
Diffstat (limited to 'ci/common/test.sh')
-rw-r--r--ci/common/test.sh8
1 files changed, 5 insertions, 3 deletions
diff --git a/ci/common/test.sh b/ci/common/test.sh
index b28e46a4df..4936992cfd 100644
--- a/ci/common/test.sh
+++ b/ci/common/test.sh
@@ -1,3 +1,5 @@
+source "${CI_DIR}/common/build.sh"
+
print_core() {
local app="$1"
local core="$2"
@@ -75,7 +77,7 @@ asan_check() {
run_unittests() {
ulimit -c unlimited
- if ! ${MAKE_CMD} -C "${BUILD_DIR}" unittest ; then
+ if ! build_make unittest ; then
check_core_dumps "$(which luajit)"
exit 1
fi
@@ -84,7 +86,7 @@ run_unittests() {
run_functionaltests() {
ulimit -c unlimited
- if ! ${MAKE_CMD} -C "${BUILD_DIR}" ${FUNCTIONALTEST}; then
+ if ! build_make ${FUNCTIONALTEST}; then
asan_check "${LOG_DIR}"
valgrind_check "${LOG_DIR}"
check_core_dumps
@@ -110,7 +112,7 @@ run_oldtests() {
}
install_nvim() {
- ${MAKE_CMD} -C "${BUILD_DIR}" install
+ build_make install
"${INSTALL_PREFIX}/bin/nvim" --version
"${INSTALL_PREFIX}/bin/nvim" -u NONE -e -c ':help' -c ':qall' || {