From d72df05b930c7dd79f138ec371124329eb9c9259 Mon Sep 17 00:00:00 2001 From: ZyX Date: Sat, 20 May 2017 03:35:50 +0300 Subject: pvscheck: Add --only-analyse mode --- scripts/pvscheck.sh | 25 +++++++++++++++++-------- 1 file changed, 17 insertions(+), 8 deletions(-) (limited to 'scripts') diff --git a/scripts/pvscheck.sh b/scripts/pvscheck.sh index c75dd2ab76..79ed08f458 100755 --- a/scripts/pvscheck.sh +++ b/scripts/pvscheck.sh @@ -14,7 +14,7 @@ get_jobs_num() { help() { echo 'Usage:' echo ' pvscheck.sh [--pvs URL] [--deps] [target-directory [branch]]' - echo ' pvscheck.sh [--pvs URL] [--recheck] [target-directory]' + echo ' pvscheck.sh [--pvs URL] [--recheck|--only-analyse] [target-directory]' echo ' pvscheck.sh [--pvs URL] --pvs-install {target-directory}' echo ' pvscheck.sh --patch [--only-build]' echo @@ -39,6 +39,9 @@ help() { echo echo ' --recheck: run analysis on a prepared target directory.' echo + echo ' --only-analyse: run analysis on a prepared target directory ' + echo ' without building Neovim.' + echo echo ' target-directory: Directory where build should occur.' echo ' Default: ../neovim-pvs' echo @@ -348,20 +351,23 @@ do_check() { install_pvs "$tgt" "$pvs_url" - adjust_path "$tgt" + do_recheck "$tgt" "$deps" +} + +do_recheck() { + local tgt="$1" ; shift + local deps="$2" ; shift create_compile_commands "$tgt" "$deps" - run_analysis "$tgt" + do_analysis "$tgt" } -do_recheck() { - local tgt="$1" +do_analysis() { + local tgt="$1" ; shift adjust_path "$tgt" - create_compile_commands "$tgt" "$deps" - run_analysis "$tgt" } @@ -384,6 +390,7 @@ main() { patch store_const \ only-build 'store_const --only-build' \ recheck store_const \ + only-analyse store_const \ pvs-install store_const \ deps store_const \ -- \ @@ -404,7 +411,9 @@ main() { elif test -n "$pvs_install" ; then install_pvs "$tgt" "$pvs_url" elif test -n "$recheck" ; then - do_recheck "$tgt" + do_recheck "$tgt" "$deps" + elif test -n "$only_analyse" ; then + do_analysis "$tgt" else do_check "$tgt" "$branch" "$pvs_url" "$deps" fi -- cgit