Debian Codegraph @

tests/probes/filehash/test_probes_filehash.sh

raw symbols SCIP
1 #!/usr/bin/envscip-shell filesystem . . `/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_filehashscip-shell shell shell-project 0.0.0 test_probes_filehash(). {
20
21 probecheck "filehash" || return 255
22 require "sha1sum" || return 255
23 require "md5sum" || return 255
24
25 local ret_val=0;
26 local DF="test_probes_filehash.xml"
27 local RF="results.xml"
28
29 [scip-shell system . . `[`. -f $RF ] && rmscip-shell system . . rm. -f $RF
30
31 bashscip-shell system . . bash. ${srcdir}/test_probes_filehash.xml.sh > $DF
32 $OSCAP oval eval --results $RF $DF
33
34 if [scip-shell system . . `[`. -f $RF ]; then
35 verify_results "def" $DF $RF 13 && verify_results "tst" $DF $RF 120
36 ret_val=$?
37 else
38 ret_val=1
39 fi
40
41 [scip-shell system . . `[`. $ret_val -eq 0 ] && rmscip-shell system . . rm. -f /tmp/test_probes_filehash.tmpscip-shell filesystem . . `/tmp/test_probes_filehash.tmp`.
42
43 return $ret_val
44 }
45
46 # Testing.
47
48 test_init
49
50 test_run "test_probes_filehash" test_probes_filehash
51
52 test_exit