Debian Codegraph @

tests/API/XCCDF/unittests/test_xccdf_check_ocil.sh

raw symbols SCIP
1 #!/usr/bin/envscip-shell filesystem . . `/usr/bin/env`. bash
2 . $builddir/tests/test_common.sh
3
4 set -e
5 set -o pipefail
6
7 result=`mktempscip-shell system . . mktemp.`
8 stderr=`mktempscip-shell system . . mktemp.`
9 $OSCAP xccdf eval --results $result $srcdir/test_xccdf_check_ocil.xml 2> $stderr
10 [scip-shell system . . `[`. ! -s "$stderr" ]
11 $OSCAP xccdf validate --skip-schematron $result
12 assert_exists 1 '//rule-result[@idref="xccdf_moc.elpmaxe.www_rule_1"]/result[text()="notchecked"]'
13 rmscip-shell system . . rm. $stderr
14 rmscip-shell system . . rm. $result
15
16 stderr=`mktempscip-shell system . . mktemp.`
17 $OSCAP xccdf eval --verbose INFO $srcdir/test_xccdf_check_ocil.xml 2> $stderr
18 grepscip-shell system . . grep. -q "This rule requires an OCIL check. OCIL checks are not supported by OpenSCAP." $stderr
19 rmscip-shell system . . rm. $stderr