~mariusor/fedbox

3396be13d42073feb9d3cc25f75e667fa8e21781 — Marius Orcsik a month ago 25ccb47
Fix some shellcheck notices (not all though)
1 files changed, 11 insertions(+), 9 deletions(-)

M tools/run-tests.sh
M tools/run-tests.sh => tools/run-tests.sh +11 -9
@@ 1,24 1,26 @@
#!/bin/bash
set -e
RED='\033[0;31m'
BGREEN='\033[1;32m'
GREEN='\033[1;32m'
YELLOW='\033[1;33m'
NC='\033[0m' # No Color

run_tests() {
    _storage="${1}"
    echo -e "Testing ${BGREEN}${_storage}${NC}"
    make STORAGE=${_storage} CGO_ENABLED=0 integration
    make FEDBOX_STORAGE=${_storage} CGO_ENABLED=0 integration
    make STORAGE=${_storage} CGO_ENABLED=1 TEST_FLAGS='-race -count=1' integration
    make FEDBOX_STORAGE=${_storage} CGO_ENABLED=1 TEST_FLAGS='-race -count=1' integration
    _storage=${1}
    echo -e "Testing ${GREEN}${_storage}${NC} with CGO ${YELLOW}Disabled${NC}"
    make        STORAGE="${_storage}" CGO_ENABLED=0 TEST_FLAGS='-count=1 -cover' integration
    make FEDBOX_STORAGE="${_storage}" CGO_ENABLED=0 TEST_FLAGS='-count=1 -cover' integration
    echo -e "Testing ${GREEN}${_storage}${NC} with CGO ${YELLOW}Enabled${NC}"
    make        STORAGE="${_storage}" CGO_ENABLED=1 TEST_FLAGS='-race -count=1' integration
    make FEDBOX_STORAGE="${_storage}" CGO_ENABLED=1 TEST_FLAGS='-race -count=1' integration
    echo ""
}

if [[ "${1}" = "" ]]; then
    _tests=(fs sqlite boltdb badger)
    #_tests=(fs sqlite boltdb badger)
    _tests=(fs sqlite boltdb)
else
    _tests=${@}
    _tests="${@}"
fi

for _test in ${_tests[@]} ; do