| 1 | #!/usr/bin/envscip-shell filesystem . . `/usr/bin/env`. bash |
| 2 | |
| 3 | set -e -o pipefail |
| 4 | |
| 5 | . $builddir/tests/test_common.sh |
| 6 | probecheck "process58" || exit 255 |
| 7 | |
| 8 | name=$(basenamescip-shell system . . basename. $0 .sh) |
| 9 | result=$(mktempscip-shell system . . mktemp. ${name}.out.XXXXXX) |
| 10 | echoscip-shell system . . echo. "result file: $result" |
| 11 | stderr=$(mktempscip-shell system . . mktemp. ${name}.err.XXXXXX) |
| 12 | echoscip-shell system . . echo. "stderr file: $stderr" |
| 13 | |
| 14 | ptty=`psscip-shell system . . ps. -p 1 --no-headers -o tty` |
| 15 | |
| 16 | $OSCAP oval eval --results $result $srcdir/$name.oval.xml 2> $stderr |
| 17 | [scip-shell system . . `[`. ! -s $stderr ] |
| 18 | |
| 19 | rmscip-shell system . . rm. $stderr |
| 20 | |
| 21 | [scip-shell system . . `[`. -s $result ] |
| 22 | assert_exists 1 '/oval_results/results/system/oval_system_characteristics/system_data/unix-sys:process58_item/unix-sys:tty[text()="'$ptty'"]' |
| 23 | |
| 24 | rmscip-shell system . . rm. $result |