File: test_api_oval.sh

package info (click to toggle)
openscap 1.4.3%2Bdfsg-1
  • links: PTS, VCS
  • area: main
  • in suites: forky, sid
  • size: 125,116 kB
  • sloc: xml: 527,136; ansic: 91,867; sh: 19,831; python: 2,531; perl: 444; makefile: 49
file content (49 lines) | stat: -rwxr-xr-x 1,165 bytes parent folder | download | duplicates (3)
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
44
45
46
47
48
49
#!/usr/bin/env bash

# Copyright 2009 Red Hat Inc., Durham, North Carolina.
# All Rights Reserved.
#
# OpenScap OVAL Module Test Suite.
#
# Created on: Nov 30, 2009
#
# Authors:
#      Peter Vrabec, <pvrabec@redhat.com>
#      Ondrej Moris, <omoris@redhat.com>

. $builddir/tests/test_common.sh


# Test Cases.

function test_api_oval_definition {
    ./test_api_oval ${srcdir}/scap-rhel5-oval.xml
}

function test_api_oval_syschar {
    ./test_api_syschar $srcdir/composed-oval.xml \
	$srcdir/system-characteristics.xml
}

function test_api_oval_results {
    ./test_api_results $srcdir/results.xml exported-results.xml
    cmp $srcdir/results-good.xml exported-results.xml
}

function test_api_oval_directives {
    ./test_api_directives $srcdir/directives.xml exported-directives.xml
    cmp $srcdir/directives.xml exported-directives.xml
}

# Testing.

test_init

if [ -z ${CUSTOM_OSCAP+x} ] ; then
    test_run "test_api_oval_definition" test_api_oval_definition
    test_run "test_api_oval_syschar" test_api_oval_syschar
    test_run "test_api_oval_results" test_api_oval_results
    test_run "test_api_oval_directives" test_api_oval_directives
fi

test_exit