Debian Codegraph @

tests/probes/interface/test_probes_interface.sh

raw symbols SCIP
1 #!/usr/bin/env bash
2
3 # Copyright 2009 Red Hat Inc., Durham, North Carolina.
4 # All Rights Reserved.
5 #
6 # OpenScap Probes Test Suite.
7 #
8 # Created on: Nov 30, 2009
9 #
10 # Authors:
11 # Peter Vrabec, <[email protected]>
12 # David Niemoller
13 # Ondrej Moris, <[email protected]>
14
15 . $builddir/tests/test_common.sh
16
17 # Test Cases.
18
19 function test_probes_interface {
20 require 'ipcalc' || return 255
21
22 local ret_val=0;
23 local DF="test_probes_interface.xml"
24 local RF="results.xml"
25
26 [ -f $RF ] && rm -f $RF
27
28 if [ ! -x test_probes_interface ]; then
29 echo -e "Testing binary not found!\n"
30 return 255; # Test is not applicable.
31 fi
32
33 bash ${srcdir}/test_probes_interface.xml.sh `pwd`/test_probes_interface \
34 > $DF
35 LINES=$?
36
37 $OSCAP oval eval --results $RF $DF
38
39 if [ -f $RF ]; then
40 verify_results "def" $DF $RF 1 && verify_results "tst" $DF $RF $LINES
41 ret_val=$?
42 else
43 ret_val=1
44 fi
45
46 return $ret_val
47 }
48
49 # Testing.
50
51 test_init
52
53 test_run "test_probes_interface" test_probes_interface
54
55 test_exit