Debian Codegraph @

tests/sce/test_sce_streams_fill.sh

raw symbols SCIP
1 #!/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_streams_fill {
13 local xccdf_file=${srcdir}/$1
14 local stderr=$(mktemp)
15 local result=$(mktemp)
16
17 # the test is actually pretty slow, which means it takes ~10 seconds on
18 # my laptop. 100s is safe margin in case of slow virtual jenkins nodes
19 timeout "100s" $OSCAP xccdf eval --results "$result" "$xccdf_file" 2> $stderr
20 echo "===== result ====="
21 # zero is generated into stdout, 1 is stderr
22 grep "001999990" $result && grep "101999990" $result
23 }
24
25 # Testing.
26 test_init
27
28 test_run "SCE stream filling up" test_sce_streams_fill test_sce_streams_fill.xccdf.xml
29
30 test_exit