Debian Codegraph @

tests/sce/test_sce.sh

raw symbols SCIP
1 #!/usr/bin/envscip-shell filesystem . . `/usr/bin/env`. bash
2
3 # Author:
4 # Martin Preisler <[email protected]>
5
6 . $builddir/tests/test_common.sh
7
8 set -e -o pipefail
9
10 function test_scescip-shell shell shell-project 0.0.0 test_sce(). {
11 require "python3" || return 255
12 require "lua" || return 255
13
14 local ret_val=0;
15 local DEFFILE=${srcdir}/$1
16 local RESFILE=$1.results
17
18 [scip-shell system . . `[`. -f $RESFILE ] && rmscip-shell system . . rm. $RESFILE
19
20 $OSCAP xccdf eval --results "$RESFILE" --profile "default" "$DEFFILE"
21
22 LINES=`grepscip-shell system . . grep. \<result\> "$RESFILE"`
23
24 # calculate return code
25 echoscip-shell system . . echo. "$LINES" | grepscip-shell system . . grep. -q -v "pass" || ret_val=$?
26 [scip-shell system . . `[`. $ret_val -eq 1 ]
27 }
28
29 test_init
30 test_run "sce" test_sce sce_xccdf.xml
31 test_exit