From 997469a8cf9126e6657555da7c431ebce13236e2 Mon Sep 17 00:00:00 2001 From: Gyu-Ho Lee Date: Mon, 23 Oct 2017 13:12:43 -0700 Subject: [PATCH] test: add 'VERBOSE' flag to enable client debugs --- test | 10 +++++++++- 1 file changed, 9 insertions(+), 1 deletion(-) diff --git a/test b/test index 01a8ba7f3..6c227fda9 100755 --- a/test +++ b/test @@ -82,8 +82,16 @@ fi function unit_pass { echo "Running unit tests..." + GO_TEST_FLAG="" + if [ "${VERBOSE}" == "1" ]; then + GO_TEST_FLAG="-v" + fi + if [ "${VERBOSE}" == "2" ]; then + GO_TEST_FLAG="-v" + export CLIENT_DEBUG=1 + fi # only -run=Test so examples can run in integration tests - go test -timeout 3m "${COVER}" ${RACE} -cpu 1,2,4 -run=Test "$@" "${TEST[@]}" + go test ${GO_TEST_FLAG} -timeout 3m "${COVER}" ${RACE} -cpu 1,2,4 -run=Test "$@" "${TEST[@]}" } function integration_pass {