| 1 | #!/usr/bin/env bash |
| 2 | |
| 3 | # Author: |
| 4 | # Jan Černý <[email protected]> |
| 5 | |
| 6 | . $builddir/tests/test_common.sh |
| 7 | |
| 8 | set -e -o pipefail |
| 9 | |
| 10 | function test_sce_in_report { |
| 11 | |
| 12 | local ret_val=0 |
| 13 | local DEFFILE=${srcdir}/$1 |
| 14 | local RESFILE=$1.results |
| 15 | local REPORTFILE=$1.report.html |
| 16 | |
| 17 | [ -f $RESFILE ] && rm $RESFILE |
| 18 | |
| 19 | $OSCAP xccdf eval --check-engine-results --results "$RESFILE" "$DEFFILE" |
| 20 | $OSCAP xccdf generate report "$RESFILE" > "$REPORTFILE" |
| 21 | list=`ls -al /` |
| 22 | grep "$list" "$REPORTFILE" |
| 23 | |
| 24 | } |
| 25 | |
| 26 | test_init |
| 27 | test_run "sce results in HTML report" test_sce_in_report test_sce_in_report.xml |
| 28 | test_exit |