File: all.sh

package info (click to toggle)
openscap 1.4.2%2Bdfsg-1
  • links: PTS, VCS
  • area: main
  • in suites: trixie
  • size: 125,040 kB
  • sloc: xml: 527,109; ansic: 91,390; sh: 19,789; python: 2,515; perl: 444; makefile: 49
file content (47 lines) | stat: -rwxr-xr-x 795 bytes parent folder | download | duplicates (2)
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
#!/usr/bin/env bash

. $builddir/tests/test_common.sh

function good-ok {
	$OSCAP oval validate ${srcdir}/oval-ok.xml
	ret=$?
	if [ $ret -eq 0 ]; then
		return 0
	fi
	return 1
}

function oval-no-xml {
	$OSCAP oval validate ${srcdir}/all.sh
	ret=$?
	if [ $ret -eq 1 ]; then
		return 0
	fi
	return 1
}

function oval-schema-fail {
	$OSCAP oval validate ${srcdir}/oval-schema-fail.xml
	ret=$?
	if [ $ret -eq 2 ]; then
		return 0
	fi
	return 1
}

function oval-schematron-fail {
	$OSCAP oval validate ${srcdir}/oval-schematron-fail.xml
	ret=$?
	if [ $ret -eq 2 ]; then
		return 0
	fi
	return 1
}

test_init test_validation.log
test_run "oval-ok" good-ok
test_run "oval-no-xml" oval-no-xml
test_run "oval-schema-fail" oval-schema-fail
test_run "oval-schematron-fail" oval-schematron-fail
test_exit