From 0e47f669287649472d773833df5d8c94c80750f8 Mon Sep 17 00:00:00 2001 From: Bob Mottram Date: Wed, 30 Nov 2016 20:20:13 +0000 Subject: [PATCH] Test STIG separately and with no output if all tests pass --- src/freedombone-tests | 17 +++++++++++++---- 1 file changed, 13 insertions(+), 4 deletions(-) diff --git a/src/freedombone-tests b/src/freedombone-tests index dbea87af..7ba050e1 100755 --- a/src/freedombone-tests +++ b/src/freedombone-tests @@ -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 }