Merge pull request #6653 from ZyX-I/pvs-fix-1

pvscheck: Use absolute path for finding test-include.c
This commit is contained in:
Nikolai Aleksandrovich Pavlov 2017-05-02 21:53:51 +03:00 committed by GitHub
commit 08b23d0806

View File

@ -263,16 +263,29 @@ create_compile_commands() {(
if test -z "$deps" ; then if test -z "$deps" ; then
mkdir -p "$tgt/build" mkdir -p "$tgt/build"
cd "$tgt/build" (
cd "$tgt/build"
cmake .. -DCMAKE_BUILD_TYPE=Debug -DCMAKE_INSTALL_PREFIX="$PWD/root" cmake .. -DCMAKE_BUILD_TYPE=Debug -DCMAKE_INSTALL_PREFIX="$PWD/root"
make -j"$(get_jobs_num)" make -j"$(get_jobs_num)"
)
else else
cd "$tgt" (
cd "$tgt"
make -j"$(get_jobs_num)" CMAKE_EXTRA_FLAGS=" -DCMAKE_INSTALL_PREFIX=$PWD/root -DCMAKE_BUILD_TYPE=Debug " make -j"$(get_jobs_num)" CMAKE_EXTRA_FLAGS=" -DCMAKE_INSTALL_PREFIX=$PWD/root -DCMAKE_BUILD_TYPE=Debug "
)
fi fi
find src/nvim/auto -name '*.test-include.c' -delete find "$tgt/build/src/nvim/auto" -name '*.test-include.c' -delete
)}
# Warning: realdir below only cares about directories unlike realpath.
#
# realpath is not available in Ubuntu trusty yet.
realdir() {(
local dir="$1"
cd "$dir"
printf '%s\n' "$PWD"
)} )}
patch_sources() {( patch_sources() {(
@ -374,7 +387,7 @@ main() {
pvs-install store_const \ pvs-install store_const \
deps store_const \ deps store_const \
-- \ -- \
'store tgt "$PWD/../neovim-pvs"' \ 'modify realdir tgt "$PWD/../neovim-pvs"' \
'store branch master' \ 'store branch master' \
-- "$@" -- "$@"
)" )"