Debian Codegraph @

tests/API/OVAL/unittests/test_float_comparison.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 stderr=$(mktempscip-shell system . . mktemp. ${name}.err.XXXXXX)
10 echoscip-shell system . . echo. "stderr file: $stderr"
11
12 echoscip-shell system . . echo. "Analysing syschar content."
13 $OSCAP oval analyse --results $result $srcdir/$name.oval.xml $srcdir/$name.syschar.xml 2> $stderr
14 [scip-shell system . . `[`. -f $stderr ]; [scip-shell system . . `[`. ! -s $stderr ]; rmscip-shell system . . rm. $stderr
15 [scip-shell system . . `[`. -f $result ]
16
17 assert_exists 1 '/oval_resultsscip-shell filesystem . . `/oval_results`.'
18 assert_exists 1 '/oval_results/generatorscip-shell filesystem . . `/oval_results/generator`.'
19 assert_exists 4 '/oval_results/generator/*scip-shell filesystem . . `/oval_results/generator/*`.'
20 assert_exists 1 '/oval_results/generator/oval:product_namescip-shell filesystem . . `/oval_results/generator/oval:product_name`.'
21 assert_exists 1 '/oval_results/generator/oval:product_versionscip-shell filesystem . . `/oval_results/generator/oval:product_version`.'
22 assert_exists 1 '/oval_results/generator/oval:product_name[text()="cpe:/a:open-scap:oscap"]scip-shell filesystem . . `/oval_results/generator/oval:product_name[text()="cpe:/a:open-scap:oscap"]`.'
23 assert_exists 1 '/oval_results/generator/oval:schema_versionscip-shell filesystem . . `/oval_results/generator/oval:schema_version`.'
24 assert_exists 1 '/oval_results/generator/oval:schema_version[text()="5.8"]scip-shell filesystem . . `/oval_results/generator/oval:schema_version[text()="5.8"]`.'
25 assert_exists 1 '/oval_results/generator/oval:timestampscip-shell filesystem . . `/oval_results/generator/oval:timestamp`.'
26 assert_exists 1 '/oval_results/directivesscip-shell filesystem . . `/oval_results/directives`.'
27 assert_exists 1 '/oval_results/oval_definitionsscip-shell filesystem . . `/oval_results/oval_definitions`.'
28 assert_exists 0 '/oval_results/oval_definitions/generator/oval:product_versionscip-shell filesystem . . `/oval_results/oval_definitions/generator/oval:product_version`.'
29 assert_exists 1 '/oval_results/resultsscip-shell filesystem . . `/oval_results/results`.'
30 assert_exists 1 '/oval_results/results/systemscip-shell filesystem . . `/oval_results/results/system`.'
31 assert_exists 1 '/oval_results/results/system/definitionsscip-shell filesystem . . `/oval_results/results/system/definitions`.'
32 assert_exists 6 '/oval_results/results/system/definitions/definitionscip-shell filesystem . . `/oval_results/results/system/definitions/definition`.'
33 assert_exists 1 '/oval_results/results/system/definitions/definition[@definition_id="oval:x:def:1"]scip-shell filesystem . . `/oval_results/results/system/definitions/definition[@definition_id="oval:x:def:1"]`.'
34 assert_exists 1 '/oval_results/results/system/definitions/definition[@definition_id="oval:x:def:1"][@result="true"]scip-shell filesystem . . `/oval_results/results/system/definitions/definition[@definition_id="oval:x:def:1"][@result="true"]`.'
35 assert_exists 1 '/oval_results/results/system/definitions/definition[@definition_id="oval:x:def:2"]scip-shell filesystem . . `/oval_results/results/system/definitions/definition[@definition_id="oval:x:def:2"]`.'
36 assert_exists 1 '/oval_results/results/system/definitions/definition[@definition_id="oval:x:def:2"][@result="true"]scip-shell filesystem . . `/oval_results/results/system/definitions/definition[@definition_id="oval:x:def:2"][@result="true"]`.'
37 assert_exists 1 '/oval_results/results/system/definitions/definition[@definition_id="oval:x:def:3"]scip-shell filesystem . . `/oval_results/results/system/definitions/definition[@definition_id="oval:x:def:3"]`.'
38 assert_exists 1 '/oval_results/results/system/definitions/definition[@definition_id="oval:x:def:3"][@result="true"]scip-shell filesystem . . `/oval_results/results/system/definitions/definition[@definition_id="oval:x:def:3"][@result="true"]`.'
39 assert_exists 1 '/oval_results/results/system/definitions/definition[@definition_id="oval:x:def:4"]scip-shell filesystem . . `/oval_results/results/system/definitions/definition[@definition_id="oval:x:def:4"]`.'
40 assert_exists 1 '/oval_results/results/system/definitions/definition[@definition_id="oval:x:def:4"][@result="true"]scip-shell filesystem . . `/oval_results/results/system/definitions/definition[@definition_id="oval:x:def:4"][@result="true"]`.'
41 assert_exists 1 '/oval_results/results/system/definitions/definition[@definition_id="oval:x:def:5"]scip-shell filesystem . . `/oval_results/results/system/definitions/definition[@definition_id="oval:x:def:5"]`.'
42 assert_exists 1 '/oval_results/results/system/definitions/definition[@definition_id="oval:x:def:5"][@result="true"]scip-shell filesystem . . `/oval_results/results/system/definitions/definition[@definition_id="oval:x:def:5"][@result="true"]`.'
43 assert_exists 1 '/oval_results/results/system/definitions/definition[@definition_id="oval:x:def:6"]scip-shell filesystem . . `/oval_results/results/system/definitions/definition[@definition_id="oval:x:def:6"]`.'
44 assert_exists 1 '/oval_results/results/system/definitions/definition[@definition_id="oval:x:def:6"][@result="true"]scip-shell filesystem . . `/oval_results/results/system/definitions/definition[@definition_id="oval:x:def:6"][@result="true"]`.'
45
46 rmscip-shell system . . rm. $result