ci: Remove `x` from `test x`

This commit is contained in:
ZyX 2017-04-24 23:11:13 +03:00
parent 74d5705ca9
commit ee4daa6572
3 changed files with 12 additions and 12 deletions

View File

@ -7,10 +7,10 @@ build_make() {
}
build_deps() {
if test "x${BUILD_32BIT}" = xON ; then
if test "${BUILD_32BIT}" = ON ; then
DEPS_CMAKE_FLAGS="${DEPS_CMAKE_FLAGS} ${CMAKE_FLAGS_32BIT}"
fi
if test "x${FUNCTIONALTEST}" = "xfunctionaltest-lua" ; then
if test "${FUNCTIONALTEST}" = "functionaltest-lua" ; then
DEPS_CMAKE_FLAGS="${DEPS_CMAKE_FLAGS} -DUSE_BUNDLED_LUA=ON"
fi
@ -18,9 +18,9 @@ build_deps() {
# If there is a valid cache and we're not forced to recompile,
# use cached third-party dependencies.
if test -f "${CACHE_MARKER}" && test "x${BUILD_NVIM_DEPS}" != xtrue ; then
if test -f "${CACHE_MARKER}" && test "${BUILD_NVIM_DEPS}" != "true" ; then
local statcmd="stat -c '%y'"
if test "x${TRAVIS_OS_NAME}" = xosx ; then
if test "${TRAVIS_OS_NAME}" = osx ; then
statcmd="stat -f '%Sm'"
fi
echo "Using third-party dependencies from Travis's cache (last updated: $(${statcmd} "${CACHE_MARKER}"))."
@ -48,7 +48,7 @@ prepare_build() {
if test -n "${CLANG_SANITIZER}" ; then
CMAKE_FLAGS="${CMAKE_FLAGS} -DCLANG_${CLANG_SANITIZER}=ON"
fi
if test "x${BUILD_32BIT}" = xON ; then
if test "${BUILD_32BIT}" = ON ; then
CMAKE_FLAGS="${CMAKE_FLAGS} ${CMAKE_FLAGS_32BIT}"
fi
@ -64,7 +64,7 @@ build_nvim() {
exit 1
fi
if test "x$CLANG_SANITIZER" != xTSAN ; then
if test "$CLANG_SANITIZER" != "TSAN" ; then
echo "Building libnvim."
if ! top_make libnvim ; then
exit 1

View File

@ -24,7 +24,7 @@ exit_suite() {
echo "${FAIL_SUMMARY}"
fi
export NVIM_TEST_CURRENT_SUITE="${NVIM_TEST_CURRENT_SUITE%/*}"
if test "x$1" != "x--continue" ; then
if test "$1" != "--continue" ; then
exit $FAILED
else
local saved_failed=$FAILED
@ -61,7 +61,7 @@ run_test() {
run_test_wd() {
local hang_ok=
if test "x$1" = "x--allow-hang" ; then
if test "$1" = "--allow-hang" ; then
hang_ok=1
shift
fi
@ -131,7 +131,7 @@ run_test_wd() {
pkill -KILL -s$(cat "$sid_file")
if test $restarts -eq 0 ; then
if test "x$hang_ok" = "x" ; then
if test -z "$hang_ok" ; then
fail "$test_name" E "Test hang up"
fi
else
@ -140,7 +140,7 @@ run_test_wd() {
fi
else
local new_failed="$(cat "$status_file")"
if test "x$new_failed" != "x0" ; then
if test "$new_failed" != "0" ; then
fail "$test_name" F "Test failed in run_test_wd"
fi
break

View File

@ -9,7 +9,7 @@ print_core() {
return 0
fi
echo "======= Core file $core ======="
if test "x${TRAVIS_OS_NAME}" = xosx ; then
if test "${TRAVIS_OS_NAME}" = osx ; then
lldb -Q -o "bt all" -f "${app}" -c "${core}"
else
gdb -n -batch -ex 'thread apply all bt full' "${app}" -c "${core}"
@ -23,7 +23,7 @@ check_core_dumps() {
shift
fi
local app="${1:-${BUILD_DIR}/bin/nvim}"
if test "x${TRAVIS_OS_NAME}" = xosx ; then
if test "${TRAVIS_OS_NAME}" = osx ; then
local cores="$(find /cores/ -type f -print)"
else
local cores="$(find ./ -type f -name 'core.*' -print)"