Debian Codegraph @

tests/sce/test_sce_stdout_stderr.sh

raw symbols SCIP
1 #!/usr/bin/envscip-shell filesystem . . `/usr/bin/env`. bash
2
3 # Test to check there are output streams separated
4 #
5 # Author:
6 # Marek Haicman <[email protected]>
7
8 . $builddir/tests/test_common.sh
9
10 set -e -o pipefail
11
12 function test_sce_stdout_stderrscip-shell shell shell-project 0.0.0 test_sce_stdout_stderr(). {
13
14 local xccdf_file=${srcdir}/$1
15 local stderr=$(mktempscip-shell system . . mktemp.)
16 local result=$(mktempscip-shell system . . mktemp.)
17
18 $OSCAP xccdf eval --results "$result" "$xccdf_file" 2> $stderr
19 echoscip-shell system . . echo. "===== result ====="
20 catscip-shell system . . cat. $result
21
22 grepscip-shell system . . grep. -q '<check-import import-name="stdout">test_out' $result && \
23 grep -q '<check-import import-name="stderr">test_err' $result
24 }
25
26 # Testing.
27 test_init
28
29 test_run "SCE stdout and stderr" test_sce_stdout_stderr test_sce_stdout_stderr.xccdf.xml
30
31 test_exit