Theo Chatzimichos b4fa0d
#!/bin/bash
Theo Chatzimichos b4fa0d
Theo Chatzimichos b4fa0d
# Run various code validation/syntax checks
Theo Chatzimichos b4fa0d
Theo Chatzimichos f8666c
source bin/get_colors.sh
Theo Chatzimichos f8666c
Theo Chatzimichos b4fa0d
TESTS=(
Theo Chatzimichos b4fa0d
    extension.sh
Theo Chatzimichos 70afbd
    empty_files.sh
Theo Chatzimichos b4fa0d
    secrets.sh
Theo Chatzimichos b4fa0d
    roles.py
Theo Chatzimichos b4fa0d
    custom_grains.py
Theo Chatzimichos b4fa0d
)
Theo Chatzimichos b4fa0d
Theo Chatzimichos b4fa0d
for _test in ${TESTS[@]}; do
Theo Chatzimichos f8666c
    echo_INFO "## Running test_${_test}"
Theo Chatzimichos e41cc3
    if bin/test_${_test}; then
Theo Chatzimichos f8666c
        echo_PASSED
Theo Chatzimichos e41cc3
    else
Theo Chatzimichos f8666c
        echo_FAILED
Theo Chatzimichos e41cc3
        STATUS=1
Theo Chatzimichos e41cc3
    fi
Theo Chatzimichos f8666c
    echo
Theo Chatzimichos b4fa0d
done
Theo Chatzimichos b4fa0d
Theo Chatzimichos b4fa0d
exit $STATUS