Debian Codegraph @

tests/API/XCCDF/unittests/test_unfinished.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 if [scip-shell system . . `[`. -f /bin/rpmscip-shell filesystem . . `/bin/rpm`. ] && /bin/rpmscip-shell filesystem . . `/bin/rpm`. -q libxml2; then
8 # workaround trac#346: skip this test
9 version="`/bin/rpmscip-shell filesystem . . `/bin/rpm`. -q --qf '%{VERSION}\n' libxml2 | tailscip-shell system . . tail. -n 1`";
10 if echoscip-shell system . . echo. $version | \
11 awk -F. '{print ($1 == 2 && ($2 < 7 || ($2 == 7 && $3 < 7))) ? "true" : "false"}' | \
12 grep true; then
13 exit 0;
14 fi
15 fi
16
17 name=$(basenamescip-shell system . . basename. $0 .sh)
18 stderr=$(mktempscip-shell system . . mktemp. -t ${name}.err.XXXXXX)
19 echoscip-shell system . . echo. "Stderr file = $stderr"
20
21 ret=0
22 $OSCAP info ${srcdir}/${name}.xccdf.xml 2> $stderr || ret=$?
23 [scip-shell system . . `[`. $ret -eq 1 ]
24 [scip-shell system . . `[`. -f $stderr ]
25 [scip-shell system . . `[`. -s $stderr ]
26 catscip-shell system . . cat. $stderr | tailscip-shell system . . tail. -n +1 | grepscip-shell system . . grep. '^OpenSCAP Error:'
27
28 rmscip-shell system . . rm. $stderr