Debian Codegraph @

tests/sce/test_sce_in_ds.sh

raw symbols SCIP
1 #!/usr/bin/env bash
2
3 # Test to check usage of SCE in DS
4 #
5 # Author:
6 # Zbynek Moravec <[email protected]>
7
8 . $builddir/tests/test_common.sh
9
10 set -e -o pipefail
11
12 function test_sce_in_ds {
13
14 xccdf_file=${srcdir}/$1
15 stderr=$(mktemp)
16 result=$(mktemp)
17
18 $OSCAP xccdf eval --results "$result" "$xccdf_file" 2> $stderr
19
20 assert_exists 1 "//result[text()='pass']"
21
22 [ -f $stderr ]; [ ! -s $stderr ]; rm $stderr
23 [ -f $result ]; [ -s $result ]; rm $result
24 }
25
26 # Testing.
27 test_init
28
29 test_run "SCE in DS" test_sce_in_ds test_sce_in_ds.xml
30
31 test_exit