File tree Expand file tree Collapse file tree 1 file changed +9
-1
lines changed
tests/probes/environmentvariable58 Expand file tree Collapse file tree 1 file changed +9
-1
lines changed Original file line number Diff line number Diff line change @@ -24,13 +24,16 @@ function test_probes_environmentvariable58 {
2424 local ret_val=0;
2525 local DF=" $1 .xml"
2626 local RF=" $1 .results.xml"
27+ echo " result file: $RF "
28+ local stderr=$( mktemp $1 .err.XXXXXX)
29+ echo " stderr file: $stderr "
2730
2831 [ -f $RF ] && rm -f $RF
2932
3033 bash ${srcdir} /$1 .xml.sh > $DF
3134 LINES=$?
3235
33- $OSCAP oval eval --results $RF $DF
36+ $OSCAP oval eval --results $RF $DF 2> $stderr
3437
3538 if [ -f $RF ]; then
3639 verify_results " def" $DF $RF 1 && verify_results " tst" $DF $RF $LINES
@@ -39,6 +42,11 @@ function test_probes_environmentvariable58 {
3942 ret_val=1
4043 fi
4144
45+ # Test fails if there are any warnings or "Entity has no value" on stderr.
46+ echo " Verify that there are no warnings on stderr"
47+ grep -Ei " (W:|Entity has no value)" $stderr && ret_val=1
48+
49+ rm $stderr
4250 return $ret_val
4351}
4452
You can’t perform that action at this time.
0 commit comments