From d6c9bc10bb354afb52298422957faa7ddb46fe9d Mon Sep 17 00:00:00 2001 From: Ben Jackon Date: Thu, 12 Feb 2015 12:24:44 +0000 Subject: [PATCH] Allow user to skip build when running tests --- run_tests.sh | 21 ++++++++++++++++++++- 1 file changed, 20 insertions(+), 1 deletion(-) diff --git a/run_tests.sh b/run_tests.sh index 4026725c..98311557 100755 --- a/run_tests.sh +++ b/run_tests.sh @@ -4,9 +4,28 @@ set -e SCRIPT_DIR="$( cd "$( dirname "${BASH_SOURCE[0]}" )" && pwd )" -"${SCRIPT_DIR}/third_party/ycmd/build.py" +function usage { + echo "Usage: $0 [--skip-build]" + exit 0 +} flake8 --select=F,C9 --max-complexity=10 "${SCRIPT_DIR}/python" +skip_build=false + +for flag in $@; do + case "$flag" in + --skip-build) + skip_build=true + ;; + *) + usage + ;; + esac +done + +if ! $skip_build; then + "${SCRIPT_DIR}/third_party/ycmd/build.py" +fi for directory in "${SCRIPT_DIR}"/third_party/*; do if [ -d "${directory}" ]; then