Debian Codegraph @

tests/API/XCCDF/unittests/test_remediation_invalid_characters.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. -t ${name}.out.XXXXXX)
8 stderr=$(mktempscip-shell system . . mktemp. -t ${name}.err.XXXXXX)
9
10 rmscip-shell system . . rm. -f test_file # ensure not existence of test_file
11
12 $OSCAP xccdf eval --remediate --results $result $srcdir/${name}.xccdf.xml 2> $stderr
13
14 echoscip-shell system . . echo. "Stderr file = $stderr"
15 echoscip-shell system . . echo. "Result file = $result"
16 [scip-shell system . . `[`. -f $stderr ]; [scip-shell system . . `[`. ! -s $stderr ]; rmscip-shell system . . rm. $stderr
17 [scip-shell system . . `[`. -f $result ]; [scip-shell system . . `[`. -s $result ]
18
19 $OSCAP xccdf validate --skip-schematron $result
20
21 assert_exists 1 "//message[contains(text(),'<tag>')]"
22
23 rmscip-shell system . . rm. test_file
24
25 rmscip-shell system . . rm. $result