From 14ef89bbca345e85c9f742b749a2a04c5fb65994 Mon Sep 17 00:00:00 2001 From: Adam Wright Date: Sun, 24 Jan 2016 17:22:29 -0800 Subject: [PATCH] Change the commit hook to print something while its running tests --- hooks/pre-push | 8 ++++++-- 1 file changed, 6 insertions(+), 2 deletions(-) diff --git a/hooks/pre-push b/hooks/pre-push index f7379f8..80d5df4 100755 --- a/hooks/pre-push +++ b/hooks/pre-push @@ -10,6 +10,7 @@ RED='\033[0;31m' GREEN='\033[0;32m' +YELLOW='\033[0;33m' NC='\033[0m' # No Color git diff --exit-code &>/dev/null @@ -19,15 +20,18 @@ then exit 1 fi +printf "${YELLOW}[PRESUBMIT]${NC} Running tests ... " + TEST_RESULT=0 cargo test --manifest-path tarpc/Cargo.toml &>/dev/null if [ "$?" != "0" ]; then - echo ${RED}FAIL${NC} pre-push test check + printf "${RED}FAILED${NC}" TEST_RESULT=1 else - echo ${GREEN}PASS${NC} pre-push test check + printf "${GREEN}ok${NC}" fi +printf "\n" RESULT=0 if [ "$TEST_RESULT" == "1" ];