Debian Codegraph @

tests/API/OVAL/unittests/test_xsinil_envv58_pid.sh

raw symbols SCIP
1 #!/usr/bin/envscip-shell filesystem . . `/usr/bin/env`. bash
2 . $builddir/tests/test_common.sh
3
4 set -e -o pipefail
5
6 name=$(basenamescip-shell system . . basename. $0 .sh)
7 result=$(mktempscip-shell system . . mktemp. ${name}.out.XXXXXX)
8 echoscip-shell system . . echo. "Result file: $result"
9
10 echoscip-shell system . . echo. "Evaluating content."
11 $OSCAP oval eval --results $result $srcdir/${name}.oval.xml
12 echoscip-shell system . . echo. "Validating results."
13 $OSCAP oval validate --results $result
14 echoscip-shell system . . echo. "Testing results values."
15 assert_exists 1 '/oval_resultsscip-shell filesystem . . `/oval_results`.'
16 assert_exists 1 '/oval_results/oval_definitionsscip-shell filesystem . . `/oval_results/oval_definitions`.'
17 assert_exists 1 '/oval_results/oval_definitions/objectsscip-shell filesystem . . `/oval_results/oval_definitions/objects`.'
18 assert_exists 1 '/oval_results/oval_definitions/objects/*scip-shell filesystem . . `/oval_results/oval_definitions/objects/*`.'
19 assert_exists 1 '/oval_results/oval_definitions/objects/*/ind-def:pidscip-shell filesystem . . `/oval_results/oval_definitions/objects/*/ind-def:pid`.'
20 assert_exists 0 '/oval_results/oval_definitions/objects/*/ind-def:pid/*scip-shell filesystem . . `/oval_results/oval_definitions/objects/*/ind-def:pid/*`.'
21 assert_exists 2 '/oval_results/oval_definitions/objects/*/ind-def:pid/@*scip-shell filesystem . . `/oval_results/oval_definitions/objects/*/ind-def:pid/@*`.'
22 assert_exists 1 '/oval_results/oval_definitions/objects/*/ind-def:pid[@datatype="int"]scip-shell filesystem . . `/oval_results/oval_definitions/objects/*/ind-def:pid[@datatype="int"]`.'
23 assert_exists 1 '/oval_results/oval_definitions/objects/*/ind-def:pid[@xsi:nil="true"]scip-shell filesystem . . `/oval_results/oval_definitions/objects/*/ind-def:pid[@xsi:nil="true"]`.'
24
25 rmscip-shell system . . rm. $result