aboutsummaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorNikolai Aleksandrovich Pavlov <kp-pav@yandex.ru>2017-05-02 21:53:51 +0300
committerGitHub <noreply@github.com>2017-05-02 21:53:51 +0300
commit08b23d08066c80eed3780195fcb1b0cb21aed79e (patch)
tree07563dae779d0828d0079010760581f981516bf7
parent249b37e2fb7294d7d5ac821d5e9cc94e9d90ed18 (diff)
parent4f4d21693bb1665f1a398fb58dc2c554ba7b4eba (diff)
downloadrneovim-08b23d08066c80eed3780195fcb1b0cb21aed79e.tar.gz
rneovim-08b23d08066c80eed3780195fcb1b0cb21aed79e.tar.bz2
rneovim-08b23d08066c80eed3780195fcb1b0cb21aed79e.zip
Merge pull request #6653 from ZyX-I/pvs-fix-1
pvscheck: Use absolute path for finding test-include.c
-rwxr-xr-xscripts/pvscheck.sh27
1 files changed, 20 insertions, 7 deletions
diff --git a/scripts/pvscheck.sh b/scripts/pvscheck.sh
index 67834cca8a..c75dd2ab76 100755
--- a/scripts/pvscheck.sh
+++ b/scripts/pvscheck.sh
@@ -263,16 +263,29 @@ create_compile_commands() {(
if test -z "$deps" ; then
mkdir -p "$tgt/build"
- cd "$tgt/build"
+ (
+ cd "$tgt/build"
- cmake .. -DCMAKE_BUILD_TYPE=Debug -DCMAKE_INSTALL_PREFIX="$PWD/root"
- make -j"$(get_jobs_num)"
+ cmake .. -DCMAKE_BUILD_TYPE=Debug -DCMAKE_INSTALL_PREFIX="$PWD/root"
+ make -j"$(get_jobs_num)"
+ )
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
- 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() {(
@@ -374,7 +387,7 @@ main() {
pvs-install store_const \
deps store_const \
-- \
- 'store tgt "$PWD/../neovim-pvs"' \
+ 'modify realdir tgt "$PWD/../neovim-pvs"' \
'store branch master' \
-- "$@"
)"