Include static analysis in tests

This commit is contained in:
Bob Mottram 2018-03-02 19:34:44 +00:00
parent 8112c240ae
commit 1de2c88d04
1 changed files with 25 additions and 0 deletions

View File

@ -65,6 +65,30 @@ function test_app_function_type {
fi fi
} }
function test_static_analysis {
FILES="/usr/share/${PROJECT_NAME}/apps/${PROJECT_NAME}-*"
for filename in $FILES
do
if ! shellcheck --exclude SC2034,SC1090 "$filename"; then
echo ''
echo $"${filename} failed static analysis"
exit 24687242
fi
done
FILES="/usr/share/${PROJECT_NAME}/utils/${PROJECT_NAME}-*"
for filename in $FILES
do
if ! shellcheck --exclude SC2034,SC1090 "$filename"; then
echo ''
echo $"${filename} failed static analysis"
exit 24687242
fi
done
}
function test_app_functions { function test_app_functions {
if [ $RUN_STIG ]; then if [ $RUN_STIG ]; then
return return
@ -1255,6 +1279,7 @@ if [ ! "$RUN_STIG" ]; then
fi fi
test_app_functions test_app_functions
test_static_analysis
test_unique_onion_ports test_unique_onion_ports
remove_management_engine_interface remove_management_engine_interface
freedombone-pass --test yes freedombone-pass --test yes