Test STIG separately and with no output if all tests pass

This commit is contained in:
Bob Mottram 2016-11-30 20:20:13 +00:00
parent 42d5bc9321
commit 0e47f66928
1 changed files with 13 additions and 4 deletions

View File

@ -61,6 +61,9 @@ function test_app_function_type {
}
function test_app_functions {
if [ $RUN_STIG ]; then
return
fi
FILES=/usr/share/${PROJECT_NAME}/apps/${PROJECT_NAME}-app-*
# check that these functions exist
@ -78,6 +81,10 @@ function test_app_functions {
}
function test_unique_onion_ports {
if [ $RUN_STIG ]; then
return
fi
# test that some services are not assigned the same onion port
FILES=src/${PROJECT_NAME}-app-*
ports=$(grep -r "_ONION_PORT=" $FILES | awk -F ':' '{print $2}' | uniq | awk -F '=' '{print $2}')
@ -1093,11 +1100,13 @@ function test_stig {
output "V-58901" $? ${SETLANG}
################
echo ''
echo "Passes: $PASSES"
echo "Fails: $FAILS"
if [ $FAILS -gt 0 ]; then
exit 792353
echo ''
echo "Passes: $PASSES"
echo "Fails: $FAILS"
if [ $FAILS -gt 0 ]; then
exit 792353
fi
fi
}